Prompt specification
Build or customize the Three.js 3D scene "Street curb and catch-basin cutaway" inside the active workspace.
Engineering Constraints:
1. Runtime & Orbit: Use Three.js r160 with OrbitControls (damping enabled) and ACESFilmicToneMapping.
2. Frame Timing: Drive all motion strictly with clock.getDelta() so animation speed is FPS-independent.
3. Viewport Hygiene: Handle window resize cleanly, cap DPR at Math.min(window.devicePixelRatio, 2), and dispose geometries/materials/renderer on unmount.
Scene Metadata:
Scene: Street curb and catch-basin cutaway
Category: Space & Earth · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/street-curb-and-catch-basin-cutaway-x1261
Scene Description Prompt:
Show a low-poly street-drain section connecting sloped gutter, grate, catch basin, and underground pipe through one visible flow path. Three.js from cdnjs, one HTML file.
Working Three.js Starter (street-curb-and-catch-basin-cutaway-x1261):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Street Drain Section — Three.js</title>
<style>
:root {
color-scheme: dark;
--ink: #e8f1f3;
--muted: #91a6ae;
--cyan: #49e8ff;
--panel: rgba(12, 23, 30, 0.76);
--line: rgba(170, 209, 218, 0.2);
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #101820;
font-family: Inter, ui-sans-serif, system-ui, -apple-system,
BlinkMacSystemFont, "Segoe UI", sans-serif;
}
canvas {
display: block;
width: 100%;
height: 100%;
touch-action: none;
cursor: grab;
}
canvas:active {
cursor: grabbing;
}
.overlay {
position: fixed;
inset: 0;
pointer-events: none;
}
.heading {
position: absolute;
top: 30px;
left: 34px;
max-width: 390px;
text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}
.eyebrow {
margin-bottom: 8px;
color: var(--cyan);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.22em;
text-transform: uppercase;
}
h1 {
margin: 0;
color: var(--ink);
font-size: clamp(30px, 4vw, 52px);
font-weight: 760;
letter-spacing: -0.045em;
line-height: 0.98;
}
.subtitle {
margin: 13px 0 0;
color: var(--muted);
font-size: 13px;
line-height: 1.55;
}
.badge {
position: absolute;
top: 30px;
right: 32px;
padding: 9px 12px;
border: 1px solid var(--line);
border-radius: 999px;
background: rgba(11, 20, 26, 0.58);
color: #b9cbd0;
font-size: 10px;
font-weight: 750;
letter-spacing: 0.14em;
text-transform: uppercase;
backdrop-filter: blur(10px);
}
.callout {
position: absolute;
display: flex;
align-items: center;
gap: 8px;
padding: 6px 10px 6px 6px;
border: 1px solid rgba(137, 190, 202, 0.25);
border-radius: 999px;
background: rgba(9, 20, 27, 0.78);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
color: #e3edef;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.02em;
white-space: nowrap;
transform: translate(-50%, -50%);
backdrop-filter: blur(8px);
transition: opacity 160ms ease;
}
.callout i {
display: grid;
width: 22px;
height: 22px;
place-items: center;
border-radius: 50%;
background: var(--cyan);
color: #09212a;
font-size: 10px;
font-style: normal;
font-weight: 900;
}
.legend {
position: absolute;
bottom: 28px;
left: 30px;
width: 215px;
padding: 15px 16px;
border: 1px solid var(--line);
border-radius: 14px;
background: var(--panel);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
backdrop-filter: blur(14px);
}
.legend-title {
margin-bottom: 10px;
color: #7e969e;
font-size: 9px;
font-weight: 800;
letter-spacing: 0.17em;
text-transform: uppercase;
}
.legend-row {
display: flex;
align-items: center;
gap: 10px;
padding: 5px 0;
color: #c7d5d9;
font-size: 11px;
}
.legend-row b {
width: 18px;
color: #708891;
font-size: 9px;
font-weight: 800;
}
.flow-swatch {
width: 26px;
height: 4px;
margin-left: 28px;
border-radius: 99px;
background: var(--cyan);
box-shadow: 0 0 12px rgba(73, 232, 255, 0.85);
}
.controls {
position: absolute;
right: 30px;
bottom: 28px;
padding: 10px 13px;
border: 1px solid var(--line);
border-radius: 10px;
background: rgba(11, 20, 26, 0.62);
color: #8ea5ad;
font-size: 10px;
letter-spacing: 0.04em;
backdrop-filter: blur(10px);
}
.controls strong {
color: #c8d7db;
font-weight: 700;
}
@media (max-width: 760px) {
.heading {
top: 20px;
left: 20px;
}
.subtitle,
.badge,
.legend {
display: none;
}
.controls {
right: 16px;
bottom: 16px;
}
.callout {
padding: 4px;
}
.callout span {
display: none;
}
}
</style>
</head>
<body>
<div class="overlay">
<header class="heading">
<div class="eyebrow">Civil Systems / Section 01</div>
<h1>Street Drain</h1>
<p class="subtitle">
A low-poly cutaway following stormwater from the sloped gutter,
through the grate and catch basin, into the underground outlet pipe.
</p>
</header>
<div class="badge">Interactive cutaway</div>
<div class="callout" id="callout-1">
<i>1</i><span>Sloped gutter</span>
</div>
<div class="callout" id="callout-2">
<i>2</i><span>Road grate</span>
</div>
<div class="callout" id="callout-3">
<i>3</i><span>Catch basin</span>
</div>
<div class="callout" id="callout-4">
<i>4</i><span>Outlet pipe</span>
</div>
<aside class="legend">
<div class="legend-title">Flow sequence</div>
<div class="legend-row"><b>01</b><span>Gutter grade</span></div>
<div class="legend-row"><b>02</b><span>Grate inlet</span></div>
<div class="legend-row"><b>03</b><span>Collection basin</span></div>
<div class="legend-row"><b>04</b><span>Underground pipe</span></div>
<div class="flow-swatch"></div>
</aside>
<div class="controls">
<strong>Drag</strong> to orbit ·
<strong>Scroll</strong> to zoom ·
<strong>Double-click</strong> to reset
</div>
</div>
<script type="module">
import * as THREE from
"https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x101820);
scene.fog = new THREE.Fog(0x101820, 24, 43);
const camera = new THREE.PerspectiveCamera(
42,
innerWidth / innerHeight,
0.1,
100
);
const renderer = new THREE.WebGLRenderer({
antialias: true,
powerPreference: "high-performance"
});
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.setSize(innerWidth, innerHeight);
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.08;
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
renderer.domElement.setAttribute(
"aria-label",
"Interactive low-poly street drain cutaway"
);
document.body.prepend(renderer.domElement);
const materials = {
asphalt: new THREE.MeshStandardMaterial({
color: 0x29363d,
roughness: 0.98,
metalness: 0.02,
flatShading: true
}),
asphaltEdge: new THREE.MeshStandardMaterial({
color: 0x182329,
roughness: 1,
flatShading: true
}),
soil: new THREE.MeshStandardMaterial({
color: 0x715440,
roughness: 1,
flatShading: true
}),
soilLight: new THREE.MeshStandardMaterial({
color: 0x8a654a,
roughness: 1,
flatShading: true
}),
concrete: new THREE.MeshStandardMaterial({
color: 0xb8b8ac,
roughness: 0.88,
flatShading: true
}),
concreteDark: new THREE.MeshStandardMaterial({
color: 0x737d7b,
roughness: 0.92,
flatShading: true
}),
curb: new THREE.MeshStandardMaterial({
color: 0xc8c3b7,
roughness: 0.9,
flatShading: true
}),
base: new THREE.MeshStandardMaterial({
color: 0x17252e,
roughness: 0.72,
metalness: 0.18,
flatShading: true
}),
metal: new THREE.MeshStandardMaterial({
color: 0x3a4a51,
roughness: 0.38,
metalness: 0.78,
flatShading: true
}),
metalLight: new THREE.MeshStandardMaterial({
color: 0x8b9ba1,
roughness: 0.34,
metalness: 0.8,
flatShading: true
}),
marking: new THREE.MeshStandardMaterial({
color: 0xe7dfbd,
roughness: 0.86
}),
pipe: new THREE.MeshStandardMaterial({
color: 0x607982,
roughness: 0.56,
metalness: 0.36,
transparent: true,
opacity: 0.32,
depthWrite: false,
side: THREE.DoubleSide,
flatShading: true
}),
cutWall: new THREE.MeshStandardMaterial({
color: 0x82908d,
roughness: 0.9,
transparent: true,
opacity: 0.23,
depthWrite: false,
side: THREE.DoubleSide
}),
ghostSlab: new THREE.MeshStandardMaterial({
color: 0xc9c7bb,
roughness: 0.9,
transparent: true,
opacity: 0.14,
depthWrite: false
})
};
const hemisphere = new THREE.HemisphereLight(0xc9e9ff, 0x5a4434, 2.1);
scene.add(hemisphere);
const keyLight = new THREE.DirectionalLight(0xffffff, 3.0);
keyLight.position.set(-7, 13, 9);
keyLight.castShadow = true;
keyLight.shadow.mapSize.set(2048, 2048);
keyLight.shadow.camera.left = -14;
keyLight.shadow.camera.right = 14;
keyLight.shadow.camera.top = 12;
keyLight.shadow.camera.bottom = -12;
keyLight.shadow.camera.near = 1;
keyLight.shadow.camera.far = 35;
keyLight.shadow.normalBias = 0.035;
scene.add(keyLight);
const rimLight = new THREE.DirectionalLight(0x65dfff, 1.4);
rimLight.position.set(9, 6, -8);
scene.add(rimLight);
const warmLight = new THREE.PointLight(0xffa861, 18, 16, 2);
warmLight.position.set(-3, 4, 3);
scene.add(warmLight);
function box(w, h, d, x, y, z, material, parent = scene) {
const mesh = new THREE.Mesh(
new THREE.BoxGeometry(w, h, d),
material
);
mesh.position.set(x, y, z);
mesh.castShadow = !material.transparent;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
function addEdges(mesh, color = 0x0a1318, opacity = 0.48) {
const edges = new THREE.LineSegments(
new THREE.EdgesGeometry(mesh.geometry, 24),
new THREE.LineBasicMaterial({
color,
transparent: true,
opacity
})
);
edges.position.copy(mesh.position);
edges.rotation.copy(mesh.rotation);
edges.scale.copy(mesh.scale);
scene.add(edges);
return edges;
}
// Display base and ground.
const plinth = box(17.2, 0.68, 12.0, 0, -0.76, 0, materials.base);
addEdges(plinth, 0x66818b, 0.36);
const ground = new THREE.Mesh(
new THREE.PlaneGeometry(160, 160),
new THREE.MeshStandardMaterial({
color: 0x0c141a,
roughness: 1
})
);
ground.rotation.x = -Math.PI / 2;
ground.position.y = -1.12;
ground.receiveShadow = true;
scene.add(ground);
// Street foundation.
const roadFoundation = box(
9.4, 2.18, 10.3,
-3.3, 0.63, 0,
materials.soil
);
addEdges(roadFoundation);
// Asphalt has both cross-slope and a longitudinal fall toward the inlet.
const road = box(
9.4, 0.52, 10.3,
-3.3, 1.74, 0,
materials.asphalt
);
road.rotation.set(0.025, 0, -0.073);
addEdges(road);
// Subtle strata in the exposed earth face.
box(9.15, 0.10, 0.035, -3.3, 0.25, 5.17, materials.soilLight);
box(9.15, 0.08, 0.035, -3.3, 1.07, 5.17, materials.soilLight);
// Road markings, aligned to the sloped surface.
for (let z = -4.4; z <= 4.3; z += 1.65) {
const mark = box(
0.11, 0.025, 0.94,
-4.75, 2.11 - z * 0.025, z,
materials.marking
);
mark.rotation.set(0.025, 0, -0.073);
}
// Gutter channel.
const gutter = box(
1.18, 0.18, 10.25,
1.95, 1.52, 0,
materials.asphaltEdge
);
gutter.rotation.x = 0.025;
addEdges(gutter, 0x78939a, 0.24);
// Curb and sidewalk.
const curb = box(
0.24, 0.67, 10.34,
2.56, 1.80, 0,
materials.curb
);
curb.rotation.x = 0.025;
addEdges(curb, 0x596568, 0.38);
const sidewalkEarth = box(
5.3, 2.52, 6.82,
5.27, 0.80, -1.72,
materials.soil
);
addEdges(sidewalkEarth);
const sidewalk = box(
5.3, 0.25, 6.82,
5.27, 2.18, -1.72,
materials.curb
);
addEdges(sidewalk, 0x596568, 0.38);
// The front half of the sidewalk is ghosted to expose the pipe.
const ghostSidewalk = box(
5.3, 0.25, 3.45,
5.27, 2.18, 3.43,
materials.ghostSlab
);
ghostSidewalk.renderOrder = 1;
// Catch basin: bottom, back and left walls are solid.
const basinBottom = box(
1.48, 0.20, 1.88,
1.95, 0.16, 3.0,
materials.concreteDark
);
addEdges(basinBottom);
const basinBack = box(
1.48, 1.38, 0.16,
1.95, 0.86, 2.14,
materials.concrete
);
addEdges(basinBack);
const basinLeft = box(
0.16, 1.38, 1.78,
1.21, 0.86, 3.0,
materials.concrete
);
addEdges(basinLeft);
const basinRight = box(
0.16, 1.38, 1.78,
2.69, 0.86, 3.0,
materials.cutWall
);
addEdges(basinRight, 0xb9d3d8, 0.48);
// Low front curb leaves the interior visible.
box(
1.48, 0.24, 0.16,
1.95, 0.29, 3.88,
materials.concreteDark
);
// Dark inner back panel adds depth inside the basin.
box(
1.16, 1.12, 0.025,
1.95, 0.83, 2.235,
new THREE.MeshStandardMaterial({
color: 0x26343a,
roughness: 1
})
);
// Circular pipe penetration in the basin wall.
const penetration = new THREE.Mesh(
new THREE.TorusGeometry(0.45, 0.055, 6, 16),
materials.metal
);
penetration.position.set(2.78, 0.42, 3.0);
penetration.rotation.y = Math.PI / 2;
scene.add(penetration);
// Grate frame with a clear center inlet slot.
const grateY = 1.62;
const grateParts = [
box(0.10, 0.12, 1.86, 1.27, grateY, 3.0, materials.metal),
box(0.10, 0.12, 1.86, 2.63, grateY, 3.0, materials.metal),
box(1.46, 0.12, 0.10, 1.95, grateY, 2.12, materials.metal),
box(1.46, 0.12, 0.10, 1.95, grateY, 3.88, materials.metal)
];
grateParts.forEach(part => addEdges(part, 0x9eb0b5, 0.42));
for (const x of [1.43, 1.59, 1.75, 2.15, 2.31, 2.47]) {
const bar = box(
0.065, 0.09, 1.64,
x, grateY + 0.015, 3.0,
materials.metalLight
);
addEdges(bar, 0x101b20, 0.34);
}
// Translucent underground outlet pipe.
const pipe = new THREE.Mesh(
new THREE.CylinderGeometry(
0.47, 0.47, 5.55, 12, 1, true
),
materials.pipe
);
pipe.rotation.z = Math.PI / 2;
pipe.position.set(5.22, 0.42, 3.0);
pipe.renderOrder = 2;
scene.add(pipe);
// Pipe collars.
for (const x of [2.73, 4.65, 6.75, 7.92]) {
const collar = new THREE.Mesh(
new THREE.TorusGeometry(0.49, 0.055, 6, 12),
materials.metal
);
collar.position.set(x, 0.42, 3.0);
collar.rotation.y = Math.PI / 2;
collar.castShadow = true;
scene.add(collar);
}
// A small pipe cradle.
box(0.24, 0.20, 1.14, 5.10, -0.03, 3.0, materials.concreteDark);
// One continuous visible flow curve.
const flowCurve = new THREE.CatmullRomCurve3(
[
new THREE.Vector3(1.95, 1.79, -4.80),
new THREE.Vector3(1.95, 1.75, -1.90),
new THREE.Vector3(1.95, 1.69, 0.55),
new THREE.Vector3(1.95, 1.61, 2.42),
new THREE.Vector3(1.95, 1.48, 2.72),
new THREE.Vector3(1.95, 1.10, 2.90),
new THREE.Vector3(1.95, 0.62, 3.00),
new THREE.Vector3(2.34, 0.42, 3.00),
new THREE.Vector3(3.08, 0.42, 3.00),
new THREE.Vector3(5.25, 0.42, 3.00),
new THREE.Vector3(7.82, 0.42, 3.00)
],
false,
"catmullrom",
0.28
);
const flowMaterial = new THREE.MeshBasicMaterial({
color: 0x55ecff,
toneMapped: false,
depthTest: false,
depthWrite: false
});
const glowMaterial = new THREE.MeshBasicMaterial({
color: 0x35dfff,
transparent: true,
opacity: 0.19,
blending: THREE.AdditiveBlending,
depthTest: false,
depthWrite: false,
toneMapped: false
});
const flowGlow = new THREE.Mesh(
new THREE.TubeGeometry(flowCurve, 180, 0.17, 7, false),
glowMaterial
);
flowGlow.renderOrder = 4;
scene.add(flowGlow);
const flowCore = new THREE.Mesh(
new THREE.TubeGeometry(flowCurve, 180, 0.075, 7, false),
flowMaterial
);
flowCore.renderOrder = 5;
scene.add(flowCore);
// Directional arrowheads embedded in the same flow path.
const arrowMaterial = new THREE.MeshBasicMaterial({
color: 0xd9fbff,
toneMapped: false,
depthTest: false,
depthWrite: false
});
const arrowGeometry = new THREE.ConeGeometry(0.14, 0.38, 6);
const up = new THREE.Vector3(0, 1, 0);
for (const t of [0.10, 0.25, 0.40, 0.53, 0.67, 0.82, 0.94]) {
const arrow = new THREE.Mesh(arrowGeometry, arrowMaterial);
arrow.position.copy(flowCurve.getPointAt(t));
arrow.quaternion.setFromUnitVectors(
up,
flowCurve.getTangentAt(t).normalize()
);
arrow.renderOrder = 6;
scene.add(arrow);
}
// Moving highlights make the direction of flow obvious.
const particleGeometry = new THREE.IcosahedronGeometry(0.065, 0);
const particleMaterial = new THREE.MeshBasicMaterial({
color: 0xe4fdff,
toneMapped: false,
depthTest: false,
depthWrite: false
});
const particles = [];
for (let i = 0; i < 18; i++) {
const particle = new THREE.Mesh(
particleGeometry,
particleMaterial
);
particle.renderOrder = 7;
scene.add(particle);
particles.push(particle);
}
// A few low-poly rocks provide scale without competing with the system.
const rockMaterial = new THREE.MeshStandardMaterial({
color: 0x75675c,
roughness: 1,
flatShading: true
});
const rockData = [
[-6.9, 0.02, 4.85, 0.44],
[-5.9, -0.04, 4.95, 0.25],
[6.9, -0.37, 4.95, 0.34]
];
for (const [x, y, z, scale] of rockData) {
const rock = new THREE.Mesh(
new THREE.DodecahedronGeometry(scale, 0),
rockMaterial
);
rock.position.set(x, y, z);
rock.rotation.set(x, z, x * 0.7);
rock.castShadow = true;
rock.receiveShadow = true;
scene.add(rock);
}
// Direct camera controls implemented without addons.
const target = new THREE.Vector3(0.25, 0.82, 0.20);
let desiredYaw = 0.72;
let desiredPitch = 1.03;
let desiredDistance = 20.0;
let currentYaw = desiredYaw;
let currentPitch = desiredPitch;
let currentDistance = desiredDistance;
function updateCamera() {
const horizontal = Math.sin(currentPitch) * currentDistance;
camera.position.set(
target.x + horizontal * Math.sin(currentYaw),
target.y + Math.cos(currentPitch) * currentDistance,
target.z + horizontal * Math.cos(currentYaw)
);
camera.lookAt(target);
}
function resetCamera() {
desiredYaw = 0.72;
desiredPitch = 1.03;
desiredDistance = 20.0;
target.set(0.25, 0.82, 0.20);
}
let dragging = false;
let pointerX = 0;
let pointerY = 0;
renderer.domElement.addEventListener("pointerdown", event => {
dragging = true;
pointerX = event.clientX;
pointerY = event.clientY;
renderer.domElement.setPointerCapture(event.pointerId);
});
renderer.domElement.addEventListener("pointermove", event => {
if (!dragging) return;
const dx = event.clientX - pointerX;
const dy = event.clientY - pointerY;
pointerX = event.clientX;
pointerY = event.clientY;
desiredYaw -= dx * 0.006;
desiredPitch = THREE.MathUtils.clamp(
desiredPitch + dy * 0.005,
0.34,
1.42
);
});
function endDrag(event) {
dragging = false;
if (
event.pointerId !== undefined &&
renderer.domElement.hasPointerCapture(event.pointerId)
) {
renderer.domElement.releasePointerCapture(event.pointerId);
}
}
renderer.domElement.addEventListener("pointerup", endDrag);
renderer.domElement.addEventListener("pointercancel", endDrag);
renderer.domElement.addEventListener(
"wheel",
event => {
event.preventDefault();
desiredDistance = THREE.MathUtils.clamp(
desiredDistance + event.deltaY * 0.012,
11,
30
);
},
{ passive: false }
);
renderer.domElement.addEventListener("dblclick", resetCamera);
// Project HTML labels from their 3D anchor points.
const callouts = [
{
element: document.getElementById("callout-1"),
point: new THREE.Vector3(1.95, 1.74, -1.65),
offset: [-92, -9]
},
{
element: document.getElementById("callout-2"),
point: new THREE.Vector3(1.95, 1.72, 3.0),
offset: [38, -37]
},
{
element: document.getElementById("callout-3"),
point: new THREE.Vector3(1.95, 0.77, 3.02),
offset: [83, 24]
},
{
element: document.getElementById("callout-4"),
point: new THREE.Vector3(5.35, 0.53, 3.0),
offset: [16, -38]
}
];
const projected = new THREE.Vector3();
function updateCallouts() {
for (const item of callouts) {
projected.copy(item.point).project(camera);
if (projected.z < -1 || projected.z > 1) {
item.element.style.opacity = "0";
continue;
}
const x = (projected.x * 0.5 + 0.5) * innerWidth;
const y = (-projected.y * 0.5 + 0.5) * innerHeight;
item.element.style.left = `${x + item.offset[0]}px`;
item.element.style.top = `${y + item.offset[1]}px`;
item.element.style.opacity = "1";
}
}
function resize() {
camera.aspect = innerWidth / innerHeight;
camera.updateProjectionMatrix();
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.setSize(innerWidth, innerHeight);
}
addEventListener("resize", resize);
const clock = new THREE.Clock();
function animate() {
const elapsed = clock.getElapsedTime();
currentYaw += (desiredYaw - currentYaw) * 0.11;
currentPitch += (desiredPitch - currentPitch) * 0.11;
currentDistance += (desiredDistance - currentDistance) * 0.11;
updateCamera();
for (let i = 0; i < particles.length; i++) {
const t = (elapsed * 0.085 + i / particles.length) % 1;
particles[i].position.copy(flowCurve.getPointAt(t));
const pulse = 0.85 + Math.sin(elapsed * 6 + i) * 0.16;
particles[i].scale.setScalar(pulse);
}
flowGlow.material.opacity = 0.16 + Math.sin(elapsed * 3.1) * 0.035;
updateCallouts();
renderer.render(scene, camera);
}
updateCamera();
renderer.setAnimationLoop(animate);
</script>
</body>
</html>
```