Prompt specification
Build or customize the Three.js 3D scene "Salt slab and wrapped trade bundle" 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: Salt slab and wrapped trade bundle
Category: Art & Culture · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/salt-slab-and-wrapped-trade-bundle-x2633
Scene Description Prompt:
Build a self-contained HTML scene with Three.js from cdnjs featuring supplies for a trans-Saharan salt route. Display a salt slab, water container, and wrapped bundle on a desert-route base. Label each object's role without treating all historical trade as a two-good barter system. Stylized solid forms.
Working Three.js Starter (salt-slab-and-wrapped-trade-bundle-x2633):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trans-Saharan Route Supplies</title>
<style>
:root {
color-scheme: light;
--ink: #3f261d;
--muted: #75584a;
--accent: #a64f2f;
--paper: rgba(255, 248, 235, 0.92);
--line: rgba(98, 57, 39, 0.22);
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background:
radial-gradient(circle at 68% 20%, rgba(255, 244, 207, 0.95), transparent 36%),
linear-gradient(145deg, #efd19b 0%, #d99a61 58%, #b86d49 100%);
color: var(--ink);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#scene {
position: fixed;
inset: 0;
}
canvas {
display: block;
width: 100%;
height: 100%;
outline: none;
touch-action: none;
}
.intro {
position: fixed;
top: 26px;
left: 28px;
z-index: 10;
width: min(350px, calc(100vw - 56px));
pointer-events: none;
text-shadow: 0 1px 18px rgba(255, 241, 210, 0.55);
}
.eyebrow {
margin: 0 0 7px;
color: #8c3f27;
font-size: 11px;
font-weight: 800;
letter-spacing: 0.18em;
text-transform: uppercase;
}
h1 {
margin: 0;
font-family: Georgia, "Times New Roman", serif;
font-size: clamp(31px, 3.3vw, 49px);
font-weight: 500;
line-height: 0.98;
letter-spacing: -0.035em;
}
.subtitle {
max-width: 325px;
margin: 11px 0 0;
color: #654535;
font-size: 13px;
line-height: 1.45;
}
.controls {
position: fixed;
top: 24px;
right: 24px;
z-index: 20;
display: flex;
gap: 8px;
}
button {
appearance: none;
border: 1px solid var(--line);
border-radius: 999px;
padding: 9px 13px;
background: rgba(255, 248, 235, 0.88);
box-shadow: 0 5px 20px rgba(80, 40, 25, 0.12);
color: var(--ink);
cursor: pointer;
font: 600 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
backdrop-filter: blur(10px);
}
button:hover {
background: #fff9ed;
transform: translateY(-1px);
}
button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 3px;
}
#labels {
position: fixed;
inset: 0;
z-index: 8;
pointer-events: none;
transition: opacity 180ms ease, visibility 180ms ease;
}
#labels.hidden {
opacity: 0;
visibility: hidden;
}
.callout {
position: absolute;
width: 218px;
padding: 10px 12px 11px;
border: 1px solid rgba(97, 55, 36, 0.25);
border-radius: 12px;
background: var(--paper);
box-shadow: 0 9px 28px rgba(73, 38, 23, 0.16);
transform: translate(-50%, -100%);
backdrop-filter: blur(10px);
}
.callout::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
height: 19px;
border-left: 1px solid rgba(97, 55, 36, 0.55);
}
.callout .tag {
display: block;
margin-bottom: 3px;
color: var(--accent);
font-size: 9px;
font-weight: 800;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.callout strong {
display: block;
font-family: Georgia, "Times New Roman", serif;
font-size: 17px;
font-weight: 600;
line-height: 1.1;
}
.callout .role {
display: block;
margin-top: 4px;
color: var(--muted);
font-size: 11.5px;
line-height: 1.35;
}
.context {
position: fixed;
right: 24px;
bottom: 24px;
z-index: 12;
width: min(365px, calc(100vw - 48px));
padding: 14px 16px 15px;
border: 1px solid var(--line);
border-radius: 14px;
background: rgba(255, 248, 235, 0.88);
box-shadow: 0 10px 35px rgba(74, 38, 24, 0.15);
backdrop-filter: blur(12px);
pointer-events: none;
}
.context h2 {
margin: 0 0 5px;
color: var(--accent);
font-size: 10px;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.context p {
margin: 0;
color: #624638;
font-size: 12px;
line-height: 1.48;
}
.instructions {
position: fixed;
left: 24px;
bottom: 24px;
z-index: 12;
padding: 8px 11px;
border-radius: 999px;
background: rgba(255, 248, 235, 0.72);
color: #6d4c3c;
font-size: 11px;
backdrop-filter: blur(8px);
pointer-events: none;
}
@media (max-width: 720px) {
.intro {
top: 14px;
left: 14px;
width: 225px;
}
h1 {
font-size: 29px;
}
.subtitle {
display: none;
}
.controls {
top: 12px;
right: 12px;
flex-direction: column;
align-items: flex-end;
}
button {
padding: 8px 10px;
font-size: 11px;
}
.callout {
width: 165px;
padding: 7px 9px 8px;
}
.callout strong {
font-size: 15px;
}
.callout .role {
font-size: 10px;
}
.context {
right: 12px;
bottom: 12px;
width: min(330px, calc(100vw - 24px));
padding: 10px 12px;
}
.context p {
font-size: 11px;
}
.instructions {
display: none;
}
}
</style>
</head>
<body>
<main id="scene" aria-label="Interactive Three.js scene of supplies on a trans-Saharan salt route"></main>
<header class="intro">
<p class="eyebrow">Trans-Saharan route study</p>
<h1>Supplies for the desert road</h1>
<p class="subtitle">Cargo, provisions, and daily necessities within a much wider caravan network.</p>
</header>
<nav class="controls" aria-label="Scene controls">
<button id="resetView" type="button" title="Reset camera (R)">Reset view</button>
<button id="toggleLabels" type="button" aria-pressed="true">Labels on</button>
</nav>
<div id="labels" aria-live="polite">
<div class="callout" data-anchor="salt">
<span class="tag">01 · Cargo</span>
<strong>Salt slab</strong>
<span class="role">Compact, durable cargo; salt was valuable, but trade involved many other goods.</span>
</div>
<div class="callout" data-anchor="water">
<span class="tag">02 · Necessity</span>
<strong>Water container</strong>
<span class="role">A practical supply for travelers and pack animals, replenished along the journey.</span>
</div>
<div class="callout" data-anchor="bundle">
<span class="tag">03 · Provisions / cargo</span>
<strong>Wrapped bundle</strong>
<span class="role">Protected food or textiles supporting daily life and caravan exchange.</span>
</div>
</div>
<aside class="context">
<h2>Historical framing</h2>
<p>
Trans-Saharan trade was not a simple two-good barter system. Long-distance routes
moved salt alongside textiles, gold, food, medicines, manuscripts, and ideas.
</p>
</aside>
<div class="instructions">Drag to orbit · Scroll to zoom · Arrow keys to adjust · R to reset</div>
<script type="module">
import * as THREE from "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
const sceneHost = document.getElementById("scene");
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(42, innerWidth / innerHeight, 0.1, 100);
const renderer = new THREE.WebGLRenderer({
antialias: true,
alpha: true,
powerPreference: "high-performance"
});
renderer.setClearColor(0x000000, 0);
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.setSize(innerWidth, innerHeight);
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.06;
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
sceneHost.appendChild(renderer.domElement);
renderer.domElement.tabIndex = 0;
renderer.domElement.setAttribute(
"aria-label",
"A stylized desert-route diorama. Drag to orbit and scroll to zoom."
);
const material = (color, options = {}) =>
new THREE.MeshStandardMaterial({
color,
roughness: 0.86,
metalness: 0,
flatShading: true,
...options
});
const sandMat = material(0xd79a60);
const paleSandMat = material(0xe7b979);
const saltMat = material(0xfff4d8, { roughness: 0.98 });
const saltEdgeMat = material(0xe8ddbf, { roughness: 1 });
const clayMat = material(0xb85e38, { roughness: 0.9 });
const clayDarkMat = material(0x783b2b);
const clothMat = material(0x98603e);
const clothDarkMat = material(0x70442f);
const ropeMat = material(0xc7a36a);
const waterMat = material(0x315f65, { roughness: 0.28, metalness: 0.05 });
const routeMat = material(0xa76642);
// Soft shadow-catching ground beneath the floating diorama.
const shadowPlane = new THREE.Mesh(
new THREE.PlaneGeometry(50, 50),
new THREE.ShadowMaterial({ color: 0x4d281c, opacity: 0.23 })
);
shadowPlane.rotation.x = -Math.PI / 2;
shadowPlane.position.y = -0.49;
shadowPlane.receiveShadow = true;
scene.add(shadowPlane);
// Irregular low-poly desert-route base.
const baseShape = new THREE.Shape();
baseShape.moveTo(-6.0, -1.8);
baseShape.lineTo(-4.7, -2.65);
baseShape.lineTo(-1.7, -2.5);
baseShape.lineTo(0.6, -2.85);
baseShape.lineTo(3.6, -2.55);
baseShape.lineTo(5.9, -1.65);
baseShape.lineTo(5.65, 0.45);
baseShape.lineTo(4.3, 1.55);
baseShape.lineTo(1.4, 1.75);
baseShape.lineTo(-1.3, 2.35);
baseShape.lineTo(-4.3, 1.8);
baseShape.lineTo(-5.8, 0.5);
baseShape.closePath();
const baseGeometry = new THREE.ExtrudeGeometry(baseShape, {
depth: 0.38,
bevelEnabled: true,
bevelSegments: 1,
steps: 1,
bevelSize: 0.12,
bevelThickness: 0.1,
curveSegments: 1
});
baseGeometry.rotateX(-Math.PI / 2);
const base = new THREE.Mesh(baseGeometry, sandMat);
base.position.y = -0.36;
base.castShadow = true;
base.receiveShadow = true;
scene.add(base);
// A visible route crossing the sand.
const routeCurve = new THREE.CatmullRomCurve3([
new THREE.Vector3(-5.35, 0.145, 1.72),
new THREE.Vector3(-3.65, 0.145, 1.25),
new THREE.Vector3(-1.7, 0.145, 0.52),
new THREE.Vector3(0.35, 0.145, -0.18),
new THREE.Vector3(2.7, 0.145, 0.08),
new THREE.Vector3(5.25, 0.145, -0.92)
]);
const route = new THREE.Mesh(
new THREE.TubeGeometry(routeCurve, 72, 0.025, 6, false),
routeMat
);
route.receiveShadow = true;
scene.add(route);
// Small waypoint stones provide scale and reinforce the caravan route.
for (let i = 0; i < 16; i++) {
const t = i / 15;
const p = routeCurve.getPointAt(t);
const stone = new THREE.Mesh(
new THREE.DodecahedronGeometry(0.075 + 0.025 * Math.sin(i * 2.1), 0),
i % 3 === 0 ? clayDarkMat : paleSandMat
);
stone.position.set(p.x, 0.2, p.z + 0.1);
stone.scale.set(1.4, 0.55, 0.9);
stone.rotation.set(i * 0.4, i * 0.7, i * 0.2);
stone.castShadow = true;
stone.receiveShadow = true;
scene.add(stone);
}
// Low dunes around the edges of the base.
const duneData = [
[-4.65, 0.17, 1.18, 1.1, 0.42, 0.7],
[4.55, 0.15, -1.45, 1.15, 0.48, 0.82],
[-0.4, 0.12, -2.15, 0.85, 0.33, 0.62]
];
duneData.forEach(([x, y, z, sx, sy, sz]) => {
const dune = new THREE.Mesh(
new THREE.SphereGeometry(1, 12, 6),
paleSandMat
);
dune.position.set(x, y, z);
dune.scale.set(sx, sy, sz);
dune.castShadow = true;
dune.receiveShadow = true;
scene.add(dune);
});
// 1. Salt slab.
const saltGroup = new THREE.Group();
saltGroup.position.set(2.72, 0.13, -0.35);
saltGroup.rotation.y = 0.14;
const saltShape = new THREE.Shape();
saltShape.moveTo(-1.05, -0.56);
saltShape.lineTo(0.82, -0.64);
saltShape.lineTo(1.08, -0.22);
saltShape.lineTo(0.95, 0.55);
saltShape.lineTo(-0.75, 0.64);
saltShape.lineTo(-1.12, 0.18);
saltShape.closePath();
const saltGeometry = new THREE.ExtrudeGeometry(saltShape, {
depth: 0.3,
bevelEnabled: true,
bevelSegments: 1,
steps: 1,
bevelSize: 0.06,
bevelThickness: 0.06,
curveSegments: 1
});
saltGeometry.rotateX(-Math.PI / 2);
const saltSlab = new THREE.Mesh(saltGeometry, saltMat);
saltSlab.castShadow = true;
saltSlab.receiveShadow = true;
saltGroup.add(saltSlab);
// A few crystalline chips emphasize the slab's material.
[
[-0.62, 0.44, 0.22, 0.12],
[0.38, 0.43, -0.18, 0.09],
[0.72, 0.42, 0.28, 0.07],
[-0.08, 0.43, -0.43, 0.08]
].forEach(([x, y, z, size]) => {
const chip = new THREE.Mesh(
new THREE.IcosahedronGeometry(size, 0),
saltEdgeMat
);
chip.position.set(x, y, z);
chip.rotation.set(x * 3, z * 4, x + z);
chip.castShadow = true;
saltGroup.add(chip);
});
scene.add(saltGroup);
// 2. Terracotta water vessel.
const waterGroup = new THREE.Group();
waterGroup.position.set(-2.72, 0.13, -0.65);
const vesselProfile = [
new THREE.Vector2(0.00, 0.00),
new THREE.Vector2(0.34, 0.05),
new THREE.Vector2(0.56, 0.20),
new THREE.Vector2(0.70, 0.58),
new THREE.Vector2(0.65, 1.00),
new THREE.Vector2(0.48, 1.35),
new THREE.Vector2(0.27, 1.55),
new THREE.Vector2(0.23, 1.84),
new THREE.Vector2(0.34, 1.88),
new THREE.Vector2(0.34, 2.02)
];
const vessel = new THREE.Mesh(
new THREE.LatheGeometry(vesselProfile, 14),
clayMat
);
vessel.castShadow = true;
vessel.receiveShadow = true;
waterGroup.add(vessel);
// Decorative vessel bands.
[
[0.76, 0.66, 0.035],
[1.43, 0.37, 0.032]
].forEach(([y, radius, tube]) => {
const band = new THREE.Mesh(
new THREE.TorusGeometry(radius, tube, 6, 24),
clayDarkMat
);
band.rotation.x = Math.PI / 2;
band.position.y = y;
band.castShadow = true;
waterGroup.add(band);
});
const rim = new THREE.Mesh(
new THREE.TorusGeometry(0.34, 0.055, 6, 24),
clayDarkMat
);
rim.rotation.x = Math.PI / 2;
rim.position.y = 2.0;
rim.castShadow = true;
waterGroup.add(rim);
// Rounded handles on either side of the vessel.
[-1, 1].forEach(side => {
const handle = new THREE.Mesh(
new THREE.TorusGeometry(0.35, 0.065, 6, 20),
clayDarkMat
);
handle.position.set(side * 0.56, 1.18, 0);
handle.scale.x = 0.7;
handle.castShadow = true;
waterGroup.add(handle);
});
const waterSurface = new THREE.Mesh(
new THREE.CircleGeometry(0.225, 24),
waterMat
);
waterSurface.rotation.x = -Math.PI / 2;
waterSurface.position.y = 1.88;
waterGroup.add(waterSurface);
scene.add(waterGroup);
// 3. Wrapped cloth bundle.
const bundleGroup = new THREE.Group();
bundleGroup.position.set(0.12, 0.13, 1.56);
bundleGroup.rotation.y = -0.2;
const bundleCore = new THREE.Mesh(
new THREE.DodecahedronGeometry(1, 1),
clothMat
);
bundleCore.position.y = 0.7;
bundleCore.scale.set(1.0, 0.72, 0.8);
bundleCore.castShadow = true;
bundleCore.receiveShadow = true;
bundleGroup.add(bundleCore);
// Crossing ropes make the parcel read as wrapped and tied.
const horizontalRope = new THREE.Mesh(
new THREE.TorusGeometry(1.03, 0.038, 6, 32),
ropeMat
);
horizontalRope.rotation.x = Math.PI / 2;
horizontalRope.position.y = 0.7;
horizontalRope.scale.set(0.91, 0.75, 1);
horizontalRope.castShadow = true;
bundleGroup.add(horizontalRope);
const verticalRope = new THREE.Mesh(
new THREE.TorusGeometry(0.74, 0.038, 6, 28),
ropeMat
);
verticalRope.rotation.y = Math.PI / 2;
verticalRope.position.y = 0.7;
verticalRope.scale.set(0.76, 0.93, 1);
verticalRope.castShadow = true;
bundleGroup.add(verticalRope);
const knot = new THREE.Mesh(
new THREE.DodecahedronGeometry(0.15, 0),
clothDarkMat
);
knot.position.set(0, 0.72, 0.79);
knot.scale.set(1, 0.7, 0.65);
knot.rotation.z = 0.25;
knot.castShadow = true;
bundleGroup.add(knot);
const clothTail = new THREE.Mesh(
new THREE.BoxGeometry(0.16, 0.43, 0.055),
clothDarkMat
);
clothTail.position.set(0.04, 0.56, 0.85);
clothTail.rotation.z = -0.32;
clothTail.castShadow = true;
bundleGroup.add(clothTail);
scene.add(bundleGroup);
// Warm desert lighting with a cooler fill for readable solid forms.
scene.add(new THREE.HemisphereLight(0xfff0cb, 0x8c5136, 2.0));
const sun = new THREE.DirectionalLight(0xffe1aa, 3.25);
sun.position.set(5.5, 9, 4.5);
sun.castShadow = true;
sun.shadow.mapSize.set(2048, 2048);
sun.shadow.camera.left = -8;
sun.shadow.camera.right = 8;
sun.shadow.camera.top = 7;
sun.shadow.camera.bottom = -7;
sun.shadow.camera.near = 0.5;
sun.shadow.camera.far = 30;
sun.shadow.bias = -0.00035;
scene.add(sun);
const fill = new THREE.DirectionalLight(0xaac8cc, 0.75);
fill.position.set(-6, 4, -5);
scene.add(fill);
// Camera and direct orbit controls, implemented without add-ons.
const cameraTarget = new THREE.Vector3(0, 0.72, 0);
let yaw = 0.64;
let pitch = 0.50;
let radius = 11.6;
let desiredYaw = yaw;
let desiredPitch = pitch;
let desiredRadius = radius;
function updateCamera() {
const horizontal = Math.sin(pitch) * radius;
camera.position.set(
cameraTarget.x + horizontal * Math.sin(yaw),
cameraTarget.y + Math.cos(pitch) * radius,
cameraTarget.z + horizontal * Math.cos(yaw)
);
camera.lookAt(cameraTarget);
}
function resetView() {
desiredYaw = 0.64;
desiredPitch = 0.50;
desiredRadius = 11.6;
}
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.focus({ preventScroll: true });
});
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.0045,
0.22,
1.05
);
});
function endDrag(event) {
dragging = false;
if (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();
desiredRadius = THREE.MathUtils.clamp(
desiredRadius * Math.exp(event.deltaY * 0.001),
7.2,
18
);
}, { passive: false });
renderer.domElement.addEventListener("dblclick", resetView);
window.addEventListener("keydown", event => {
const key = event.key.toLowerCase();
if (key === "arrowleft") desiredYaw += 0.12;
else if (key === "arrowright") desiredYaw -= 0.12;
else if (key === "arrowup") desiredPitch = THREE.MathUtils.clamp(desiredPitch + 0.08, 0.22, 1.05);
else if (key === "arrowdown") desiredPitch = THREE.MathUtils.clamp(desiredPitch - 0.08, 0.22, 1.05);
else if (key === "+" || key === "=") desiredRadius = Math.max(7.2, desiredRadius - 0.7);
else if (key === "-") desiredRadius = Math.min(18, desiredRadius + 0.7);
else if (key === "r") resetView();
else return;
event.preventDefault();
});
document.getElementById("resetView").addEventListener("click", resetView);
const labelsContainer = document.getElementById("labels");
const labelsButton = document.getElementById("toggleLabels");
let labelsVisible = true;
labelsButton.addEventListener("click", () => {
labelsVisible = !labelsVisible;
labelsContainer.classList.toggle("hidden", !labelsVisible);
labelsButton.setAttribute("aria-pressed", String(labelsVisible));
labelsButton.textContent = labelsVisible ? "Labels on" : "Labels off";
});
// Screen-space labels projected from anchors above each object.
const anchors = {
salt: new THREE.Vector3(2.72, 0.94, -0.35),
water: new THREE.Vector3(-2.72, 2.53, -0.65),
bundle: new THREE.Vector3(0.12, 1.78, 1.56)
};
const callouts = [...document.querySelectorAll(".callout")].map(element => ({
element,
anchor: anchors[element.dataset.anchor]
}));
const projected = new THREE.Vector3();
function updateLabels() {
const width = innerWidth;
const height = innerHeight;
callouts.forEach(callout => {
projected.copy(callout.anchor).project(camera);
const x = (projected.x * 0.5 + 0.5) * width;
const y = (-projected.y * 0.5 + 0.5) * height;
const onScreen =
projected.z > -1 &&
projected.z < 1 &&
x > 0 &&
x < width &&
y > 0 &&
y < height;
callout.element.style.visibility = onScreen ? "visible" : "hidden";
callout.element.style.left = `${x}px`;
callout.element.style.top = `${y - 12}px`;
});
}
function onResize() {
camera.aspect = innerWidth / innerHeight;
camera.updateProjectionMatrix();
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.setSize(innerWidth, innerHeight);
}
window.addEventListener("resize", onResize);
function animate() {
requestAnimationFrame(animate);
yaw += (desiredYaw - yaw) * 0.085;
pitch += (desiredPitch - pitch) * 0.085;
radius += (desiredRadius - radius) * 0.085;
updateCamera();
updateLabels();
renderer.render(scene, camera);
}
animate();
</script>
</body>
</html>
```