Prompt specification
Build or customize the Three.js 3D scene "Volunteers guiding arrivals to the gathering" 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: Volunteers guiding arrivals to the gathering
Category: Art & Culture · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/volunteers-guiding-arrivals-to-the-gathering-x2442
Scene Description Prompt:
Build a self-contained HTML scene with Three.js from cdnjs featuring the 1963 March on Washington. Create a respectful historical vignette with arriving groups, water distribution, and volunteer wayfinding. Keep participants generic and source the event's setting and period details. Low-poly.
Working Three.js Starter (volunteers-guiding-arrivals-to-the-gathering-x2442):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#e8dfcc" />
<title>March on Washington — A Historical Vignette</title>
<style>
:root {
color-scheme: light;
--paper: #eee5d1;
--paper-strong: #f8f1df;
--ink: #243038;
--muted: #566168;
--accent: #8d4938;
--line: rgba(36, 48, 56, 0.24);
--shadow: rgba(24, 32, 36, 0.18);
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #bfd0d6;
color: var(--ink);
font-family: Arial, Helvetica, sans-serif;
}
button,
a {
font: inherit;
}
button {
color: inherit;
}
button:focus-visible,
a:focus-visible {
outline: 3px solid #d39a58;
outline-offset: 3px;
}
[hidden] {
display: none !important;
}
#scene,
#scene canvas {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
display: block;
}
#scene canvas {
touch-action: none;
cursor: grab;
}
#scene canvas.dragging {
cursor: grabbing;
}
.panel {
background: rgba(238, 229, 209, 0.92);
border: 1px solid rgba(255, 255, 255, 0.52);
box-shadow: 0 12px 38px var(--shadow);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
#title-card {
position: fixed;
top: 20px;
left: 20px;
width: min(430px, calc(100vw - 40px));
padding: 18px 20px 16px;
border-radius: 3px;
pointer-events: auto;
}
.eyebrow {
margin: 0 0 6px;
color: var(--accent);
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.13em;
text-transform: uppercase;
}
h1 {
margin: 0;
font-family: Georgia, "Times New Roman", serif;
font-size: clamp(1.35rem, 2.4vw, 2rem);
font-weight: 500;
line-height: 1.08;
}
.date-line {
margin: 7px 0 0;
color: var(--muted);
font-size: 0.9rem;
}
.title-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 13px;
}
.small-button,
.focus-button {
border: 1px solid var(--line);
background: rgba(248, 241, 223, 0.7);
cursor: pointer;
transition:
background 150ms ease,
border-color 150ms ease,
transform 150ms ease;
}
.small-button {
padding: 7px 10px;
border-radius: 2px;
font-size: 0.78rem;
}
.small-button:hover,
.focus-button:hover {
background: #fff8e9;
border-color: rgba(36, 48, 56, 0.46);
}
#focus-panel {
position: fixed;
left: 20px;
bottom: 20px;
width: min(430px, calc(100vw - 40px));
padding: 11px;
border-radius: 3px;
}
.focus-buttons {
display: flex;
flex-wrap: wrap;
gap: 7px;
}
.focus-button {
padding: 8px 10px;
border-radius: 2px;
font-size: 0.78rem;
}
.focus-button.active {
color: #fff9ec;
background: var(--ink);
border-color: var(--ink);
}
.control-hint {
margin: 9px 2px 0;
color: var(--muted);
font-size: 0.72rem;
line-height: 1.35;
}
#motion-button {
position: fixed;
right: 20px;
top: 20px;
z-index: 5;
padding: 9px 12px;
border-radius: 2px;
font-size: 0.78rem;
}
#hotspot-layer {
position: fixed;
inset: 0;
z-index: 3;
overflow: hidden;
pointer-events: none;
}
.hotspot {
position: absolute;
display: flex;
align-items: center;
gap: 8px;
padding: 7px 10px;
transform: translate(-50%, -50%);
border: 1px solid rgba(255, 255, 255, 0.72);
border-radius: 999px;
background: rgba(31, 42, 47, 0.82);
color: #fff9ec;
box-shadow: 0 6px 20px rgba(20, 27, 30, 0.18);
cursor: pointer;
pointer-events: auto;
white-space: nowrap;
font-size: 0.75rem;
transition:
background 150ms ease,
opacity 150ms ease;
}
.hotspot::before {
width: 8px;
height: 8px;
border-radius: 50%;
background: #e7b66c;
content: "";
box-shadow: 0 0 0 3px rgba(231, 182, 108, 0.22);
}
.hotspot:hover {
background: rgba(141, 73, 56, 0.95);
}
#source-modal {
position: fixed;
inset: 0;
z-index: 20;
display: grid;
place-items: center;
padding: 20px;
background: rgba(19, 27, 31, 0.46);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
}
.modal-card {
position: relative;
width: min(760px, 100%);
max-height: min(82vh, 760px);
overflow: auto;
padding: 26px 28px 28px;
border-radius: 4px;
background: var(--paper-strong);
box-shadow: 0 24px 80px rgba(16, 23, 27, 0.35);
}
.modal-card h2 {
margin: 0 40px 8px 0;
font-family: Georgia, "Times New Roman", serif;
font-size: 1.65rem;
font-weight: 500;
}
.modal-card h3 {
margin: 22px 0 8px;
font-size: 0.85rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.modal-card p,
.modal-card li {
color: #465158;
font-size: 0.9rem;
line-height: 1.58;
}
.modal-card ul {
padding-left: 20px;
}
.modal-card a {
color: #784133;
text-underline-offset: 3px;
}
#close-modal {
position: absolute;
top: 15px;
right: 15px;
width: 34px;
height: 34px;
border: 1px solid var(--line);
border-radius: 50%;
background: transparent;
cursor: pointer;
font-size: 1.25rem;
}
#loading {
position: fixed;
inset: 0;
z-index: 30;
display: grid;
place-items: center;
background: #e8dfcc;
color: var(--ink);
font-family: Georgia, "Times New Roman", serif;
font-size: 1.15rem;
transition: opacity 350ms ease;
}
#loading.hidden {
opacity: 0;
pointer-events: none;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (max-width: 760px) {
#title-card {
top: 10px;
left: 10px;
width: calc(100vw - 20px);
padding: 13px 15px;
}
.date-line {
font-size: 0.8rem;
}
#motion-button {
top: auto;
right: 10px;
bottom: 112px;
}
#focus-panel {
left: 10px;
bottom: 10px;
width: calc(100vw - 20px);
padding: 8px;
}
.focus-button {
padding: 7px 8px;
font-size: 0.7rem;
}
.control-hint {
display: none;
}
.hotspot {
padding: 6px 8px;
font-size: 0.68rem;
}
.modal-card {
padding: 23px 20px;
}
}
</style>
</head>
<body>
<div id="scene"></div>
<div id="loading" role="status">Preparing the National Mall…</div>
<header id="title-card" class="panel">
<p class="eyebrow">Historical vignette · Washington, D.C.</p>
<h1>March on Washington for Jobs and Freedom</h1>
<p class="date-line">August 28, 1963 · National Mall</p>
<div class="title-actions">
<button id="open-modal" class="small-button">Historical basis & sources</button>
<button id="interpretation-button" class="small-button">About this interpretation</button>
</div>
</header>
<button id="motion-button" class="small-button panel" aria-pressed="false">
Pause ambient motion
</button>
<nav id="focus-panel" class="panel" aria-label="Scene viewpoints">
<div class="focus-buttons">
<button class="focus-button active" data-view="overview">Overview</button>
<button class="focus-button" data-view="arrivals">Arriving groups</button>
<button class="focus-button" data-view="water">Water distribution</button>
<button class="focus-button" data-view="wayfinding">Volunteer wayfinding</button>
<button class="focus-button" data-view="program">Main program</button>
</div>
<p class="control-hint">
Drag to orbit · Wheel or pinch to zoom · Right-drag to pan ·
Arrow keys orbit · +/− zoom · R resets
</p>
</nav>
<div id="hotspot-layer" aria-label="Interpretive scene locations">
<button class="hotspot" data-view="arrivals">Arrival route</button>
<button class="hotspot" data-view="water">Water station</button>
<button class="hotspot" data-view="wayfinding">Volunteer directions</button>
<button class="hotspot" data-view="program">Lincoln Memorial program area</button>
</div>
<section
id="source-modal"
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
hidden
>
<div class="modal-card">
<button id="close-modal" aria-label="Close historical notes">×</button>
<h2 id="modal-title">Historical basis & interpretive notes</h2>
<p id="modal-intro">
This low-poly scene is a respectful, composite illustration of the
National Mall on the day of the March on Washington for Jobs and
Freedom. It is not a reconstruction of a particular crowd, person, or
documented temporary installation.
</p>
<h3>Setting and period</h3>
<p>
The march took place in Washington, D.C., on August 28, 1963, with the
principal program at the Lincoln Memorial and participants gathering
across the National Mall. The memorial’s colonnade, axial Mall,
formal clothing, hand-lettered placards, folding chairs, coaches, and
temporary shade structures provide period cues. Modern commemorative
structures and present-day crowd arrangements are not depicted.
</p>
<h3>People and logistics</h3>
<p>
All participants are anonymous composites rather than portraits or
likenesses of named marchers, organizers, speakers, or officials.
The water table, directional signs, and volunteer positions illustrate
the practical support work associated with a mass gathering, but their
exact placement here is interpretive and should not be read as a
site-specific reconstruction.
</p>
<h3>Scale and representation</h3>
<p>
Historical attendance estimates are commonly reported in the range of
roughly 200,000 to 250,000 or more. The small number of low-poly
figures in this vignette is illustrative and does not attempt to
represent the actual crowd size.
</p>
<h3>Sources</h3>
<ul>
<li>
<a href="https://www.nps.gov/li/index.htm" target="_blank" rel="noopener">
National Park Service — Lincoln Memorial
</a>
for the memorial’s architecture and setting.
</li>
<li>
<a href="https://www.nps.gov/nama/index.htm" target="_blank" rel="noopener">
National Park Service — National Mall
</a>
for the Mall landscape and commemorative context.
</li>
<li>
<a
href="https://nmaahc.si.edu/collections/object-groups/1963-march-washington-jobs-and-freedom"
target="_blank"
rel="noopener"
>
Smithsonian National Museum of African American History and Culture —
1963 March on Washington collection
</a>
for artifacts and historical documentation.
</li>
<li>
<a
href="https://www.loc.gov/pictures/collection/march-washington/"
target="_blank"
rel="noopener"
>
Library of Congress — March on Washington photographs
</a>
for documentary visual context.
</li>
</ul>
</div>
</section>
<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 loading = document.getElementById("loading");
const motionButton = document.getElementById("motion-button");
const modal = document.getElementById("source-modal");
const openModalButton = document.getElementById("open-modal");
const interpretationButton = document.getElementById("interpretation-button");
const closeModalButton = document.getElementById("close-modal");
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.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.04;
renderer.domElement.setAttribute(
"aria-label",
"Interactive low-poly interpretation of the 1963 March on Washington at the Lincoln Memorial."
);
renderer.domElement.setAttribute("role", "img");
sceneHost.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xbfd2dc);
scene.fog = new THREE.Fog(0xbfd2dc, 170, 330);
const camera = new THREE.PerspectiveCamera(
46,
window.innerWidth / window.innerHeight,
0.1,
500
);
const hemisphere = new THREE.HemisphereLight(0xd9edf5, 0x59634b, 2.0);
scene.add(hemisphere);
const sun = new THREE.DirectionalLight(0xffefd2, 2.7);
sun.position.set(80, 120, 65);
sun.castShadow = true;
sun.shadow.mapSize.set(2048, 2048);
sun.shadow.camera.left = -120;
sun.shadow.camera.right = 120;
sun.shadow.camera.top = 130;
sun.shadow.camera.bottom = -130;
sun.shadow.camera.near = 1;
sun.shadow.camera.far = 300;
sun.shadow.normalBias = 0.035;
scene.add(sun);
const fill = new THREE.DirectionalLight(0xb8d7e7, 0.45);
fill.position.set(-80, 50, -100);
scene.add(fill);
// Seeded randomness keeps the scene consistent between loads.
function mulberry32(seed) {
return function () {
let t = seed += 0x6D2B79F5;
t = Math.imul(t ^ (t >>> 15), t | 1);
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}
const random = mulberry32(1963);
const between = (min, max) => min + random() * (max - min);
function material(color, extra = {}) {
return new THREE.MeshStandardMaterial({
color,
roughness: 0.88,
metalness: 0,
flatShading: true,
...extra
});
}
const materials = {
lawn: material(0x829768),
lawnDark: material(0x71845b),
path: material(0xc8b99b),
pathEdge: material(0xb5a383),
road: material(0x777b78),
limestone: material(0xd8d1be),
limestoneDark: material(0xbdb5a3),
recess: material(0x3d403c),
bronze: material(0x8b7950, { metalness: 0.3, roughness: 0.58 }),
wood: material(0x73513b),
stage: material(0x725844),
canvas: material(0xe8dfc6),
canvasBlue: material(0x718f91),
metal: material(0x717b7a, { metalness: 0.28, roughness: 0.65 }),
cream: material(0xe4ddc7),
navy: material(0x334a59),
busWindow: material(0x315362, { metalness: 0.15, roughness: 0.5 }),
black: material(0x252b2b),
white: material(0xf1ead6),
water: material(0x659da4, { metalness: 0.05, roughness: 0.35 }),
trunk: material(0x6d5944),
leaves: material(0x4f714b),
leavesLight: material(0x668259),
leavesDark: material(0x3f6042)
};
function addBox(parent, width, height, depth, mat, x = 0, y = 0, z = 0) {
const mesh = new THREE.Mesh(
new THREE.BoxGeometry(width, height, depth),
mat
);
mesh.position.set(x, y, z);
mesh.castShadow = true;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
function addCylinder(
parent,
radiusTop,
radiusBottom,
height,
segments,
mat,
x = 0,
y = 0,
z = 0
) {
const mesh = new THREE.Mesh(
new THREE.CylinderGeometry(radiusTop, radiusBottom, height, segments),
mat
);
mesh.position.set(x, y, z);
mesh.castShadow = true;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
// Textures are generated locally; no external image assets are used.
function createTextTexture(
lines,
{
ratio = 4,
background = "#eee3c7",
foreground = "#263238",
border = "#263238"
} = {}
) {
const canvas = document.createElement("canvas");
canvas.width = 1024;
canvas.height = Math.max(220, Math.min(768, Math.round(1024 / ratio)));
const context = canvas.getContext("2d");
context.fillStyle = background;
context.fillRect(0, 0, canvas.width, canvas.height);
context.strokeStyle = border;
context.lineWidth = 9;
context.strokeRect(10, 10, canvas.width - 20, canvas.height - 20);
context.textAlign = "center";
context.textBaseline = "middle";
context.fillStyle = foreground;
const slot = canvas.height / (lines.length + 0.65);
let fontSize = Math.min(88, slot * 0.64);
lines.forEach((line, index) => {
context.font = `700 ${fontSize}px Georgia, serif`;
while (context.measureText(line).width > canvas.width - 90 && fontSize > 20) {
fontSize -= 2;
context.font = `700 ${fontSize}px Georgia, serif`;
}
context.fillText(
line,
canvas.width / 2,
slot * (index + 0.85)
);
});
const texture = new THREE.CanvasTexture(canvas);
texture.colorSpace = THREE.SRGBColorSpace;
texture.anisotropy = Math.min(4, renderer.capabilities.getMaxAnisotropy());
return texture;
}
function createBoard(
lines,
width,
height,
x,
z,
rotationY = 0,
options = {}
) {
const group = new THREE.Group();
group.position.set(x, 0, z);
group.rotation.y = rotationY;
const bottom = 1.45;
const centerY = bottom + height / 2;
const backing = addBox(
group,
width + 0.22,
height + 0.22,
0.15,
materials.wood,
0,
centerY,
0
);
backing.castShadow = true;
const texture = createTextTexture(lines, {
ratio: width / height,
...options
});
const face = new THREE.Mesh(
new THREE.PlaneGeometry(width, height),
new THREE.MeshBasicMaterial({
map: texture,
side: THREE.DoubleSide,
toneMapped: false
})
);
face.position.set(0, centerY, 0.086);
group.add(face);
for (const side of [-1, 1]) {
addCylinder(
group,
0.09,
0.11,
bottom + height * 0.84,
6,
materials.wood,
side * width * 0.41,
(bottom + height * 0.84) / 2,
-0.04
);
}
scene.add(group);
return group;
}
function createBanner(lines, width, height, x, y, z) {
const group = new THREE.Group();
group.position.set(x, y, z);
const texture = createTextTexture(lines, {
ratio: width / height,
background: "#e7d9b8",
foreground: "#2b3538"
});
const banner = new THREE.Mesh(
new THREE.PlaneGeometry(width, height),
new THREE.MeshBasicMaterial({
map: texture,
side: THREE.DoubleSide,
toneMapped: false
})
);
group.add(banner);
scene.add(group);
return group;
}
// National Mall ground, axial paths, and lawns.
addBox(scene, 260, 0.5, 360, materials.lawn, 0, -0.3, 10);
addBox(scene, 17, 0.12, 190, materials.path, 3, 0.01, 22);
addBox(scene, 8, 0.12, 150, materials.path, -23, 0.015, 23);
addBox(scene, 8, 0.12, 150, materials.path, 31, 0.015, 23);
addBox(scene, 155, 0.12, 13, materials.path, 0, 0.02, 102);
addBox(scene, 76, 0.12, 47, materials.path, 0, 0.02, -66);
addBox(scene, 110, 0.1, 10, materials.road, 0, 0.035, 73);
for (const side of [-1, 1]) {
for (let z = -67; z <= 105; z += 18) {
addBox(
scene,
30,
0.07,
13,
random() > 0.5 ? materials.lawnDark : materials.lawn,
side * 64,
0.005,
z
);
}
}
// Low-poly tree rows.
const trunkGeometry = new THREE.CylinderGeometry(0.38, 0.52, 4.8, 6);
const canopyGeometry = new THREE.DodecahedronGeometry(1, 0);
function addTree(x, z, scale = 1) {
const tree = new THREE.Group();
tree.position.set(x, 0, z);
tree.scale.setScalar(scale);
const trunk = new THREE.Mesh(trunkGeometry, materials.trunk);
trunk.position.y = 2.4;
trunk.castShadow = true;
tree.add(trunk);
const canopyColors = [
materials.leaves,
materials.leavesLight,
materials.leavesDark
];
const positions = [
[0, 5.5, 0, 2.25],
[-1.15, 5.0, 0.15, 1.65],
[1.0, 5.15, 0.3, 1.8],
[0.2, 6.25, -0.45, 1.65]
];
positions.forEach((p, index) => {
const leaf = new THREE.Mesh(
canopyGeometry,
canopyColors[(index + Math.floor(random() * 3)) % canopyColors.length]
);
leaf.position.set(p[0], p[1], p[2]);
leaf.scale.setScalar(p[3]);
leaf.rotation.set(random(), random(), random());
leaf.castShadow = true;
tree.add(leaf);
});
scene.add(tree);
}
for (const side of [-1, 1]) {
for (let z = -58; z <= 102; z += 18) {
addTree(side * between(49, 55), z + between(-3, 3), between(0.8, 1.18));
}
}
for (let i = 0; i < 9; i++) {
addTree(between(-76, 76), between(-70, -42), between(0.7, 1.0));
}
// A few angular clouds.
const clouds = [];
const cloudMaterial = material(0xf2eee3);
const cloudGeometry = new THREE.DodecahedronGeometry(1, 0);
function addCloud(x, y, z, scale) {
const group = new THREE.Group();
group.position.set(x, y, z);
group.scale.setScalar(scale);
[
[-2.2, 0, 0, 1.5],
[0, 0.5, 0, 2.0],
[2.3, 0.1, 0.2, 1.45],
[0.8, -0.2, 1.0, 1.35]
].forEach((p) => {
const puff = new THREE.Mesh(cloudGeometry, cloudMaterial);
puff.position.set(p[0], p[1], p[2]);
puff.scale.set(p[3], p[3] * 0.55, p[3] * 0.7);
group.add(puff);
});
scene.add(group);
clouds.push(group);
}
addCloud(-62, 60, -95, 4.3);
addCloud(35, 69, -135, 5.0);
addCloud(92, 57, -42, 3.4);
addCloud(-110, 72, 5, 4.0);
// Lincoln Memorial: simplified massing with a 36-column colonnade.
const memorial = new THREE.Group();
scene.add(memorial);
addBox(memorial, 72, 0.45, 14, materials.limestone, 0, 0.225, -88);
addBox(memorial, 70, 0.45, 12, materials.limestone, 0, 0.675, -89);
addBox(memorial, 68, 0.45, 10, materials.limestone, 0, 1.125, -90);
addBox(memorial, 62, 1.3, 38, materials.limestoneDark, 0, 1.85, -110);
addBox(memorial, 57, 13, 29, materials.limestone, 0, 9, -111);
addBox(memorial, 61, 1.3, 33, materials.limestoneDark, 0, 16, -111);
addBox(memorial, 64, 1.15, 35, materials.limestone, 0, 17.05, -111);
addBox(memorial, 14, 9, 0.3, materials.recess, 0, 6, -96.35);
const columnGeometry = new THREE.CylinderGeometry(0.67, 0.76, 12, 8);
const capitalGeometry = new THREE.CylinderGeometry(0.94, 0.76, 0.45, 8);
const columnBaseGeometry = new THREE.CylinderGeometry(0.79, 0.86, 0.38, 8);
function addColumn(x, z) {
const column = new THREE.Mesh(columnGeometry, materials.limestone);
column.position.set(x, 8, z);
column.castShadow = true;
column.receiveShadow = true;
memorial.add(column);
const capital = new THREE.Mesh(capitalGeometry, materials.limestone);
capital.position.set(x, 14.22, z);
capital.castShadow = true;
memorial.add(capital);
const base = new THREE.Mesh(columnBaseGeometry, materials.limestoneDark);
base.position.set(x, 2.18, z);
base.castShadow = true;
memorial.add(base);
}
// 12 front + 12 rear + 6 on each side = 36 columns.
for (let i = 0; i < 12; i++) {
const x = -26.4 + i * 4.8;
addColumn(x, -95.6);
addColumn(x, -126.4);
}
for (let i = 0; i < 6; i++) {
const z = -100 + i * 4.8;
addColumn(-27.5, z);
addColumn(27.5, z);
}
// Simplified central statue, visible as a bronze silhouette.
const statue = new THREE.Group();
statue.position.set(0, 3.1, -95.65);
addCylinder(statue, 0.65, 0.85, 2.5, 7, materials.bronze, 0, 1.25, 0);
const statueHead = new THREE.Mesh(
new THREE.DodecahedronGeometry(0.42, 0),
materials.bronze
);
statueHead.position.y = 2.95;
statue.add(statueHead);
memorial.add(statue);
// Temporary program platform, lectern, and period-style banner.
addBox(scene, 39, 0.65, 8, materials.stage, 0, 0.33, -78);
addBox(scene, 2.3, 1.6, 1.4, materials.wood, 0, 1.45, -75.8);
addBox(scene, 2.8, 0.18, 1.6, materials.wood, 0, 2.3, -75.8);
for (const x of [-15, 15]) {
addBox(scene, 2.2, 3.2, 2, materials.black, x, 1.6, -76);
addCylinder(scene, 1.0, 1.0, 0.18, 12, materials.black, x, 3.3, -76);
}
createBanner(
["MARCH ON WASHINGTON", "JOBS AND FREEDOM", "AUGUST 28, 1963"],
31,
4.8,
0,
8.5,
-79.1
);
for (const x of [-16, 16]) {
addCylinder(scene, 0.11, 0.14, 9.5, 7, materials.wood, x, 4.75, -79.2);
}
// Shared person geometry and period clothing palette.
const bodyGeometry = new THREE.CylinderGeometry(0.26, 0.34, 0.86, 7);
const headGeometry = new THREE.IcosahedronGeometry(0.23, 1);
const legGeometry = new THREE.CylinderGeometry(0.085, 0.095, 0.82, 6);
const armGeometry = new THREE.CylinderGeometry(0.07, 0.075, 0.68, 6);
const skirtGeometry = new THREE.CylinderGeometry(0.22, 0.39, 0.55, 8);
const hatBrimGeometry = new THREE.CylinderGeometry(0.36, 0.36, 0.06, 10);
const hatCrownGeometry = new THREE.CylinderGeometry(0.22, 0.25, 0.22, 10);
const handGeometry = new THREE.IcosahedronGeometry(0.075, 0);
const noseGeometry = new THREE.BoxGeometry(0.055, 0.055, 0.065);
const bodyMaterials = [
material(0x334858),
material(0x5c5d58),
material(0x77715f),
material(0x8d4938),
material(0x607967),
material(0xb18c6c),
material(0x63758a),
material(0x9a6670),
material(0x5c4d59),
material(0xc0a982)
];
const skinMaterials = [
material(0x7c5039),
material(0x9b6847),
material(0xb9825e),
material(0xd0a27c),
material(0x694534),
material(0xe0b994)
];
const trouserMaterials = [
material(0x313638),
material(0x3e4649),
material(0x4c4840),
material(0x5c605d)
];
const shadowGeometry = new THREE.CircleGeometry(0.42, 12);
shadowGeometry.rotateX(-Math.PI / 2);
const shadowMaterial = new THREE.MeshBasicMaterial({
color: 0x263028,
transparent: true,
opacity: 0.18,
depthWrite: false
});
const shadowMesh = new THREE.InstancedMesh(
shadowGeometry,
shadowMaterial,
220
);
shadowMesh.count = 0;
shadowMesh.frustumCulled = false;
shadowMesh.instanceMatrix.setUsage(THREE.DynamicDrawUsage);
scene.add(shadowMesh);
const shadowDummy = new THREE.Object3D();
const people = [];
function updateShadow(person, index) {
shadowDummy.position.set(
person.root.position.x,
0.055,
person.root.position.z
);
shadowDummy.rotation.set(0, 0, 0);
shadowDummy.scale.setScalar(person.scale * 1.05);
shadowDummy.updateMatrix();
shadowMesh.setMatrixAt(index, shadowDummy.matrix);
}
function addPlacard(person, lines, width = 2.8, height = 1.55) {
const texture = createTextTexture(lines, {
ratio: width / height,
background: "#eee0bd",
foreground: "#303638"
});
const placard = new THREE.Mesh(
new THREE.PlaneGeometry(width, height),
new THREE.MeshBasicMaterial({
map: texture,
side: THREE.DoubleSide,
toneMapped: false
})
);
placard.position.set(0, 1.42, 0.42);
person.root.add(placard);
addCylinder(person.root, 0.035, 0.035, 1.7, 5, materials.wood, 0, 0.8, 0.42);
}
function addVolunteerDetails(person, withClipboard = false) {
const armband = addBox(
person.root,
0.17,
0.12,
0.16,
materials.white,
0.32,
1.14,
0
);
armband.rotation.z = -0.12;
if (withClipboard) {
addBox(person.root, 0.44, 0.55, 0.06, materials.wood, 0.34, 1.2, 0.34);
}
}
function makePerson(options = {}) {
const {
x = 0,
z = 0,
scale = 1,
rotation = 0,
style = "suit",
walking = false,
phase = 0,
speed = 0.7,
hat = false
} = options;
const root = new THREE.Group();
root.position.set(x, 0, z);
root.rotation.y = rotation;
root.scale.setScalar(scale);
const bodyMat = bodyMaterials[Math.floor(random() * bodyMaterials.length)];
const skinMat = skinMaterials[Math.floor(random() * skinMaterials.length)];
const trouserMat = trouserMaterials[Math.floor(random() * trouserMaterials.length)];
const torso = new THREE.Mesh(bodyGeometry, bodyMat);
torso.position.y = 1.15;
torso.castShadow = false;
root.add(torso);
const head = new THREE.Mesh(headGeometry, skinMat);
head.position.y = 1.84;
root.add(head);
const nose = new THREE.Mesh(noseGeometry, skinMat);
nose.position.set(0, 1.84, 0.225);
root.add(nose);
const legL = new THREE.Mesh(legGeometry, trouserMat);
const legR = new THREE.Mesh(legGeometry, trouserMat);
legL.position.set(-0.13, 0.53, 0);
legR.position.set(0.13, 0.53, 0);
root.add(legL, legR);
const armL = new THREE.Mesh(armGeometry, bodyMat);
const armR = new THREE.Mesh(armGeometry, bodyMat);
armL.position.set(-0.33, 1.18, 0);
armR.position.set(0.33, 1.18, 0);
armL.rotation.z = -0.08;
armR.rotation.z = 0.08;
root.add(armL, armR);
const handL = new THREE.Mesh(handGeometry, skinMat);
const handR = new THREE.Mesh(handGeometry, skinMat);
handL.position.set(-0.36, 0.81, 0);
handR.position.set(0.36, 0.81, 0);
root.add(handL, handR);
if (style === "dress") {
const skirt = new THREE.Mesh(skirtGeometry, bodyMat);
skirt.position.y = 0.78;
root.add(skirt);
const hair = new THREE.Mesh(
new THREE.DodecahedronGeometry(0.24, 0),
material(random() > 0.5 ? 0x302722 : 0x5b4333)
);
hair.position.set(0, 1.89, -0.055);
hair.scale.set(1, 0.75, 1);
root.add(hair);
} else {
const tie = addBox(root, 0.075, 0.43, 0.045, material(0x7f3e32), 0, 1.28, 0.255);
tie.rotation.z = -0.04;
}
if (hat) {
const brim = new THREE.Mesh(hatBrimGeometry, material(0x3f3b35));
brim.position.y = 2.035;
root.add(brim);
const crown = new THREE.Mesh(hatCrownGeometry, material(0x3f3b35));
crown.position.y = 2.16;
root.add(crown);
}
const person = {
root,
legL,
legR,
armL,
armR,
scale,
walking,
phase,
speed,
baseX: x,
z,
shadowIndex: people.length
};
people.push(person);
shadowMesh.count = people.length;
updateShadow(person, person.shadowIndex);
scene.add(root);
return person;
}
// Representative gathering in front of the memorial.
const placardLines = [
["JOBS AND FREEDOM"],
["DECENT HOUSING"],
["EQUAL RIGHTS"],
["END SEGREGATION"],
["WE DEMAND DIGNITY"]
];
for (let i = 0; i < 49; i++) {
let x = between(-34, 34);
let z = between(-68, -31);
if (Math.abs(x) < 5) x += Math.sign(x || 1) * 5;
const person = makePerson({
x,
z,
scale: between(0.9, 1.12),
rotation: between(-0.3, 0.3),
style: random() > 0.47 ? "dress" : "suit",
hat: random() > 0.76
});
if (i % 9 === 0) {
addPlacard(
person,
placardLines[Math.floor(random() * placardLines.length)],
between(2.4, 3.2),
1.5
);
}
}
// Folding chairs among the crowd.
function addChair(x, z, rotation) {
const chair = new THREE.Group();
chair.position.set(x, 0, z);
chair.rotation.y = rotation;
addBox(chair, 0.72, 0.08, 0.62, materials.canvasBlue, 0, 0.56, 0);
addBox(chair, 0.72, 0.62, 0.07, materials.canvasBlue, 0, 0.91, -0.27);
const frame = material(0x565b58, { metalness: 0.35, roughness: 0.65 });
addBox(chair, 0.055, 0.72, 0.055, frame, -0.28, 0.33, -0.22);
addBox(chair, 0.055, 0.72, 0.055, frame, 0.28, 0.33, -0.22);
addBox(chair, 0.055, 0.72, 0.055, frame, -0.28, 0.33, 0.22);
addBox(chair, 0.055, 0.72, 0.055, frame, 0.28, 0.33, 0.22);
scene.add(chair);
}
for (let i = 0; i < 18; i++) {
addChair(
between(-31, 31),
between(-67, -38),
between(-0.7, 0.7)
);
}
// Water distribution station.
const waterStation = new THREE.Group();
waterStation.position.set(31, 0, 19);
scene.add(waterStation);
for (const x of [-4.3, 4.3]) {
for (const z of [-1.8, 1.8]) {
addCylinder(waterStation, 0.08, 0.1, 5.3, 6, materials.wood, x, 2.65, z);
}
}
const roofLeft = addBox(
waterStation,
5.0,
0.2,
4.8,
materials.canvas,
-2.45,
5.3,
0
);
roofLeft.rotation.z = -0.08;
const roofRight = addBox(
waterStation,
5.0,
0.2,
4.8,
materials.canvasBlue,
2.45,
5.3,
0
);
roofRight.rotation.z = 0.08;
addBox(waterStation, 8.2, 0.18, 2.1, materials.wood, 0, 1.38, 0);
for (const x of [-3.5, 3.5]) {
addBox(waterStation, 0.18, 1.3, 1.8, materials.wood, x, 0.7, 0);
}
// Water cooler, glass jugs, and stacked cups.
addCylinder(waterStation, 0.52, 0.6, 1.2, 10, materials.water, -2.4, 2.08, 0);
addCylinder(waterStation, 0.44, 0.5, 0.75, 10, materials.cream, -2.4, 2.95, 0);
addCylinder(waterStation, 0.19, 0.23, 0.35, 8, materials.water, -2.4, 3.45, 0);
for (const x of [-0.5, 1.1]) {
addCylinder(waterStation, 0.32, 0.38, 0.95, 10, materials.water, x, 1.95, 0);
addCylinder(waterStation, 0.25, 0.3, 0.25, 8, materials.cream, x, 2.52, 0);
}
for (let i = 0; i < 5; i++) {
addCylinder(
waterStation,
0.095,
0.075,
0.17,
8,
materials.white,
2.7,
1.56 + i * 0.17,
0.35
);
}
createBoard(
["WATER", "PLEASE HELP YOURSELF"],
7.2,
2.2,
31,
22.1,
0,
{ background: "#d9e4dc", foreground: "#2c4644" }
);
const waterVolunteer = makePerson({
x: 28.5,
z: 17.1,
scale: 1.02,
style: "suit",
hat: true
});
addVolunteerDetails(waterVolunteer, true);
for (let i = 0; i < 7; i++) {
const person = makePerson({
x: between(26.5, 35.5),
z: between(20.4, 23.5),
scale: between(0.9, 1.08),
style: random() > 0.5 ? "dress" : "suit",
rotation: Math.PI + between(-0.25, 0.25),
hat: random() > 0.75
});
if (i % 3 === 0) {
const cup = addCylinder(
person.root,
0.07,
0.06,
0.16,
7,
materials.white,
0.3,
0.83,
0.18
);
cup.castShadow = false;
}
}
// Volunteer wayfinding at an axial-path junction.
createBoard(
["← LINCOLN MEMORIAL", "MAIN PROGRAM"],
8.4,
3.0,
-28.5,
0.5,
0.12,
{ background: "#efe5ca" }
);
createBoard(
["ARRIVALS ↑", "EAST MALL"],
6.4,
2.5,
-13.5,
-9.5,
-0.12,
{ background: "#e9dfc1" }
);
createBoard(
["WATER →", "REFILL STATION"],
7.2,
2.5,
21.5,
3.0,
0.12,
{ background: "#dce3d5" }
);
const directionVolunteer = makePerson({
x: -18.5,
z: 4.7,
scale: 1.04,
style: "suit",
hat: true
});
addVolunteerDetails(directionVolunteer, true);
addPlacard(
directionVolunteer,
["← MEMORIAL", "WATER →"],
3.7,
1.8
);
const wayVolunteer = makePerson({
x: -22.0,
z: 7.8,
scale: 1,
style: "dress",
rotation: -0.3
});
addVolunteerDetails(wayVolunteer);
const wayVolunteer2 = makePerson({
x: -15.7,
z: -3.4,
scale: 1.02,
style: "suit",
rotation: 2.8
});
addVolunteerDetails(wayVolunteer2, true);
// A generic 1960s-style coach used as an arrival visual cue.
function addBus() {
const bus = new THREE.Group();
bus.position.set(42, 0, 70);
bus.rotation.y = 0.04;
addBox(bus, 5.2, 3.3, 13.2, materials.cream, 0, 2.65, 0);
addBox(bus, 5.4, 0.38, 13.6, materials.navy, 0, 4.35, 0);
addBox(bus, 4.5, 1.1, 0.15, materials.busWindow, 0, 3.15, -6.65);
for (const side of [-1, 1]) {
for (let i = 0; i < 5; i++) {
addBox(
bus,
0.12,
1.05,
1.85,
materials.busWindow,
side * 2.66,
3.15,
-4.8 + i * 2.35
);
}
for (const z of [-4.3, 4.3]) {
const wheel = addCylinder(
bus,
0.95,
0.95,
0.55,
12,
materials.black,
side * 2.7,
1.05,
z
);
wheel.rotation.z = Math.PI / 2;
}
}
const destinationTexture = createTextTexture(
["SHUTTLE"],
{
ratio: 4,
background: "#d9d2b6",
foreground: "#28383f"
}
);
const destination = new THREE.Mesh(
new THREE.PlaneGeometry(3.2, 0.7),
new THREE.MeshBasicMaterial({
map: destinationTexture,
side: THREE.DoubleSide,
toneMapped: false
})
);
destination.position.set(0, 4.0, -6.76);
bus.add(destination);
scene.add(bus);
}
addBus();
// Arriving groups walking toward the program area.
const arrivingGroups = [
{ x: 3.5, start: 88, speed: 0.62 },
{ x: 10.5, start: 66, speed: 0.68 },
{ x: -2.2, start: 111, speed: 0.57 },
{ x: 14.5, start: 96, speed: 0.64 },
{ x: -21.5, start: 86, speed: 0.60 },
{ x: 37.3, start: 77, speed: 0.65 }
];
for (const group of arrivingGroups) {
for (let member = 0; member < 3; member++) {
makePerson({
x: group.x + between(-1.3, 1.3),
z: group.start - member * 2.1,
scale: between(0.92, 1.08),
rotation: Math.PI + between(-0.15, 0.15),
style: random() > 0.48 ? "dress" : "suit",
walking: true,
phase: random() * Math.PI * 2,
speed: group.speed + between(-0.04, 0.04),
hat: random() > 0.7
});
}
}
// A few people near the coach, visually connecting arrival with the path.
for (let i = 0; i < 5; i++) {
makePerson({
x: between(36.5, 39),
z: between(64, 72),
scale: between(0.93, 1.08),
rotation: between(1.5, 2.4),
style: random() > 0.5 ? "dress" : "suit",
hat: random() > 0.65
});
}
// Custom camera controls, implemented directly without add-ons.
const controls = {
target: new THREE.Vector3(0, 2, -25),
desiredTarget: new THREE.Vector3(0, 2, -25),
radius: 168,
desiredRadius: 168,
theta: 0.52,
desiredTheta: 0.52,
phi: 1.02,
desiredPhi: 1.02
};
const views = {
overview: {
target: [0, 2, -25],
radius: window.innerWidth < 700 ? 205 : 168,
theta: 0.52,
phi: 1.02
},
arrivals: {
target: [7, 1.5, 60],
radius: 92,
theta: 0.70,
phi: 1.03
},
water: {
target: [30, 2.2, 19],
radius: 54,
theta: 0.74,
phi: 1.00
},
wayfinding: {
target: [-18, 2.1, 4],
radius: 57,
theta: 0.38,
phi: 1.02
},
program: {
target: [0, 4.2, -67],
radius: 95,
theta: 0.26,
phi: 1.08
}
};
function focusView(name) {
const view = views[name];
if (!view) return;
controls.desiredTarget.set(...view.target);
controls.desiredRadius = view.radius;
controls.desiredTheta = view.theta;
controls.desiredPhi = view.phi;
document.querySelectorAll(".focus-button").forEach((button) => {
button.classList.toggle("active", button.dataset.view === name);
});
}
document.querySelectorAll("[data-view]").forEach((button) => {
button.addEventListener("click", () => focusView(button.dataset.view));
});
const pointers = new Map();
let dragging = false;
let dragButton = 0;
let previousX = 0;
let previousY = 0;
let pinchDistance = 0;
const canvas = renderer.domElement;
canvas.addEventListener("pointerdown", (event) => {
canvas.setPointerCapture(event.pointerId);
pointers.set(event.pointerId, {
x: event.clientX,
y: event.clientY
});
if (pointers.size === 1) {
dragging = true;
dragButton = event.button;
previousX = event.clientX;
previousY = event.clientY;
canvas.classList.add("dragging");
} else if (pointers.size === 2) {
const values = [...pointers.values()];
pinchDistance = Math.hypot(
values[0].x - values[1].x,
values[0].y - values[1].y
);
}
});
canvas.addEventListener("pointermove", (event) => {
if (!pointers.has(event.pointerId)) return;
pointers.set(event.pointerId, {
x: event.clientX,
y: event.clientY
});
if (pointers.size === 2) {
const values = [...pointers.values()];
const distance = Math.hypot(
values[0].x - values[1].x,
values[0].y - values[1].y
);
if (pinchDistance > 0) {
controls.desiredRadius = THREE.MathUtils.clamp(
controls.desiredRadius * (pinchDistance / distance),
35,
245
);
}
pinchDistance = distance;
return;
}
if (!dragging) return;
const dx = event.clientX - previousX;
const dy = event.clientY - previousY;
previousX = event.clientX;
previousY = event.clientY;
if (dragButton === 2) {
const panScale = controls.desiredRadius * 0.0012;
const rightX = Math.cos(controls.desiredTheta);
const rightZ = -Math.sin(controls.desiredTheta);
controls.desiredTarget.x -= dx * panScale * rightX;
controls.desiredTarget.z -= dx * panScale * rightZ;
controls.desiredTarget.z += dy * panScale;
} else {
controls.desiredTheta -= dx * 0.005;
controls.desiredPhi = THREE.MathUtils.clamp(
controls.desiredPhi - dy * 0.004,
0.35,
1.42
);
}
});
function endPointer(event) {
pointers.delete(event.pointerId);
if (pointers.size < 2) pinchDistance = 0;
if (pointers.size === 0) {
dragging = false;
canvas.classList.remove("dragging");
}
}
canvas.addEventListener("pointerup", endPointer);
canvas.addEventListener("pointercancel", endPointer);
canvas.addEventListener("contextmenu", (event) => event.preventDefault());
canvas.addEventListener(
"wheel",
(event) => {
event.preventDefault();
controls.desiredRadius = THREE.MathUtils.clamp(
controls.desiredRadius * Math.exp(event.deltaY * 0.001),
35,
245
);
},
{ passive: false }
);
window.addEventListener("keydown", (event) => {
if (event.key === "Escape") {
closeModal();
return;
}
if (!modal.hidden) return;
const key = event.key.toLowerCase();
if (event.key === "ArrowLeft") controls.desiredTheta += 0.08;
else if (event.key === "ArrowRight") controls.desiredTheta -= 0.08;
else if (event.key === "ArrowUp") controls.desiredPhi = Math.max(0.35, controls.desiredPhi - 0.06);
else if (event.key === "ArrowDown") controls.desiredPhi = Math.min(1.42, controls.desiredPhi + 0.06);
else if (key === "+" || key === "=") controls.desiredRadius = Math.max(35, controls.desiredRadius - 6);
else if (key === "-" || key === "_") controls.desiredRadius = Math.min(245, controls.desiredRadius + 6);
else if (key === "r") focusView("overview");
else return;
event.preventDefault();
});
// Source and interpretation dialog.
function openModal() {
modal.hidden = false;
closeModalButton.focus();
}
function closeModal() {
modal.hidden = true;
openModalButton.focus();
}
openModalButton.addEventListener("click", openModal);
interpretationButton.addEventListener("click", openModal);
closeModalButton.addEventListener("click", closeModal);
modal.addEventListener("click", (event) => {
if (event.target === modal) closeModal();
});
let motionPaused = false;
motionButton.addEventListener("click", () => {
motionPaused = !motionPaused;
motionButton.setAttribute("aria-pressed", String(motionPaused));
motionButton.textContent = motionPaused
? "Resume ambient motion"
: "Pause ambient motion";
});
// Projected HTML hotspots.
const hotspots = [...document.querySelectorAll(".hotspot")];
const hotspotAnchors = {
arrivals: new THREE.Vector3(5, 2.6, 65),
water: new THREE.Vector3(31, 6.2, 19),
wayfinding: new THREE.Vector3(-18, 4.8, 4),
program: new THREE.Vector3(0, 10.5, -77)
};
const projected = new THREE.Vector3();
function updateHotspots() {
const width = window.innerWidth;
const height = window.innerHeight;
for (const hotspot of hotspots) {
const anchor = hotspotAnchors[hotspot.dataset.view];
projected.copy(anchor).project(camera);
const visible =
projected.z > -1 &&
projected.z < 1 &&
Math.abs(projected.x) < 1.12 &&
Math.abs(projected.y) < 1.12;
hotspot.style.display = visible ? "flex" : "none";
if (visible) {
hotspot.style.left = `${(projected.x * 0.5 + 0.5) * width}px`;
hotspot.style.top = `${(-projected.y * 0.5 + 0.5) * height}px`;
}
}
}
function updateCamera(dt) {
const smoothing = 1 - Math.exp(-dt * 5.5);
controls.theta += (controls.desiredTheta - controls.theta) * smoothing;
controls.phi += (controls.desiredPhi - controls.phi) * smoothing;
controls.radius += (controls.desiredRadius - controls.radius) * smoothing;
controls.target.lerp(controls.desiredTarget, smoothing);
const sinPhi = Math.sin(controls.phi);
camera.position.set(
controls.target.x + controls.radius * sinPhi * Math.sin(controls.theta),
controls.target.y + controls.radius * Math.cos(controls.phi),
controls.target.z + controls.radius * sinPhi * Math.cos(controls.theta)
);
camera.lookAt(controls.target);
}
function updatePeople(dt, elapsed) {
for (const person of people) {
if (!person.walking || motionPaused) continue;
person.z -= person.speed * dt;
person.root.position.z = person.z;
person.root.position.x =
person.baseX + Math.sin(elapsed * 0.52 + person.phase) * 0.22;
const stride = Math.sin(elapsed * 5.2 + person.phase);
const opposite = -stride;
person.legL.rotation.x = stride * 0.48;
person.legR.rotation.x = opposite * 0.48;
person.armL.rotation.x = opposite * 0.33;
person.armR.rotation.x = stride * 0.33;
person.root.position.y = Math.abs(Math.sin(elapsed * 5.2 + person.phase)) * 0.025;
if (person.z < -61) {
person.z = 112 + person.phase * 0.4;
person.root.position.z = person.z;
}
updateShadow(person, person.shadowIndex);
}
shadowMesh.instanceMatrix.needsUpdate = true;
}
function updateClouds(dt) {
if (motionPaused) return;
for (const cloud of clouds) {
cloud.position.x += dt * 0.45;
if (cloud.position.x > 135) cloud.position.x = -135;
}
}
window.addEventListener("resize", () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
});
const clock = new THREE.Clock();
let elapsed = 0;
function animate() {
requestAnimationFrame(animate);
const dt = Math.min(clock.getDelta(), 0.05);
elapsed += dt;
updateCamera(dt);
updatePeople(dt, elapsed);
updateClouds(dt);
updateHotspots();
renderer.render(scene, camera);
}
focusView("overview");
updateCamera(1);
animate();
requestAnimationFrame(() => {
loading.classList.add("hidden");
setTimeout(() => loading.remove(), 400);
});
</script>
</body>
</html>
```