Prompt specification
Build or customize the Three.js 3D scene "Early papermaking workshop station" 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: Early papermaking workshop station
Category: Art & Culture · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/early-papermaking-workshop-station-x2274
Scene Description Prompt:
A historical Chinese papermaking station in cutaway, with vat, screen, pressing surface, and drying sheet; distinguish reconstructed details. Three.js from cdnjs, one HTML file.
Working Three.js Starter (early-papermaking-workshop-station-x2274):
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Chinese Papermaking Station — Interpretive Cutaway</title>
<style>
:root {
--ink: #20231f;
--paper: #eee5d0;
--paper-dim: #cfc5ae;
--attested: #58c7b5;
--reconstructed: #f1a84a;
--panel: rgba(27, 29, 25, .88);
--line: rgba(238, 229, 208, .2);
}
* { box-sizing: border-box; }
html, body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #24241f;
color: var(--paper);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
canvas {
display: block;
width: 100%;
height: 100%;
touch-action: none;
}
#ui {
position: fixed;
inset: 0;
pointer-events: none;
}
.glass {
background: var(--panel);
border: 1px solid var(--line);
box-shadow: 0 18px 50px rgba(0,0,0,.28);
backdrop-filter: blur(12px);
}
header {
position: absolute;
top: 18px;
left: 18px;
width: min(430px, calc(100vw - 36px));
padding: 15px 17px 14px;
border-radius: 5px;
pointer-events: auto;
}
.eyebrow {
color: var(--attested);
font-size: 10px;
font-weight: 800;
letter-spacing: .19em;
text-transform: uppercase;
}
h1 {
margin: 5px 0 4px;
font-family: Georgia, "Times New Roman", serif;
font-size: clamp(21px, 2.3vw, 31px);
font-weight: 500;
letter-spacing: .015em;
}
header p {
margin: 0;
color: var(--paper-dim);
font-size: 12px;
line-height: 1.45;
}
.model-note {
display: inline-flex;
align-items: center;
gap: 7px;
margin-top: 10px;
padding: 5px 8px;
border: 1px solid rgba(241,168,74,.42);
color: #ffd19a;
font-size: 9px;
font-weight: 800;
letter-spacing: .13em;
text-transform: uppercase;
}
.model-note::before {
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--reconstructed);
}
#controls {
position: absolute;
top: 18px;
right: 18px;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 7px;
max-width: min(430px, calc(100vw - 36px));
pointer-events: auto;
}
button {
appearance: none;
border: 1px solid rgba(238,229,208,.22);
border-radius: 4px;
padding: 8px 10px;
background: rgba(31,33,29,.88);
color: var(--paper);
font: inherit;
font-size: 10px;
font-weight: 750;
letter-spacing: .08em;
text-transform: uppercase;
cursor: pointer;
transition: background .18s, border-color .18s, transform .18s;
}
button:hover {
background: rgba(58,62,54,.96);
border-color: rgba(238,229,208,.5);
transform: translateY(-1px);
}
button.active {
border-color: var(--reconstructed);
color: #ffd19a;
background: rgba(91,59,27,.78);
}
#panel {
position: absolute;
left: 18px;
bottom: 20px;
width: min(355px, calc(100vw - 36px));
padding: 17px 18px;
border-radius: 5px;
pointer-events: auto;
transition: opacity .2s, transform .2s;
}
#panel .panel-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
#panel h2 {
margin: 4px 0 8px;
font: 500 24px/1.1 Georgia, serif;
}
#panel .tag {
display: inline-block;
margin: 0 0 9px;
color: var(--attested);
font-size: 9px;
font-weight: 800;
letter-spacing: .13em;
text-transform: uppercase;
}
#panel .tag.reconstructed { color: var(--reconstructed); }
#panel p {
margin: 0;
color: var(--paper-dim);
font-size: 12px;
line-height: 1.55;
}
#panel .evidence {
margin-top: 11px;
padding-top: 10px;
border-top: 1px solid var(--line);
color: #aaa18e;
font-size: 10px;
line-height: 1.45;
}
#panelClose {
padding: 3px 7px;
font-size: 14px;
line-height: 1;
}
#legend {
position: absolute;
right: 18px;
bottom: 20px;
width: 282px;
padding: 14px 15px;
border-radius: 5px;
pointer-events: auto;
}
.legend-title {
margin-bottom: 9px;
color: #aaa18e;
font-size: 9px;
font-weight: 800;
letter-spacing: .15em;
text-transform: uppercase;
}
.legend-row {
display: flex;
align-items: center;
gap: 9px;
margin-top: 7px;
color: var(--paper-dim);
font-size: 10px;
line-height: 1.35;
}
.swatch {
flex: 0 0 auto;
width: 24px;
height: 0;
border-top: 2px solid var(--attested);
}
.swatch.dashed {
border-top: 2px dashed var(--reconstructed);
}
.swatch.section {
border-top: 4px double #e2d5b7;
}
#sequence {
position: absolute;
left: 50%;
bottom: 22px;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 9px;
padding: 8px 12px;
border-radius: 4px;
color: var(--paper-dim);
font-size: 9px;
font-weight: 800;
letter-spacing: .12em;
text-transform: uppercase;
white-space: nowrap;
pointer-events: none;
}
#sequence b {
color: var(--paper);
font-weight: 800;
}
#sequence .arrow {
color: var(--reconstructed);
font-size: 13px;
}
#labels {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
}
.hotspot {
position: absolute;
display: flex;
align-items: center;
gap: 7px;
padding: 6px 9px 6px 6px;
border: 1px solid rgba(88,199,181,.55);
border-radius: 3px;
background: rgba(22,28,25,.88);
box-shadow: 0 7px 22px rgba(0,0,0,.25);
color: var(--paper);
font-size: 10px;
font-weight: 750;
letter-spacing: .035em;
white-space: nowrap;
transform: translate(-50%, -100%);
pointer-events: auto;
cursor: pointer;
transition: opacity .15s, background .15s;
}
.hotspot:hover {
background: rgba(39,52,47,.96);
}
.hotspot.reconstruction {
border-color: rgba(241,168,74,.65);
}
.hotspot .dot {
display: grid;
place-items: center;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--attested);
color: #142421;
font-size: 9px;
font-weight: 900;
}
.hotspot.reconstruction .dot {
background: var(--reconstructed);
color: #3b260d;
}
#loading {
position: fixed;
inset: 0;
z-index: 10;
display: grid;
place-items: center;
background: #24241f;
color: var(--paper-dim);
font: 12px/1.5 ui-sans-serif, system-ui, sans-serif;
letter-spacing: .14em;
text-transform: uppercase;
transition: opacity .5s;
}
#loading.hidden {
opacity: 0;
pointer-events: none;
}
@media (max-width: 900px) {
#legend { display: none; }
#sequence { display: none; }
#panel { max-width: 310px; }
header { max-width: 330px; }
#controls { top: auto; bottom: 20px; right: 12px; max-width: 230px; }
#panel { left: 12px; bottom: 12px; }
}
@media (max-width: 620px) {
header {
top: 10px;
left: 10px;
width: calc(100vw - 20px);
padding: 11px 12px;
}
header p { display: none; }
.model-note { margin-top: 7px; }
#controls {
top: 104px;
bottom: auto;
right: 10px;
max-width: calc(100vw - 20px);
}
#panel {
left: 10px;
bottom: 10px;
width: calc(100vw - 20px);
max-width: none;
}
.hotspot { font-size: 9px; }
}
</style>
</head>
<body>
<div id="loading">Building interpretive papermaking station…</div>
<div id="ui">
<header class="glass">
<div class="eyebrow">Station study · 抄纸工坊</div>
<h1>Chinese Papermaking Station</h1>
<p>
A generic cutaway interpretation of a premodern Chinese papermaking
sequence: suspension, sheet formation, pressing, and wall drying.
</p>
<div class="model-note">Generic model · not a named excavation</div>
</header>
<nav id="controls" aria-label="Scene controls">
<button data-view="overview" class="active">Overview</button>
<button data-view="forming">Vat & screen</button>
<button data-view="pressing">Pressing</button>
<button data-view="drying">Drying</button>
<button id="overlayToggle" class="active" aria-pressed="true">
Reconstruction overlays
</button>
<button id="reset">Reset camera</button>
</nav>
<div id="labels"></div>
<section id="panel" class="glass" aria-live="polite">
<div class="panel-top">
<div>
<div class="eyebrow">Interpretive element</div>
<h2 id="panelTitle">Vat</h2>
</div>
<button id="panelClose" aria-label="Close information">×</button>
</div>
<div id="panelTag" class="tag">Historically attested equipment type</div>
<p id="panelText"></p>
<div id="panelEvidence" class="evidence"></div>
</section>
<aside id="legend" class="glass">
<div class="legend-title">Evidence / interpretation key</div>
<div class="legend-row">
<span class="swatch"></span>
<span>Solid teal: equipment form attested in historical or traditional practice.</span>
</div>
<div class="legend-row">
<span class="swatch dashed"></span>
<span>Orange dashed: placement, linkage, motion, or joinery reconstructed here.</span>
</div>
<div class="legend-row">
<span class="swatch section"></span>
<span>Cut walls and exposed roof edges indicate the diagrammatic cutaway.</span>
</div>
</aside>
<div id="sequence" class="glass">
<b>01 Suspend</b><span class="arrow">→</span>
<b>02 Lift</b><span class="arrow">→</span>
<b>03 Press</b><span class="arrow">→</span>
<b>04 Dry</b>
</div>
</div>
<script type="module">
import * as THREE from
"https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
// ------------------------------------------------------------
// Utilities and deterministic procedural textures
// ------------------------------------------------------------
const $ = (s) => document.querySelector(s);
const clamp = THREE.MathUtils.clamp;
const lerp = THREE.MathUtils.lerp;
let seed = 84127;
function random() {
seed = (1664525 * seed + 1013904223) >>> 0;
return seed / 4294967296;
}
function canvasTexture(size, painter, repeatX = 1, repeatY = 1) {
const canvas = document.createElement("canvas");
canvas.width = canvas.height = size;
const ctx = canvas.getContext("2d");
painter(ctx, size);
const tex = new THREE.CanvasTexture(canvas);
tex.colorSpace = THREE.SRGBColorSpace;
tex.wrapS = tex.wrapT = THREE.RepeatWrapping;
tex.repeat.set(repeatX, repeatY);
tex.anisotropy = 8;
return tex;
}
const woodTexture = canvasTexture(512, (ctx, s) => {
ctx.fillStyle = "#855936";
ctx.fillRect(0, 0, s, s);
for (let i = 0; i < 650; i++) {
const x = random() * s;
const y = random() * s;
const len = 30 + random() * 180;
const bend = (random() - 0.5) * 15;
ctx.strokeStyle = random() > 0.45
? `rgba(43,24,12,${0.025 + random() * 0.12})`
: `rgba(220,169,102,${0.02 + random() * 0.09})`;
ctx.lineWidth = 0.4 + random() * 2.4;
ctx.beginPath();
ctx.moveTo(x, y);
ctx.bezierCurveTo(
x + bend, y + len * 0.33,
x - bend, y + len * 0.66,
x + bend * 0.2, y + len
);
ctx.stroke();
}
for (let i = 0; i < 12; i++) {
const x = random() * s;
const y = random() * s;
const r = 4 + random() * 10;
const g = ctx.createRadialGradient(x, y, 1, x, y, r);
g.addColorStop(0, "rgba(36,20,10,.6)");
g.addColorStop(1, "rgba(36,20,10,0)");
ctx.fillStyle = g;
ctx.fillRect(x - r, y - r, r * 2, r * 2);
}
}, 2, 2);
const plasterTexture = canvasTexture(512, (ctx, s) => {
ctx.fillStyle = "#c9b68e";
ctx.fillRect(0, 0, s, s);
for (let i = 0; i < 8500; i++) {
const v = random();
ctx.fillStyle = v > 0.5
? `rgba(255,245,211,${random() * 0.09})`
: `rgba(76,60,38,${random() * 0.09})`;
const r = 0.4 + random() * 2.2;
ctx.fillRect(random() * s, random() * s, r, r);
}
for (let i = 0; i < 45; i++) {
const x = random() * s;
const y = random() * s;
const r = 8 + random() * 45;
const g = ctx.createRadialGradient(x, y, 0, x, y, r);
g.addColorStop(0, "rgba(79,57,31,.06)");
g.addColorStop(1, "rgba(79,57,31,0)");
ctx.fillStyle = g;
ctx.fillRect(x - r, y - r, r * 2, r * 2);
}
}, 3, 2);
const floorTexture = canvasTexture(512, (ctx, s) => {
ctx.fillStyle = "#9b8967";
ctx.fillRect(0, 0, s, s);
for (let i = 0; i < 12000; i++) {
const c = random();
ctx.fillStyle = c > 0.5
? `rgba(245,229,185,${random() * 0.12})`
: `rgba(48,39,26,${random() * 0.13})`;
const r = 0.5 + random() * 2.7;
ctx.fillRect(random() * s, random() * s, r, r);
}
}, 7, 5);
const paperTexture = canvasTexture(512, (ctx, s) => {
ctx.fillStyle = "#e8d7ad";
ctx.fillRect(0, 0, s, s);
for (let i = 0; i < 1800; i++) {
const x = random() * s;
const y = random() * s;
const len = 2 + random() * 18;
const a = (random() - 0.5) * 0.35;
ctx.strokeStyle = `rgba(120,92,49,${0.025 + random() * 0.12})`;
ctx.lineWidth = 0.35 + random() * 0.65;
ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(x + Math.cos(a) * len, y + Math.sin(a) * len);
ctx.stroke();
}
const g = ctx.createRadialGradient(s / 2, s / 2, 20, s / 2, s / 2, s * 0.72);
g.addColorStop(0, "rgba(255,248,218,.2)");
g.addColorStop(1, "rgba(114,82,38,.12)");
ctx.fillStyle = g;
ctx.fillRect(0, 0, s, s);
});
const signTexture = canvasTexture(1024, (ctx, s) => {
ctx.fillStyle = "#30271e";
ctx.fillRect(0, 0, s, s);
ctx.strokeStyle = "#aa8450";
ctx.lineWidth = 7;
ctx.strokeRect(18, 18, s - 36, s - 36);
ctx.textAlign = "center";
ctx.fillStyle = "#e0c48d";
ctx.font = '500 116px "Songti SC", "Noto Serif CJK SC", serif';
ctx.fillText("抄纸工坊", s / 2, 160);
ctx.fillStyle = "#c6b794";
ctx.font = "700 31px sans-serif";
ctx.fillText("PAPERMAKING WORKSHOP", s / 2, 225);
ctx.fillStyle = "#9f8c69";
ctx.font = "22px sans-serif";
ctx.fillText("INTERPRETIVE STATION STUDY", s / 2, 268);
});
// ------------------------------------------------------------
// Renderer, camera, light
// ------------------------------------------------------------
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xb9b09e);
scene.fog = new THREE.Fog(0xb9b09e, 18, 34);
const camera = new THREE.PerspectiveCamera(
42, innerWidth / innerHeight, 0.1, 100
);
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(innerWidth, innerHeight);
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.05;
document.body.prepend(renderer.domElement);
scene.add(new THREE.HemisphereLight(0xf5e7c7, 0x504838, 2.15));
const sun = new THREE.DirectionalLight(0xffe1ac, 3.4);
sun.position.set(7, 12, 7);
sun.castShadow = true;
sun.shadow.mapSize.set(2048, 2048);
sun.shadow.camera.left = -9;
sun.shadow.camera.right = 9;
sun.shadow.camera.top = 9;
sun.shadow.camera.bottom = -9;
sun.shadow.camera.near = 1;
sun.shadow.camera.far = 30;
sun.shadow.bias = -0.00035;
scene.add(sun);
const warmFill = new THREE.PointLight(0xffbd72, 17, 9, 2);
warmFill.position.set(-3.2, 2.8, 0.3);
scene.add(warmFill);
const rim = new THREE.DirectionalLight(0xb6d7df, 1.1);
rim.position.set(-6, 6, -6);
scene.add(rim);
// ------------------------------------------------------------
// Materials
// ------------------------------------------------------------
const materials = {
wood: new THREE.MeshStandardMaterial({
map: woodTexture, roughness: .83, metalness: 0
}),
darkWood: new THREE.MeshStandardMaterial({
map: woodTexture, color: 0x8f725b, roughness: .9
}),
bamboo: new THREE.MeshStandardMaterial({
color: 0xb49a5d, roughness: .78
}),
stone: new THREE.MeshStandardMaterial({
color: 0x777364, roughness: .98
}),
darkStone: new THREE.MeshStandardMaterial({
color: 0x4b4c45, roughness: .94
}),
plaster: new THREE.MeshStandardMaterial({
map: plasterTexture, roughness: .96
}),
floor: new THREE.MeshStandardMaterial({
map: floorTexture, roughness: 1
}),
mortar: new THREE.MeshStandardMaterial({
color: 0x645d4f, roughness: 1
}),
paper: new THREE.MeshStandardMaterial({
map: paperTexture, color: 0xfff0c8, roughness: .93,
side: THREE.DoubleSide
}),
wetPaper: new THREE.MeshStandardMaterial({
map: paperTexture, color: 0xd7c493, roughness: .48,
transparent: true, opacity: .78, side: THREE.DoubleSide
}),
rope: new THREE.MeshStandardMaterial({
color: 0x9b835c, roughness: 1
}),
metal: new THREE.MeshStandardMaterial({
color: 0x454641, roughness: .55, metalness: .45
}),
cutFace: new THREE.MeshStandardMaterial({
color: 0xe3d4b3, roughness: 1
})
};
const brickMaterials = [
new THREE.MeshStandardMaterial({ color: 0x8f5d43, roughness: 1 }),
new THREE.MeshStandardMaterial({ color: 0x9b6849, roughness: 1 }),
new THREE.MeshStandardMaterial({ color: 0x80523d, roughness: 1 }),
new THREE.MeshStandardMaterial({ color: 0xa47756, roughness: 1 })
];
const waterMaterial = new THREE.MeshStandardMaterial({
color: 0x526f64,
roughness: .17,
metalness: .08,
transparent: true,
opacity: .78,
side: THREE.DoubleSide
});
// ------------------------------------------------------------
// Geometry helpers
// ------------------------------------------------------------
const reconstructionLines = [];
const attestedLines = [];
function box(w, h, d, material, x = 0, y = 0, z = 0, parent = scene) {
const mesh = new THREE.Mesh(new THREE.BoxGeometry(w, h, d), material);
mesh.position.set(x, y, z);
mesh.castShadow = true;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
function cylinder(radius, length, material, x = 0, y = 0, z = 0, parent = scene, radial = 12) {
const mesh = new THREE.Mesh(
new THREE.CylinderGeometry(radius, radius, length, radial),
material
);
mesh.position.set(x, y, z);
mesh.castShadow = true;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
function beamBetween(a, b, width, depth, material, parent = scene) {
const start = new THREE.Vector3(...a);
const end = new THREE.Vector3(...b);
const direction = end.clone().sub(start);
const mesh = new THREE.Mesh(
new THREE.BoxGeometry(width, direction.length(), depth),
material
);
mesh.position.copy(start).add(end).multiplyScalar(.5);
mesh.quaternion.setFromUnitVectors(
new THREE.Vector3(0, 1, 0),
direction.normalize()
);
mesh.castShadow = true;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
function cylinderBetween(a, b, radius, material, parent = scene, radial = 10) {
const start = new THREE.Vector3(...a);
const end = new THREE.Vector3(...b);
const direction = end.clone().sub(start);
const mesh = new THREE.Mesh(
new THREE.CylinderGeometry(radius, radius, direction.length(), radial),
material
);
mesh.position.copy(start).add(end).multiplyScalar(.5);
mesh.quaternion.setFromUnitVectors(
new THREE.Vector3(0, 1, 0),
direction.normalize()
);
mesh.castShadow = true;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
function edge(mesh, color, dashed = false, reconstruction = false) {
const geometry = new THREE.EdgesGeometry(mesh.geometry, 22);
const material = dashed
? new THREE.LineDashedMaterial({
color,
dashSize: .085,
gapSize: .055,
transparent: true,
opacity: .95,
depthTest: true
})
: new THREE.LineBasicMaterial({
color,
transparent: true,
opacity: .86
});
const line = new THREE.LineSegments(geometry, material);
line.scale.setScalar(1.006);
if (dashed) line.computeLineDistances();
mesh.add(line);
(reconstruction ? reconstructionLines : attestedLines).push(line);
return line;
}
function dashedPath(points, parent = scene, color = 0xf1a84a) {
const geometry = new THREE.BufferGeometry().setFromPoints(
points.map(p => new THREE.Vector3(...p))
);
const line = new THREE.Line(
geometry,
new THREE.LineDashedMaterial({
color,
dashSize: .09,
gapSize: .055,
transparent: true,
opacity: .9
})
);
line.computeLineDistances();
parent.add(line);
reconstructionLines.push(line);
return line;
}
function addBrickRow(axis, fixed, span, y, parent) {
const count = Math.ceil(span / .66);
const length = span / count;
for (let i = 0; i < count; i++) {
const offset = -span / 2 + length * (i + .5);
const material = brickMaterials[Math.floor(random() * brickMaterials.length)];
if (axis === "x") {
box(length - .045, .285, .28, material, offset, y, fixed, parent);
} else {
box(.28, .285, length - .045, material, fixed, y, offset, parent);
}
}
}
// ------------------------------------------------------------
// Architectural cutaway
// ------------------------------------------------------------
box(12.4, .36, 8.4, materials.darkStone, 0, -.23, 0);
box(11.85, .12, 7.85, materials.floor, 0, .015, 0);
// Exposed back and left walls; the front and roof are omitted.
box(11.65, 4.85, .20, materials.plaster, 0, 2.48, -3.82);
box(.20, 4.85, 7.45, materials.plaster, -5.72, 2.48, -.12);
// Visible wall-section edges.
box(.23, 4.88, .06, materials.cutFace, -5.72, 2.48, 3.60);
box(.06, 4.88, .23, materials.cutFace, 5.85, 2.48, -3.82);
// Timber posts and rails.
for (const x of [-5.48, -2.75, 0, 2.75, 5.48]) {
box(.19, 4.85, .24, materials.darkWood, x, 2.45, -3.67);
}
for (const z of [-3.4, -.6, 2.15]) {
box(.24, 4.85, .19, materials.darkWood, -5.56, 2.45, z);
}
box(11.25, .19, .24, materials.darkWood, 0, 4.58, -3.63);
box(.24, .19, 7.15, materials.darkWood, -5.54, 4.58, -.08);
// A restrained fragment of a curved tiled eave.
const eaveCurve = new THREE.CatmullRomCurve3([
new THREE.Vector3(-5.85, 4.83, -3.42),
new THREE.Vector3(-3.0, 4.98, -3.47),
new THREE.Vector3(0, 5.03, -3.52),
new THREE.Vector3(3.0, 4.98, -3.47),
new THREE.Vector3(5.85, 4.83, -3.42)
]);
const eave = new THREE.Mesh(
new THREE.TubeGeometry(eaveCurve, 64, .13, 8, false),
materials.darkWood
);
eave.castShadow = true;
scene.add(eave);
for (let i = 0; i < 29; i++) {
const x = -5.55 + i * .395;
const y = 5.12 - .0032 * x * x;
const tile = cylinder(.075, .92, materials.darkStone, x, y, -3.70);
tile.rotation.x = Math.PI / 2;
}
// Exhibit-style wall sign.
const sign = new THREE.Mesh(
new THREE.PlaneGeometry(2.65, .78),
new THREE.MeshStandardMaterial({
map: signTexture,
roughness: .85
})
);
sign.position.set(-3.55, 4.05, -3.66);
scene.add(sign);
// ------------------------------------------------------------
// 01: Masonry vat and fibre suspension
// ------------------------------------------------------------
const vat = new THREE.Group();
vat.position.set(-3.35, .07, .05);
scene.add(vat);
box(3.35, .15, 2.10, materials.mortar, 0, .11, 0, vat);
for (let row = 0; row < 3; row++) {
const y = .30 + row * .31;
addBrickRow("x", 1.00, 3.20, y, vat);
addBrickRow("x", -1.00, 3.20, y, vat);
addBrickRow("z", 1.60, 1.98, y, vat);
addBrickRow("z", -1.60, 1.98, y, vat);
}
// Stone coping around the water basin.
const copingFront = box(3.42, .16, .30, materials.stone, 0, 1.19, 1.03, vat);
const copingBack = box(3.42, .16, .30, materials.stone, 0, 1.19, -1.03, vat);
box(.30, .16, 1.78, materials.stone, -1.66, 1.19, 0, vat);
box(.30, .16, 1.78, materials.stone, 1.66, 1.19, 0, vat);
edge(copingFront, 0x58c7b5);
edge(copingBack, 0x58c7b5);
const water = new THREE.Mesh(
new THREE.PlaneGeometry(2.97, 1.76),
waterMaterial
);
water.rotation.x = -Math.PI / 2;
water.position.y = 1.00;
water.receiveShadow = true;
vat.add(water);
// Small cellulose flecks floating in the vat.
for (let i = 0; i < 35; i++) {
const fleck = box(
.035 + random() * .14,
.008,
.015 + random() * .035,
materials.wetPaper,
(random() - .5) * 2.65,
1.016,
(random() - .5) * 1.45,
vat
);
fleck.rotation.y = random() * Math.PI;
}
// Gentle bubbles.
for (let i = 0; i < 9; i++) {
const bubble = new THREE.Mesh(
new THREE.TorusGeometry(.025 + random() * .045, .008, 6, 18),
new THREE.MeshBasicMaterial({
color: 0xd9e4d6,
transparent: true,
opacity: .30
})
);
bubble.rotation.x = Math.PI / 2;
bubble.position.set(
(random() - .5) * 2.7,
1.023,
(random() - .5) * 1.5
);
vat.add(bubble);
}
// ------------------------------------------------------------
// 02: Bamboo sheet-forming screen / mould
// ------------------------------------------------------------
const screen = new THREE.Group();
screen.position.set(-3.35, 1.45, .08);
screen.rotation.x = .27;
scene.add(screen);
const screenTop = box(2.86, .09, .095, materials.bamboo, 0, 0, .77, screen);
const screenBottom = box(2.86, .09, .095, materials.bamboo, 0, 0, -.77, screen);
const screenLeft = box(.095, .09, 1.54, materials.bamboo, -1.43, 0, 0, screen);
const screenRight = box(.095, .09, 1.54, materials.bamboo, 1.43, 0, 0, screen);
edge(screenTop, 0x58c7b5);
edge(screenBottom, 0x58c7b5);
edge(screenLeft, 0x58c7b5);
edge(screenRight, 0x58c7b5);
// Bamboo lattice.
for (let z = -.68; z <= .69; z += .12) {
cylinder(.012, 2.68, materials.bamboo, 0, .018, z, screen, 6);
}
for (let x = -1.34; x <= 1.35; x += .12) {
cylinder(.012, 1.36, materials.bamboo, x, .025, 0, screen, 6);
}
// The newly formed wet sheet on the screen.
const formingSheet = new THREE.Mesh(
new THREE.PlaneGeometry(2.53, 1.29),
materials.wetPaper
);
formingSheet.rotation.x = -Math.PI / 2;
formingSheet.position.y = .055;
formingSheet.receiveShadow = true;
screen.add(formingSheet);
const screenHandleLeft = box(.55, .07, .08, materials.bamboo, -1.70, 0, 0, screen);
const screenHandleRight = box(.55, .07, .08, materials.bamboo, 1.70, 0, 0, screen);
edge(screenHandleLeft, 0xf1a84a, true, true);
edge(screenHandleRight, 0xf1a84a, true, true);
// Dashed path suggests the inferred lift-and-transfer motion.
dashedPath([
[-4.85, 1.18, .85],
[-4.82, 1.66, .73],
[-4.65, 2.03, .42],
[-4.30, 2.16, .02]
]);
// A wooden mixing paddle resting in the vat.
cylinderBetween(
[-4.15, 1.02, .55],
[-3.83, 1.76, .25],
.035,
materials.wood,
vat
);
const paddleBlade = box(.36, .055, .26, materials.wood, -4.16, 1.00, .58, vat);
paddleBlade.rotation.y = -.35;
// ------------------------------------------------------------
// 03: Pressing surface, stack, board and reconstructed linkage
// ------------------------------------------------------------
const press = new THREE.Group();
press.position.set(-.15, 0, .28);
scene.add(press);
// Low timber stand.
for (const x of [-1.03, 1.03]) {
for (const z of [-.65, .65]) {
box(.17, 1.02, .17, materials.darkWood, x, .56, z, press);
}
}
box(2.50, .16, 1.68, materials.darkWood, 0, 1.02, 0, press);
// Main pressing slab.
const pressingSlab = box(2.66, .22, 1.80, materials.stone, 0, 1.20, 0, press);
edge(pressingSlab, 0x58c7b5);
// Chipped little stones around the slab edge.
for (let i = 0; i < 9; i++) {
const chip = new THREE.Mesh(
new THREE.DodecahedronGeometry(.055 + random() * .035, 0),
materials.stone
);
chip.position.set(
-1.15 + random() * 2.3,
1.32,
.82 + (random() - .5) * .08
);
chip.rotation.set(random(), random(), random());
chip.castShadow = true;
press.add(chip);
}
// Pressed paper stack.
for (let i = 0; i < 13; i++) {
const layer = box(
.90 - random() * .025,
.014,
.67 - random() * .025,
materials.paper,
-.64 + (random() - .5) * .035,
1.335 + i * .018,
.20 + (random() - .5) * .028,
press
);
layer.rotation.y = (random() - .5) * .035;
}
// Upper pressing board and heavy stone weight.
const pressBoard = box(1.04, .085, .75, materials.darkWood, -.64, 1.58, .20, press);
pressBoard.rotation.z = -.025;
const pressStone = new THREE.Mesh(
new THREE.DodecahedronGeometry(.46, 1),
materials.darkStone
);
pressStone.scale.set(1.05, .60, .82);
pressStone.position.set(-.64, 1.86, .20);
pressStone.rotation.set(.05, .25, -.04);
pressStone.castShadow = true;
pressStone.receiveShadow = true;
press.add(pressStone);
// Reconstructed lever frame: solid construction plus orange evidence edges.
const postA = box(.16, 2.08, .18, materials.darkWood, -1.12, 2.25, -.60, press);
const postB = box(.16, 2.08, .18, materials.darkWood, 1.12, 2.25, -.60, press);
const crossbeam = box(2.55, .18, .23, materials.darkWood, 0, 3.26, -.60, press);
const lever = beamBetween(
[0, 2.94, -.60],
[0, 2.48, 1.12],
.14,
.16,
materials.wood,
press
);
edge(postA, 0xf1a84a, true, true);
edge(postB, 0xf1a84a, true, true);
edge(crossbeam, 0xf1a84a, true, true);
edge(lever, 0xf1a84a, true, true);
cylinderBetween(
[0, 2.48, 1.12],
[-.64, 2.12, .20],
.026,
materials.rope,
press,
8
);
cylinderBetween(
[-.64, 2.12, .20],
[-.64, 2.05, .20],
.028,
materials.rope,
press,
8
);
// ------------------------------------------------------------
// 04: Drying wall and a pasted sheet with a curled corner
// ------------------------------------------------------------
const dryingWall = new THREE.Group();
dryingWall.position.set(3.72, 0, -3.60);
scene.add(dryingWall);
box(2.45, 2.85, .055, materials.plaster, 0, 2.27, -.09, dryingWall);
const drySheetGeometry = new THREE.PlaneGeometry(1.82, 2.22, 16, 20);
const dryPositions = drySheetGeometry.attributes.position;
for (let i = 0; i < dryPositions.count; i++) {
const x = dryPositions.getX(i);
const y = dryPositions.getY(i);
const u = x / 1.82 + .5;
const v = y / 2.22 + .5;
const waviness =
Math.sin(u * Math.PI * 3.2) * .025 +
Math.sin(v * Math.PI * 2.1 + .6) * .017;
const cornerCurl =
Math.max(0, u - .64) *
Math.max(0, .43 - v) *
1.28;
dryPositions.setZ(i, waviness + cornerCurl);
}
drySheetGeometry.computeVertexNormals();
const drySheet = new THREE.Mesh(drySheetGeometry, materials.paper);
drySheet.position.set(0, 2.28, .005);
drySheet.castShadow = true;
drySheet.receiveShadow = true;
dryingWall.add(drySheet);
// A teal outline indicates the historically attested drying-sheet element.
const sheetBoundary = new THREE.Line(
new THREE.BufferGeometry().setFromPoints([
new THREE.Vector3(-.91, 1.17, .015),
new THREE.Vector3(.91, 1.17, .015),
new THREE.Vector3(.91, 3.39, .015),
new THREE.Vector3(-.91, 3.39, .015),
new THREE.Vector3(-.91, 1.17, .015)
]),
new THREE.LineBasicMaterial({
color: 0x58c7b5,
transparent: true,
opacity: .88
})
);
dryingWall.add(sheetBoundary);
attestedLines.push(sheetBoundary);
// Interpreted lower drying ledge and stored boards.
const dryingLedge = box(2.20, .12, .34, materials.darkWood, 0, 1.02, .21, dryingWall);
edge(dryingLedge, 0xf1a84a, true, true);
for (let i = 0; i < 5; i++) {
const board = box(
1.65 + random() * .25,
.045,
.26,
materials.wood,
.18,
1.13 + i * .052,
.24,
dryingWall
);
board.rotation.y = (random() - .5) * .04;
}
// ------------------------------------------------------------
// Working props and material preparation
// ------------------------------------------------------------
// Bamboo strips / bark fibre stock beside the vat.
for (let i = 0; i < 34; i++) {
const strip = cylinder(
.018 + random() * .012,
.8 + random() * 1.0,
materials.bamboo,
-4.35 + (random() - .5) * .55,
.08 + i * .025,
2.08 + (random() - .5) * .48
);
strip.rotation.z = Math.PI / 2;
strip.rotation.y = (random() - .5) * .25;
}
// Low side table with a neat stack of dried sheets.
box(1.75, .12, 1.20, materials.wood, 1.72, .83, 1.60);
for (const x of [1.02, 2.42]) {
for (const z of [1.15, 2.05]) {
box(.11, .78, .11, materials.darkWood, x, .42, z);
}
}
for (let i = 0; i < 18; i++) {
const sheet = box(
1.10,
.012,
.70,
materials.paper,
1.72 + (random() - .5) * .035,
.91 + i * .013,
1.60 + (random() - .5) * .025
);
sheet.rotation.y = (random() - .5) * .025;
}
// Turned bowl for mixing pulp.
const bowlProfile = [
new THREE.Vector2(0, 0),
new THREE.Vector2(.18, .015),
new THREE.Vector2(.32, .12),
new THREE.Vector2(.43, .30),
new THREE.Vector2(.43, .34),
new THREE.Vector2(.35, .34),
new THREE.Vector2(.28, .18),
new THREE.Vector2(.12, .10),
new THREE.Vector2(0, .10)
];
const bowl = new THREE.Mesh(
new THREE.LatheGeometry(bowlProfile, 28),
materials.darkWood
);
bowl.position.set(.25, .08, 2.28);
bowl.castShadow = true;
bowl.receiveShadow = true;
scene.add(bowl);
const bowlWater = new THREE.Mesh(
new THREE.CircleGeometry(.37, 28),
new THREE.MeshStandardMaterial({
color: 0x8f9270,
roughness: .3,
transparent: true,
opacity: .72
})
);
bowlWater.rotation.x = -Math.PI / 2;
bowlWater.position.set(.25, .37, 2.28);
scene.add(bowlWater);
// A brush leaning beside the drying wall.
cylinderBetween(
[4.86, .12, -2.73],
[5.12, 2.35, -3.13],
.035,
materials.wood
);
const brushHead = box(.32, .55, .13, materials.darkWood, 5.12, 2.50, -3.13);
brushHead.rotation.z = -.12;
// A few damp footprints/steps leading from the vat to the press.
const stepMaterial = new THREE.MeshStandardMaterial({
color: 0x716b5b,
roughness: 1
});
for (let i = 0; i < 4; i++) {
const step = new THREE.Mesh(
new THREE.CylinderGeometry(.30, .34, .09, 7),
stepMaterial
);
step.position.set(-2.18 + i * .52, .10, 1.62 - i * .09);
step.rotation.y = random() * .8;
step.receiveShadow = true;
scene.add(step);
}
// Dust motes.
const dustGeometry = new THREE.BufferGeometry();
const dustPositions = [];
for (let i = 0; i < 180; i++) {
dustPositions.push(
(random() - .5) * 11,
.3 + random() * 4.8,
(random() - .5) * 7
);
}
dustGeometry.setAttribute(
"position",
new THREE.Float32BufferAttribute(dustPositions, 3)
);
const dust = new THREE.Points(
dustGeometry,
new THREE.PointsMaterial({
color: 0xf2dfb3,
size: .025,
transparent: true,
opacity: .32,
depthWrite: false
})
);
scene.add(dust);
// ------------------------------------------------------------
// Custom camera controls: orbit, pan, wheel/pinch zoom
// ------------------------------------------------------------
const cameraControl = {
target: new THREE.Vector3(0, 1.45, 0),
desiredTarget: new THREE.Vector3(0, 1.45, 0),
theta: .72,
desiredTheta: .72,
phi: 1.06,
desiredPhi: 1.06,
radius: 14.2,
desiredRadius: 14.2
};
function setView(name) {
const views = {
overview: {
target: [0, 1.45, 0],
theta: .72,
phi: 1.06,
radius: innerWidth < 700 ? 16.4 : 14.2
},
forming: {
target: [-3.25, 1.35, .15],
theta: .60,
phi: 1.10,
radius: 7.4
},
pressing: {
target: [-.10, 1.70, .25],
theta: .70,
phi: 1.03,
radius: 7.0
},
drying: {
target: [3.65, 2.05, -3.15],
theta: .56,
phi: 1.13,
radius: 6.7
}
};
const v = views[name];
cameraControl.desiredTarget.set(...v.target);
cameraControl.desiredTheta = v.theta;
cameraControl.desiredPhi = v.phi;
cameraControl.desiredRadius = v.radius;
document.querySelectorAll("[data-view]").forEach(button => {
button.classList.toggle("active", button.dataset.view === name);
});
}
const canvas = renderer.domElement;
const pointers = new Map();
let dragged = false;
let panning = false;
let lastPinch = 0;
canvas.addEventListener("contextmenu", event => event.preventDefault());
canvas.addEventListener("pointerdown", event => {
canvas.setPointerCapture(event.pointerId);
pointers.set(event.pointerId, {
x: event.clientX,
y: event.clientY,
startX: event.clientX,
startY: event.clientY,
button: event.button
});
dragged = true;
panning = event.button === 2 || event.shiftKey;
lastPinch = 0;
});
canvas.addEventListener("pointermove", event => {
if (!pointers.has(event.pointerId)) return;
const previous = pointers.get(event.pointerId);
const dx = event.clientX - previous.x;
const dy = event.clientY - previous.y;
previous.x = event.clientX;
previous.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 (lastPinch) {
cameraControl.desiredRadius *= lastPinch / distance;
}
lastPinch = distance;
return;
}
if (!dragged) return;
if (panning) {
const scale = cameraControl.desiredRadius * .00125;
const right = new THREE.Vector3()
.setFromMatrixColumn(camera.matrix, 0)
.setY(0)
.normalize();
cameraControl.desiredTarget.addScaledVector(right, -dx * scale);
cameraControl.desiredTarget.y += dy * scale;
cameraControl.desiredTarget.x = clamp(
cameraControl.desiredTarget.x, -5, 5
);
cameraControl.desiredTarget.y = clamp(
cameraControl.desiredTarget.y, .2, 4.2
);
cameraControl.desiredTarget.z = clamp(
cameraControl.desiredTarget.z, -3.3, 3.3
);
} else {
cameraControl.desiredTheta -= dx * .005;
cameraControl.desiredPhi = clamp(
cameraControl.desiredPhi - dy * .0045,
.48,
1.43
);
}
});
function endPointer(event) {
pointers.delete(event.pointerId);
if (pointers.size < 2) lastPinch = 0;
if (pointers.size === 0) dragged = false;
}
canvas.addEventListener("pointerup", endPointer);
canvas.addEventListener("pointercancel", endPointer);
canvas.addEventListener("wheel", event => {
event.preventDefault();
cameraControl.desiredRadius = clamp(
cameraControl.desiredRadius * Math.exp(event.deltaY * .001),
3.5,
23
);
}, { passive: false });
function updateCamera() {
const smoothing = .095;
cameraControl.target.lerp(cameraControl.desiredTarget, smoothing);
cameraControl.theta = lerp(
cameraControl.theta, cameraControl.desiredTheta, smoothing
);
cameraControl.phi = lerp(
cameraControl.phi, cameraControl.desiredPhi, smoothing
);
cameraControl.radius = lerp(
cameraControl.radius, cameraControl.desiredRadius, smoothing
);
const offset = new THREE.Vector3().setFromSpherical(
new THREE.Spherical(
cameraControl.radius,
cameraControl.phi,
cameraControl.theta
)
);
camera.position.copy(cameraControl.target).add(offset);
camera.lookAt(cameraControl.target);
}
// ------------------------------------------------------------
// DOM annotations and evidence descriptions
// ------------------------------------------------------------
const details = {
vat: {
number: "01",
title: "Vat",
tag: "Historically attested equipment type",
reconstructed: false,
text:
"The vat holds a suspension of water and prepared plant fibre. " +
"Masonry basins are plausible in many workshop contexts, but the " +
"materials, proportions, and drainage shown here are representative.",
evidence:
"The basin function is secure. Its brick build, water level, and " +
"placement in this cutaway are interpretive rather than site-specific."
},
screen: {
number: "02",
title: "Sheet-forming screen",
tag: "Equipment form attested · angle reconstructed",
reconstructed: false,
text:
"A bamboo-framed mould with a fine lattice lifts a newly formed " +
"sheet from the vat. The handles, lattice, and wet pulp represent " +
"the basic forming equipment.",
evidence:
"The screen/mould type is historically and traditionally attested. " +
"Its lifted angle, handle shape, and transfer motion are reconstructed."
},
press: {
number: "03",
title: "Pressing surface",
tag: "Function attested · linkage reconstructed",
reconstructed: false,
text:
"Wet sheets are stacked on a firm slab and compressed with a board " +
"and heavy stone weight. The lower surface also serves as a place " +
"for separating and aligning the formed sheets.",
evidence:
"Pressing and stacking are attested. The lever frame, cord routing, " +
"and particular stone-and-board arrangement are interpretive."
},
dry: {
number: "04",
title: "Drying sheet",
tag: "Drying sheet attested · support arrangement reconstructed",
reconstructed: false,
text:
"A formed sheet is pasted or hung against a warm drying wall. " +
"The curled edge exposes the thinness of the sheet and the change " +
"in shape as moisture leaves it.",
evidence:
"Wall drying of paper is historically attested. The ledge, stored " +
"boards, paper dimensions, and curl shown here are reconstructed."
},
reconstruction: {
number: "R",
title: "Reconstructed linkage",
tag: "Interpretive detail",
reconstructed: true,
text:
"Orange dashed geometry marks details introduced to make the " +
"process readable: lever connections, cord routing, screen motion, " +
"and drying supports.",
evidence:
"These lines do not claim direct archaeological evidence. They " +
"separate a representative reconstruction from historically attested " +
"equipment types."
}
};
const hotspotDefs = [
{ key: "vat", anchor: [-3.35, 1.42, 1.12] },
{ key: "screen", anchor: [-3.45, 1.92, .24] },
{ key: "press", anchor: [-.15, 1.35, 1.21] },
{ key: "dry", anchor: [3.72, 3.58, -3.48] },
{ key: "reconstruction", anchor: [.05, 3.42, -.28] }
];
const hotspots = [];
for (const def of hotspotDefs) {
const data = details[def.key];
const element = document.createElement("button");
element.className = "hotspot" + (data.reconstructed ? " reconstruction" : "");
element.innerHTML =
`<span class="dot">${data.number}</span>` +
`<span>${data.title}</span>`;
element.setAttribute("aria-label", `Show information: ${data.title}`);
element.addEventListener("click", () => showDetails(def.key));
$("#labels").appendChild(element);
hotspots.push({
element,
anchor: new THREE.Vector3(...def.anchor),
visible: true
});
}
function showDetails(key) {
const data = details[key];
$("#panelTitle").textContent = data.title;
$("#panelTag").textContent = data.tag;
$("#panelTag").classList.toggle("reconstructed", data.reconstructed);
$("#panelText").textContent = data.text;
$("#panelEvidence").textContent = data.evidence;
$("#panel").style.opacity = "1";
$("#panel").style.transform = "translateY(0)";
}
$("#panelClose").addEventListener("click", () => {
$("#panel").style.opacity = ".25";
$("#panel").style.transform = "translateY(8px)";
});
document.querySelectorAll("[data-view]").forEach(button => {
button.addEventListener("click", () => setView(button.dataset.view));
});
$("#reset").addEventListener("click", () => setView("overview"));
let overlaysVisible = true;
$("#overlayToggle").addEventListener("click", () => {
overlaysVisible = !overlaysVisible;
reconstructionLines.forEach(line => {
line.visible = overlaysVisible;
});
$("#overlayToggle").classList.toggle("active", overlaysVisible);
$("#overlayToggle").setAttribute("aria-pressed", String(overlaysVisible));
$("#overlayToggle").textContent = overlaysVisible
? "Reconstruction overlays"
: "Overlays hidden";
});
// ------------------------------------------------------------
// Resize and render loop
// ------------------------------------------------------------
function resize() {
camera.aspect = innerWidth / innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(innerWidth, innerHeight);
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
}
addEventListener("resize", resize);
const projected = new THREE.Vector3();
const clock = new THREE.Clock();
function updateHotspots() {
const width = innerWidth;
const height = innerHeight;
for (const hotspot of hotspots) {
projected.copy(hotspot.anchor).project(camera);
const onScreen =
projected.z > -1 &&
projected.z < 1 &&
Math.abs(projected.x) < 1.15 &&
Math.abs(projected.y) < 1.15;
hotspot.element.style.display = onScreen ? "flex" : "none";
if (onScreen) {
const x = (projected.x * .5 + .5) * width;
const y = (-projected.y * .5 + .5) * height;
hotspot.element.style.left = `${x}px`;
hotspot.element.style.top = `${y}px`;
}
}
}
function animate() {
requestAnimationFrame(animate);
const time = clock.getElapsedTime();
waterMaterial.opacity = .765 + Math.sin(time * .72) * .018;
warmFill.intensity = 16.5 + Math.sin(time * .55) * .7;
dust.rotation.y = time * .006;
// A nearly imperceptible screen movement keeps the station alive.
screen.rotation.x = .27 + Math.sin(time * .38) * .003;
updateCamera();
updateHotspots();
renderer.render(scene, camera);
}
showDetails("vat");
updateCamera();
animate();
requestAnimationFrame(() => {
$("#loading").classList.add("hidden");
setTimeout(() => $("#loading").remove(), 600);
});
</script>
</body>
</html>
```