Prompt specification
Build or customize the Three.js 3D scene "Cross-frame fabric hamper" 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: Cross-frame fabric hamper
Category: Everyday & Industrial · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/cross-frame-fabric-hamper-x0029
Scene Description Prompt:
Build a self-contained HTML scene with Three.js from cdnjs featuring a folding laundry hamper. Model a rectangular fabric bag supported by two crossed frames, exposing the side pivots and sewn corner sleeves; keep the open mouth clearly defined. Stylized solid forms.
Working Three.js Starter (cross-frame-fabric-hamper-x0029):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Folding Laundry Hamper</title>
<style>
:root {
color-scheme: light;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", sans-serif;
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #e9e3d8;
}
#scene {
position: fixed;
inset: 0;
}
canvas {
display: block;
width: 100%;
height: 100%;
touch-action: none;
cursor: grab;
}
canvas:active {
cursor: grabbing;
}
.title-card {
position: fixed;
top: 24px;
left: 24px;
z-index: 10;
padding: 15px 18px;
border: 1px solid rgba(60, 70, 68, 0.14);
border-radius: 16px;
background: rgba(250, 247, 240, 0.78);
box-shadow: 0 12px 35px rgba(58, 51, 43, 0.08);
backdrop-filter: blur(12px);
pointer-events: none;
}
.eyebrow {
margin: 0 0 4px;
color: #71827e;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.18em;
text-transform: uppercase;
}
h1 {
margin: 0;
color: #354744;
font-size: clamp(18px, 2.4vw, 25px);
font-weight: 700;
letter-spacing: -0.025em;
}
.subtitle {
margin: 5px 0 0;
color: #78827e;
font-size: 12px;
}
.controls {
position: fixed;
right: 22px;
bottom: 22px;
z-index: 10;
display: flex;
align-items: center;
gap: 12px;
padding: 9px 10px 9px 14px;
border: 1px solid rgba(60, 70, 68, 0.13);
border-radius: 999px;
background: rgba(250, 247, 240, 0.82);
box-shadow: 0 10px 30px rgba(58, 51, 43, 0.08);
backdrop-filter: blur(12px);
color: #64716d;
font-size: 12px;
}
button {
border: 0;
border-radius: 999px;
padding: 8px 13px;
background: #526b67;
color: white;
font: inherit;
font-size: 12px;
font-weight: 700;
cursor: pointer;
transition: transform 150ms ease, background 150ms ease;
}
button:hover {
background: #405a56;
transform: translateY(-1px);
}
button:active {
transform: translateY(0);
}
@media (max-width: 640px) {
.title-card {
top: 14px;
left: 14px;
padding: 12px 14px;
}
.subtitle {
display: none;
}
.controls {
right: 14px;
bottom: 14px;
}
.controls span {
display: none;
}
}
</style>
</head>
<body>
<main id="scene" aria-label="Interactive three-dimensional folding laundry hamper"></main>
<header class="title-card">
<p class="eyebrow">Dual X-Frame Laundry Hamper</p>
<h1>Fold / Frame</h1>
<p class="subtitle">Open fabric body, exposed pivots, reinforced sewn corners.</p>
</header>
<div class="controls">
<span>Drag to orbit · Scroll to zoom</span>
<button id="reset" type="button">Reset view</button>
</div>
<script type="module">
import * as THREE from
"https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
const host = document.querySelector("#scene");
const scene = new THREE.Scene();
scene.background = new THREE.Color("#e9e3d8");
scene.fog = new THREE.Fog("#e9e3d8", 9, 17);
const camera = new THREE.PerspectiveCamera(
36,
window.innerWidth / window.innerHeight,
0.1,
50
);
const renderer = new THREE.WebGLRenderer({
antialias: true,
alpha: false,
powerPreference: "high-performance"
});
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.08;
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
host.appendChild(renderer.domElement);
const target = new THREE.Vector3(0, 1.12, 0);
const view = {
yaw: 0.72,
pitch: 0.42,
radius: 6.7
};
const defaults = { ...view };
function updateCamera() {
const horizontal = Math.cos(view.pitch) * view.radius;
camera.position.set(
target.x + Math.sin(view.yaw) * horizontal,
target.y + Math.sin(view.pitch) * view.radius,
target.z + Math.cos(view.yaw) * horizontal
);
camera.lookAt(target);
}
updateCamera();
// Lighting
scene.add(new THREE.HemisphereLight("#fff9ed", "#8b9691", 2.05));
const keyLight = new THREE.DirectionalLight("#fff4dc", 3.3);
keyLight.position.set(4.5, 7.5, 5.2);
keyLight.castShadow = true;
keyLight.shadow.mapSize.set(2048, 2048);
keyLight.shadow.camera.left = -5;
keyLight.shadow.camera.right = 5;
keyLight.shadow.camera.top = 5;
keyLight.shadow.camera.bottom = -5;
keyLight.shadow.camera.near = 0.5;
keyLight.shadow.camera.far = 18;
keyLight.shadow.bias = -0.00035;
keyLight.shadow.normalBias = 0.025;
scene.add(keyLight);
const fillLight = new THREE.DirectionalLight("#b9d8db", 1.25);
fillLight.position.set(-5, 3.5, 2.5);
scene.add(fillLight);
const rimLight = new THREE.DirectionalLight("#ffd7a0", 1.05);
rimLight.position.set(1, 4, -5);
scene.add(rimLight);
// Procedural woven bump texture, keeping the page asset-free.
function makeFabricBumpTexture() {
const canvas = document.createElement("canvas");
canvas.width = canvas.height = 128;
const context = canvas.getContext("2d");
context.fillStyle = "#777777";
context.fillRect(0, 0, 128, 128);
for (let i = 0; i < 128; i += 4) {
context.fillStyle = i % 8 === 0 ? "#969696" : "#686868";
context.fillRect(i, 0, 1, 128);
context.fillStyle = i % 8 === 0 ? "#626262" : "#929292";
context.fillRect(0, i, 128, 1);
}
for (let i = 0; i < 650; i++) {
const value = 90 + Math.floor(Math.random() * 70);
context.fillStyle = `rgba(${value},${value},${value},0.18)`;
context.fillRect(
Math.random() * 128,
Math.random() * 128,
1,
1
);
}
const texture = new THREE.CanvasTexture(canvas);
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(5, 4);
return texture;
}
const fabricBump = makeFabricBumpTexture();
const fabricMaterial = new THREE.MeshStandardMaterial({
color: "#9fb9b5",
roughness: 0.96,
metalness: 0,
bumpMap: fabricBump,
bumpScale: 0.022,
side: THREE.DoubleSide
});
const sleeveMaterial = new THREE.MeshStandardMaterial({
color: "#718f8c",
roughness: 0.94,
metalness: 0,
bumpMap: fabricBump,
bumpScale: 0.018
});
const liningMaterial = new THREE.MeshStandardMaterial({
color: "#30484d",
roughness: 0.98,
metalness: 0,
side: THREE.DoubleSide
});
const rimMaterial = new THREE.MeshStandardMaterial({
color: "#6e8987",
roughness: 0.88,
metalness: 0
});
const stitchMaterial = new THREE.MeshStandardMaterial({
color: "#f1d7a5",
roughness: 0.82,
metalness: 0
});
const woodMaterial = new THREE.MeshStandardMaterial({
color: "#9b6948",
roughness: 0.65,
metalness: 0
});
const lightWoodMaterial = new THREE.MeshStandardMaterial({
color: "#b47d55",
roughness: 0.62,
metalness: 0
});
const hardwareMaterial = new THREE.MeshStandardMaterial({
color: "#374341",
roughness: 0.3,
metalness: 0.72
});
const brassMaterial = new THREE.MeshStandardMaterial({
color: "#d4aa68",
roughness: 0.32,
metalness: 0.58
});
const rubberMaterial = new THREE.MeshStandardMaterial({
color: "#3e4643",
roughness: 0.95,
metalness: 0
});
function superellipseRing(a, b, y, count = 64, power = 5) {
const points = [];
for (let i = 0; i < count; i++) {
const angle = (i / count) * Math.PI * 2;
const cosine = Math.cos(angle);
const sine = Math.sin(angle);
const exponent = 2 / power;
const x =
a *
Math.sign(cosine) *
Math.pow(Math.abs(cosine), exponent);
const z =
b *
Math.sign(sine) *
Math.pow(Math.abs(sine), exponent);
points.push(new THREE.Vector3(x, y, z));
}
return points;
}
function createWallGeometry(rings, inward = false) {
const count = 64;
const positions = [];
const uvs = [];
const indices = [];
rings.forEach((ring, ringIndex) => {
const points = superellipseRing(ring.a, ring.b, ring.y, count);
points.forEach((point, pointIndex) => {
positions.push(point.x, point.y, point.z);
uvs.push(pointIndex / count, ringIndex / (rings.length - 1));
});
});
for (let ringIndex = 0; ringIndex < rings.length - 1; ringIndex++) {
for (let i = 0; i < count; i++) {
const next = (i + 1) % count;
const a = ringIndex * count + i;
const b = ringIndex * count + next;
const c = (ringIndex + 1) * count + next;
const d = (ringIndex + 1) * count + i;
if (inward) {
indices.push(a, b, d, b, c, d);
} else {
indices.push(a, d, b, b, d, c);
}
}
}
const geometry = new THREE.BufferGeometry();
geometry.setAttribute(
"position",
new THREE.Float32BufferAttribute(positions, 3)
);
geometry.setAttribute("uv", new THREE.Float32BufferAttribute(uvs, 2));
geometry.setIndex(indices);
geometry.computeVertexNormals();
return geometry;
}
function createFloorGeometry(a, b, y, upward = true) {
const count = 64;
const points = superellipseRing(a, b, y, count);
const positions = [0, y, 0];
const uvs = [0.5, 0.5];
const indices = [];
points.forEach((point, index) => {
positions.push(point.x, point.y, point.z);
uvs.push(
0.5 + point.x / (2 * a),
0.5 + point.z / (2 * b)
);
});
for (let i = 0; i < count; i++) {
const next = (i + 1) % count;
if (upward) {
indices.push(0, next + 1, i + 1);
} else {
indices.push(0, i + 1, next + 1);
}
}
const geometry = new THREE.BufferGeometry();
geometry.setAttribute(
"position",
new THREE.Float32BufferAttribute(positions, 3)
);
geometry.setAttribute("uv", new THREE.Float32BufferAttribute(uvs, 2));
geometry.setIndex(indices);
geometry.computeVertexNormals();
return geometry;
}
function createTopBridgeGeometry(outerA, outerB, innerA, innerB, y) {
const count = 64;
const outer = superellipseRing(outerA, outerB, y, count);
const inner = superellipseRing(innerA, innerB, y, count);
const positions = [];
const uvs = [];
const indices = [];
[...outer, ...inner].forEach((point, index) => {
positions.push(point.x, point.y, point.z);
uvs.push((index % count) / count, index < count ? 0 : 1);
});
for (let i = 0; i < count; i++) {
const next = (i + 1) % count;
const a = i;
const b = next;
const c = count + next;
const d = count + i;
indices.push(a, d, b, b, d, c);
}
const geometry = new THREE.BufferGeometry();
geometry.setAttribute(
"position",
new THREE.Float32BufferAttribute(positions, 3)
);
geometry.setAttribute("uv", new THREE.Float32BufferAttribute(uvs, 2));
geometry.setIndex(indices);
geometry.computeVertexNormals();
return geometry;
}
// Tapered and softly bulged fabric body.
const outerWall = new THREE.Mesh(
createWallGeometry([
{ a: 0.8, b: 0.56, y: 0.4 },
{ a: 0.92, b: 0.67, y: 1.13 },
{ a: 1.04, b: 0.74, y: 2.05 }
]),
fabricMaterial
);
outerWall.castShadow = true;
outerWall.receiveShadow = true;
scene.add(outerWall);
const innerWall = new THREE.Mesh(
createWallGeometry(
[
{ a: 0.76, b: 0.52, y: 0.5 },
{ a: 0.89, b: 0.63, y: 1.13 },
{ a: 0.985, b: 0.685, y: 2.05 }
],
true
),
liningMaterial
);
innerWall.receiveShadow = true;
scene.add(innerWall);
const innerFloor = new THREE.Mesh(
createFloorGeometry(0.76, 0.52, 0.5, true),
liningMaterial
);
innerFloor.receiveShadow = true;
scene.add(innerFloor);
const underside = new THREE.Mesh(
createFloorGeometry(0.8, 0.56, 0.4, false),
fabricMaterial
);
underside.castShadow = true;
scene.add(underside);
const topBridge = new THREE.Mesh(
createTopBridgeGeometry(1.04, 0.74, 0.985, 0.685, 2.05),
fabricMaterial
);
topBridge.castShadow = true;
scene.add(topBridge);
// Rounded lip makes the open mouth unmistakable.
const lipPoints = superellipseRing(1.012, 0.712, 2.063);
const lipCurve = new THREE.CatmullRomCurve3(
lipPoints,
true,
"catmullrom",
0.12
);
const lip = new THREE.Mesh(
new THREE.TubeGeometry(lipCurve, 128, 0.047, 10, true),
rimMaterial
);
lip.castShadow = true;
scene.add(lip);
// Fine dashed topstitching around the mouth.
const rimStitchPoints = superellipseRing(
1.012,
0.712,
2.107
);
rimStitchPoints.push(rimStitchPoints[0].clone());
const rimStitch = new THREE.Line(
new THREE.BufferGeometry().setFromPoints(rimStitchPoints),
new THREE.LineDashedMaterial({
color: "#efd6a5",
dashSize: 0.052,
gapSize: 0.034,
transparent: true,
opacity: 0.88
})
);
rimStitch.computeLineDistances();
scene.add(rimStitch);
// Subtle center seam on the front fabric panel.
const centerSeamPoints = [];
for (let i = 0; i <= 18; i++) {
const t = i / 18;
const y = 0.47 + t * 1.54;
let b;
if (y <= 1.13) {
const local = (y - 0.4) / (1.13 - 0.4);
b = THREE.MathUtils.lerp(0.56, 0.67, local);
} else {
const local = (y - 1.13) / (2.05 - 1.13);
b = THREE.MathUtils.lerp(0.67, 0.74, local);
}
centerSeamPoints.push(new THREE.Vector3(0, y, b + 0.009));
}
const centerSeam = new THREE.Line(
new THREE.BufferGeometry().setFromPoints(centerSeamPoints),
new THREE.LineBasicMaterial({
color: "#6d8987",
transparent: true,
opacity: 0.58
})
);
scene.add(centerSeam);
function rodBetween(start, end, radius, material) {
const direction = new THREE.Vector3().subVectors(end, start);
const length = direction.length();
const mesh = new THREE.Mesh(
new THREE.CylinderGeometry(radius, radius, length, 18),
material
);
mesh.position.copy(start).add(end).multiplyScalar(0.5);
mesh.quaternion.setFromUnitVectors(
new THREE.Vector3(0, 1, 0),
direction.normalize()
);
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add(mesh);
return mesh;
}
function roundedEnd(position, radius, material) {
const mesh = new THREE.Mesh(
new THREE.SphereGeometry(radius, 16, 10),
material
);
mesh.position.copy(position);
mesh.castShadow = true;
scene.add(mesh);
return mesh;
}
// Two crossed side frames.
const sideXs = [-1.16, 1.16];
const bottomY = 0.18;
const topY = 2.06;
const frameZ = 0.78;
sideXs.forEach((x) => {
const diagonalAStart = new THREE.Vector3(x, bottomY, -frameZ);
const diagonalAEnd = new THREE.Vector3(x, topY, frameZ);
const diagonalBStart = new THREE.Vector3(x, bottomY, frameZ);
const diagonalBEnd = new THREE.Vector3(x, topY, -frameZ);
rodBetween(diagonalAStart, diagonalAEnd, 0.062, woodMaterial);
rodBetween(diagonalBStart, diagonalBEnd, 0.062, lightWoodMaterial);
[diagonalAStart, diagonalAEnd, diagonalBStart, diagonalBEnd].forEach(
(point) => roundedEnd(point, 0.063, woodMaterial)
);
// Rubber feet.
[diagonalAStart, diagonalBStart].forEach((point) => {
const foot = new THREE.Mesh(
new THREE.SphereGeometry(0.105, 18, 12),
rubberMaterial
);
foot.position.set(point.x, 0.095, point.z);
foot.scale.y = 0.7;
foot.castShadow = true;
scene.add(foot);
});
// Side pivot assembly remains outside the fabric.
const sign = Math.sign(x);
const pivotY = (bottomY + topY) * 0.5;
const washer = new THREE.Mesh(
new THREE.CylinderGeometry(0.19, 0.19, 0.09, 32),
hardwareMaterial
);
washer.rotation.z = Math.PI * 0.5;
washer.position.set(sign * 1.225, pivotY, 0);
washer.castShadow = true;
scene.add(washer);
const pivotHub = new THREE.Mesh(
new THREE.CylinderGeometry(0.145, 0.145, 0.13, 32),
brassMaterial
);
pivotHub.rotation.z = Math.PI * 0.5;
pivotHub.position.set(sign * 1.285, pivotY, 0);
pivotHub.castShadow = true;
scene.add(pivotHub);
const bolt = new THREE.Mesh(
new THREE.CylinderGeometry(0.076, 0.076, 0.085, 28),
hardwareMaterial
);
bolt.rotation.z = Math.PI * 0.5;
bolt.position.set(sign * 1.365, pivotY, 0);
bolt.castShadow = true;
scene.add(bolt);
const boltSlot = new THREE.Mesh(
new THREE.BoxGeometry(0.012, 0.018, 0.092),
rubberMaterial
);
boltSlot.position.set(sign * 1.411, pivotY, 0);
scene.add(boltSlot);
});
// Longitudinal rails joining the two X-frames.
[-frameZ, frameZ].forEach((z) => {
rodBetween(
new THREE.Vector3(-1.16, topY, z),
new THREE.Vector3(1.16, topY, z),
0.073,
woodMaterial
);
});
[-0.59, 0.59].forEach((z) => {
rodBetween(
new THREE.Vector3(-1.16, 0.32, z),
new THREE.Vector3(1.16, 0.32, z),
0.058,
lightWoodMaterial
);
});
function createRoundedRectShape(width, height, radius) {
const shape = new THREE.Shape();
const left = -width / 2;
const right = width / 2;
const bottom = -height / 2;
const top = height / 2;
shape.moveTo(left + radius, bottom);
shape.lineTo(right - radius, bottom);
shape.quadraticCurveTo(right, bottom, right, bottom + radius);
shape.lineTo(right, top - radius);
shape.quadraticCurveTo(right, top, right - radius, top);
shape.lineTo(left + radius, top);
shape.quadraticCurveTo(left, top, left, top - radius);
shape.lineTo(left, bottom + radius);
shape.quadraticCurveTo(left, bottom, left + radius, bottom);
return shape;
}
const patchGeometry = new THREE.ExtrudeGeometry(
createRoundedRectShape(0.31, 0.38, 0.075),
{
depth: 0.035,
bevelEnabled: true,
bevelThickness: 0.009,
bevelSize: 0.009,
bevelSegments: 2,
curveSegments: 10,
steps: 1
}
);
const stitchGeometry = new THREE.BoxGeometry(0.032, 0.009, 0.008);
function addCornerSleeve(xSign, zSign) {
const group = new THREE.Group();
group.position.set(xSign * 0.93, 1.85, zSign * 0.705);
if (zSign < 0) group.rotation.y = Math.PI;
const patch = new THREE.Mesh(patchGeometry, sleeveMaterial);
patch.castShadow = true;
patch.receiveShadow = true;
group.add(patch);
// Vertical rows of visible hand-sewn stitches.
[-0.115, 0.115].forEach((localX) => {
for (let y = -0.13; y <= 0.131; y += 0.061) {
const stitch = new THREE.Mesh(stitchGeometry, stitchMaterial);
stitch.position.set(localX, y, 0.049);
group.add(stitch);
}
});
// Bottom row of stitches.
for (let x = -0.1; x <= 0.101; x += 0.05) {
const stitch = new THREE.Mesh(stitchGeometry, stitchMaterial);
stitch.position.set(x, -0.148, 0.049);
group.add(stitch);
}
scene.add(group);
// Fabric wraps visibly over the upper rail at each corner.
const railWrap = new THREE.Mesh(
new THREE.CapsuleGeometry(0.105, 0.2, 5, 16),
sleeveMaterial
);
railWrap.rotation.z = Math.PI * 0.5;
railWrap.position.set(xSign * 0.92, 2.065, zSign * frameZ);
railWrap.castShadow = true;
scene.add(railWrap);
}
[-1, 1].forEach((xSign) => {
[-1, 1].forEach((zSign) => {
addCornerSleeve(xSign, zSign);
});
});
// Ground and a simple woven mat.
const floor = new THREE.Mesh(
new THREE.PlaneGeometry(30, 30),
new THREE.MeshStandardMaterial({
color: "#e6ded1",
roughness: 1,
metalness: 0
})
);
floor.rotation.x = -Math.PI * 0.5;
floor.position.y = -0.012;
floor.receiveShadow = true;
scene.add(floor);
const mat = new THREE.Mesh(
new THREE.CylinderGeometry(2.12, 2.12, 0.055, 72),
new THREE.MeshStandardMaterial({
color: "#d3c5af",
roughness: 0.98,
metalness: 0
})
);
mat.position.y = 0.014;
mat.receiveShadow = true;
scene.add(mat);
// Direct camera controls: no addons or external controls module.
let dragging = false;
let pointerX = 0;
let pointerY = 0;
const canvas = renderer.domElement;
canvas.addEventListener("pointerdown", (event) => {
dragging = true;
pointerX = event.clientX;
pointerY = event.clientY;
canvas.setPointerCapture(event.pointerId);
});
canvas.addEventListener("pointermove", (event) => {
if (!dragging) return;
const deltaX = event.clientX - pointerX;
const deltaY = event.clientY - pointerY;
pointerX = event.clientX;
pointerY = event.clientY;
view.yaw -= deltaX * 0.006;
view.pitch = THREE.MathUtils.clamp(
view.pitch + deltaY * 0.005,
0.08,
1.08
);
updateCamera();
});
function endDrag(event) {
dragging = false;
if (event.pointerId !== undefined && canvas.hasPointerCapture(event.pointerId)) {
canvas.releasePointerCapture(event.pointerId);
}
}
canvas.addEventListener("pointerup", endDrag);
canvas.addEventListener("pointercancel", endDrag);
canvas.addEventListener(
"wheel",
(event) => {
event.preventDefault();
view.radius = THREE.MathUtils.clamp(
view.radius + event.deltaY * 0.004,
4.25,
9.2
);
updateCamera();
},
{ passive: false }
);
canvas.addEventListener("dblclick", () => {
Object.assign(view, defaults);
updateCamera();
});
document.querySelector("#reset").addEventListener("click", () => {
Object.assign(view, defaults);
updateCamera();
});
window.addEventListener("resize", () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
});
function animate() {
requestAnimationFrame(animate);
renderer.render(scene, camera);
}
animate();
</script>
</body>
</html>
```