← back to Model Arena

data/artifacts/086d9b64d97d/qwen25-7b.html

69 lines

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D Water Fountain</title>
    <style>
        body {
            margin: 0;
            overflow: hidden;
            background-color: #f7efe6;
            font-family: 'Didot', 'Bodoni MT', 'Playfair Display', Georgia, serif;
        }
        .container {
            position: absolute;
            width: 100%;
            height: 100%;
            perspective: 1000px;
        }
        .fountain {
            position: relative;
            transform-style: preserve-3d;
            animation: ambient 18s linear infinite, glow 60s ease-in-out infinite;
        }
        @keyframes ambient {
            from { background-position-x: -50%; }
            to { background-position-x: 50%; }
        }
        @keyframes glow {
            0% { box-shadow: 0 0 24px rgba(198, 95, 56, .35); }
            75% { box-shadow: none; }
            100% { box-shadow: 0 0 24px rgba(198, 95, 56, .35); }
        }
    </style>
</head>
<body>
    <div class="container">
        <div id="fountain" class="fountain"></div>
    </div>

    <script>
        function createWater() {
            const fountain = document.getElementById('fountain');
            const waterMesh = new THREE.Mesh(
                new THREE.PlaneGeometry(20, 15),
                new THREE.MeshBasicMaterial({ color: 0x7d6a45 })
            );
            waterMesh.rotation.x = -Math.PI / 2;
            fountain.appendChild(waterMesh);
        }

        function animate() {
            requestAnimationFrame(animate);
            if (fountain) createWater();
        }

        const scene = new THREE.Scene();
        const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
        const renderer = new THREE.WebGLRenderer({ antialias: true });
        renderer.setSize(window.innerWidth, window.innerHeight);
        document.body.appendChild(renderer.domElement);

        scene.add(new THREE.AmbientLight(0x404040));
        camera.position.z = 5;

        animate();
    </script>
</body>
</html>