Prompt specification
Build or customize the Three.js 3D scene "Bronze vessel silhouette and mold section" 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: Bronze vessel silhouette and mold section
Category: Art & Culture · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/bronze-vessel-silhouette-and-mold-section-x2317
Scene Description Prompt:
A stylized bronze vessel beside its matching mold cavity, highlighting positive and negative shapes. Three.js from cdnjs, one HTML file.
Working Three.js Starter (bronze-vessel-silhouette-and-mold-section-x2317):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bronze / Reversed — Positive and Negative Form</title>
<style>
:root {
color-scheme: light;
--ink: #2f2a25;
--muted: #766d63;
--paper: #eee8dd;
--bronze: #a8642d;
--clay: #a8977e;
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: var(--paper);
color: var(--ink);
font-family: Inter, ui-sans-serif, system-ui, -apple-system,
BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#stage {
position: fixed;
inset: 0;
}
canvas {
display: block;
width: 100%;
height: 100%;
touch-action: none;
cursor: grab;
}
canvas:active {
cursor: grabbing;
}
.title {
position: fixed;
top: 30px;
left: 34px;
z-index: 3;
pointer-events: none;
max-width: 340px;
}
.eyebrow {
margin: 0 0 10px;
color: var(--bronze);
font-size: 10px;
font-weight: 750;
letter-spacing: 0.23em;
text-transform: uppercase;
}
h1 {
margin: 0;
font-family: Georgia, "Times New Roman", serif;
font-size: clamp(30px, 4vw, 54px);
font-weight: 400;
line-height: 0.95;
letter-spacing: -0.045em;
}
.subtitle {
margin: 13px 0 0;
color: var(--muted);
font-size: 12px;
line-height: 1.55;
letter-spacing: 0.035em;
}
.badge {
position: fixed;
top: 32px;
right: 34px;
z-index: 3;
padding: 8px 11px;
border: 1px solid rgba(65, 54, 43, 0.18);
border-radius: 999px;
color: var(--muted);
background: rgba(248, 244, 236, 0.58);
backdrop-filter: blur(12px);
pointer-events: none;
font-size: 9px;
font-weight: 700;
letter-spacing: 0.17em;
text-transform: uppercase;
}
.object-label {
position: fixed;
z-index: 4;
min-width: 126px;
padding: 9px 11px 10px;
border: 1px solid rgba(55, 46, 38, 0.13);
border-radius: 9px;
background: rgba(248, 244, 236, 0.78);
box-shadow: 0 8px 30px rgba(56, 43, 31, 0.08);
backdrop-filter: blur(12px);
pointer-events: none;
transform: translate(-50%, -100%);
transition: opacity 150ms ease;
}
.object-label::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
width: 1px;
height: 28px;
background: linear-gradient(rgba(55, 46, 38, 0.3), transparent);
}
.object-label strong {
display: block;
font-size: 10px;
letter-spacing: 0.16em;
text-transform: uppercase;
}
.object-label small {
display: block;
margin-top: 4px;
color: var(--muted);
font-family: Georgia, "Times New Roman", serif;
font-size: 12px;
font-style: italic;
}
#positive-label strong {
color: var(--bronze);
}
#negative-label strong {
color: #756653;
}
.instructions {
position: fixed;
left: 50%;
bottom: 24px;
z-index: 3;
padding: 8px 13px;
border: 1px solid rgba(65, 54, 43, 0.12);
border-radius: 999px;
color: var(--muted);
background: rgba(248, 244, 236, 0.62);
backdrop-filter: blur(10px);
pointer-events: none;
transform: translateX(-50%);
white-space: nowrap;
font-size: 9px;
font-weight: 650;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.legend {
position: fixed;
right: 34px;
bottom: 28px;
z-index: 3;
display: flex;
gap: 16px;
pointer-events: none;
color: var(--muted);
font-size: 9px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.legend span {
display: flex;
align-items: center;
gap: 6px;
}
.legend i {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--bronze);
}
.legend span:last-child i {
background: var(--clay);
}
#loading {
position: fixed;
inset: 0;
z-index: 10;
display: grid;
place-items: center;
background: var(--paper);
color: var(--muted);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
transition: opacity 350ms ease;
}
@media (max-width: 700px) {
.title {
top: 22px;
left: 22px;
}
.badge {
top: 22px;
right: 20px;
}
.subtitle {
max-width: 230px;
}
.legend {
display: none;
}
.instructions {
bottom: 16px;
}
.object-label {
min-width: 105px;
padding: 7px 9px;
}
}
</style>
</head>
<body>
<div id="stage"></div>
<header class="title">
<p class="eyebrow">Study 01 / Form & Void</p>
<h1>Bronze<br />Reversed</h1>
<p class="subtitle">
A cast vessel and its matching negative cavity, presented as two
readings of the same silhouette.
</p>
</header>
<div class="badge">Procedural · Three.js</div>
<div id="positive-label" class="object-label">
<strong>01 / Positive</strong>
<small>Cast bronze vessel</small>
</div>
<div id="negative-label" class="object-label">
<strong>02 / Negative</strong>
<small>Mould cavity</small>
</div>
<div class="instructions">Drag to orbit · Scroll or pinch to zoom</div>
<div class="legend">
<span><i></i> Object</span>
<span><i></i> Imprint</span>
</div>
<div id="loading">Preparing the study…</div>
<script type="module">
import * as THREE from
"https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
const stage = document.querySelector("#stage");
const loading = document.querySelector("#loading");
const renderer = new THREE.WebGLRenderer({
antialias: true,
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.08;
stage.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xeee8dd);
scene.fog = new THREE.Fog(0xeee8dd, 12, 24);
const camera = new THREE.PerspectiveCamera(
38,
window.innerWidth / window.innerHeight,
0.1,
60
);
const cameraTarget = new THREE.Vector3(0, 1.5, 0);
let cameraYaw = 0.14;
let cameraPitch = 1.19;
let cameraRadius = window.innerWidth / window.innerHeight < 0.8
? 16.5
: 8.7;
let userMovedCamera = false;
// A procedural equirectangular environment gives the metal readable
// reflections without loading any external assets or Three.js addons.
function createEnvironment() {
const canvas = document.createElement("canvas");
canvas.width = 1024;
canvas.height = 512;
const context = canvas.getContext("2d");
const sky = context.createLinearGradient(0, 0, 0, canvas.height);
sky.addColorStop(0, "#d9e0df");
sky.addColorStop(0.42, "#f4ead9");
sky.addColorStop(0.68, "#887968");
sky.addColorStop(1, "#272624");
context.fillStyle = sky;
context.fillRect(0, 0, canvas.width, canvas.height);
function lightCard(x, y, radius, color) {
const glow = context.createRadialGradient(
x, y, 0,
x, y, radius
);
glow.addColorStop(0, color);
glow.addColorStop(0.35, color);
glow.addColorStop(1, "rgba(255,255,255,0)");
context.fillStyle = glow;
context.fillRect(
x - radius,
y - radius,
radius * 2,
radius * 2
);
}
lightCard(245, 125, 155, "rgba(255,250,224,0.95)");
lightCard(670, 165, 195, "rgba(220,235,238,0.82)");
lightCard(850, 285, 125, "rgba(255,218,169,0.48)");
const texture = new THREE.CanvasTexture(canvas);
texture.mapping = THREE.EquirectangularReflectionMapping;
texture.colorSpace = THREE.SRGBColorSpace;
texture.needsUpdate = true;
return texture;
}
scene.environment = createEnvironment();
const hemisphere = new THREE.HemisphereLight(
0xfff6e6,
0x625c54,
1.55
);
scene.add(hemisphere);
const keyLight = new THREE.DirectionalLight(0xffe4bd, 3.25);
keyLight.position.set(-4.5, 8, 6.5);
keyLight.castShadow = true;
keyLight.shadow.mapSize.set(2048, 2048);
keyLight.shadow.camera.left = -7;
keyLight.shadow.camera.right = 7;
keyLight.shadow.camera.top = 7;
keyLight.shadow.camera.bottom = -2;
keyLight.shadow.camera.near = 0.5;
keyLight.shadow.camera.far = 24;
keyLight.shadow.bias = -0.0003;
keyLight.shadow.normalBias = 0.025;
keyLight.target.position.set(0, 1, 0);
scene.add(keyLight, keyLight.target);
const fillLight = new THREE.PointLight(0xc9e2e6, 26, 16, 2);
fillLight.position.set(5.5, 3.5, 5);
scene.add(fillLight);
const rimLight = new THREE.SpotLight(
0xffb76c,
42,
18,
Math.PI / 5,
0.65,
1.6
);
rimLight.position.set(-1, 6, -5);
rimLight.target.position.set(0, 1.5, 0);
scene.add(rimLight, rimLight.target);
const cavityLight = new THREE.PointLight(0xffe0b7, 9, 7, 2);
cavityLight.position.set(2.05, 2.8, 4.2);
scene.add(cavityLight);
const materials = {
bronze: new THREE.MeshStandardMaterial({
color: 0xa45f28,
metalness: 0.88,
roughness: 0.26,
envMapIntensity: 1.2
}),
bronzeDark: new THREE.MeshStandardMaterial({
color: 0x643117,
metalness: 0.9,
roughness: 0.34,
envMapIntensity: 1.05
}),
bronzeLight: new THREE.MeshStandardMaterial({
color: 0xd08b49,
metalness: 0.82,
roughness: 0.2,
envMapIntensity: 1.3
}),
clayFace: new THREE.MeshStandardMaterial({
color: 0xc4b6a0,
metalness: 0,
roughness: 0.83
}),
claySide: new THREE.MeshStandardMaterial({
color: 0x8e7d69,
metalness: 0,
roughness: 0.92
}),
cavity: new THREE.MeshStandardMaterial({
color: 0x51463b,
metalness: 0,
roughness: 0.96,
side: THREE.DoubleSide
}),
base: new THREE.MeshStandardMaterial({
color: 0x6c6b63,
metalness: 0.03,
roughness: 0.78
}),
ground: new THREE.MeshStandardMaterial({
color: 0xe8e1d5,
metalness: 0,
roughness: 0.96
})
};
const display = new THREE.Group();
scene.add(display);
function roundedRectShape(width, height, radius) {
const x = -width / 2;
const y = -height / 2;
const shape = new THREE.Shape();
shape.moveTo(x + radius, y);
shape.lineTo(x + width - radius, y);
shape.quadraticCurveTo(x + width, y, x + width, y + radius);
shape.lineTo(x + width, y + height - radius);
shape.quadraticCurveTo(
x + width,
y + height,
x + width - radius,
y + height
);
shape.lineTo(x + radius, y + height);
shape.quadraticCurveTo(
x,
y + height,
x,
y + height - radius
);
shape.lineTo(x, y + radius);
shape.quadraticCurveTo(x, y, x + radius, y);
return shape;
}
// Ground and shared presentation plinth.
const ground = new THREE.Mesh(
new THREE.PlaneGeometry(60, 60),
materials.ground
);
ground.rotation.x = -Math.PI / 2;
ground.position.y = -0.12;
ground.receiveShadow = true;
display.add(ground);
const baseGeometry = new THREE.ExtrudeGeometry(
roundedRectShape(8.5, 2.7, 0.28),
{
depth: 0.18,
bevelEnabled: true,
bevelSegments: 4,
bevelSize: 0.055,
bevelThickness: 0.04,
curveSegments: 18
}
);
const base = new THREE.Mesh(baseGeometry, materials.base);
base.rotation.x = -Math.PI / 2;
base.position.y = -0.09;
base.receiveShadow = true;
base.castShadow = true;
display.add(base);
// The exact outer profile used for both the vessel and its negative.
const outerProfile = [
[0.00, 0.00],
[0.48, 0.00],
[0.56, 0.05],
[0.58, 0.16],
[0.52, 0.25],
[0.66, 0.38],
[0.92, 0.58],
[1.12, 0.88],
[1.22, 1.22],
[1.20, 1.55],
[1.08, 1.86],
[0.88, 2.08],
[0.64, 2.24],
[0.52, 2.32],
[0.50, 2.55],
[0.56, 2.60],
[0.56, 2.70],
[0.47, 2.72]
];
const innerProfile = [
[0.43, 2.70],
[0.43, 2.36],
[0.55, 2.25],
[0.80, 2.04],
[0.99, 1.81],
[1.10, 1.54],
[1.12, 1.24],
[1.03, 0.94],
[0.85, 0.66],
[0.58, 0.47],
[0.35, 0.34],
[0.00, 0.30]
];
// Circular plinth supporting the positive bronze form.
const vesselPlinth = new THREE.Mesh(
new THREE.CylinderGeometry(1.39, 1.46, 0.22, 96),
materials.base
);
vesselPlinth.position.set(-2.05, 0.19, 0);
vesselPlinth.castShadow = true;
vesselPlinth.receiveShadow = true;
display.add(vesselPlinth);
// Positive form: a hollow, lathed bronze vessel.
const vesselProfile = [...outerProfile, ...innerProfile].map(
([radius, height]) => new THREE.Vector2(radius, height)
);
const vesselGeometry = new THREE.LatheGeometry(vesselProfile, 128);
vesselGeometry.computeVertexNormals();
const vessel = new THREE.Mesh(vesselGeometry, materials.bronze);
vessel.position.set(-2.05, 0.30, 0);
vessel.castShadow = true;
vessel.receiveShadow = true;
display.add(vessel);
function addBronzeBand(radius, height, tube, material) {
const band = new THREE.Mesh(
new THREE.TorusGeometry(radius, tube, 14, 112),
material
);
band.rotation.x = Math.PI / 2;
band.position.set(-2.05, 0.30 + height, 0);
band.castShadow = true;
display.add(band);
}
addBronzeBand(0.555, 0.16, 0.028, materials.bronzeDark);
addBronzeBand(1.085, 1.84, 0.025, materials.bronzeLight);
addBronzeBand(0.515, 2.48, 0.022, materials.bronzeDark);
addBronzeBand(0.515, 2.685, 0.033, materials.bronzeLight);
// A small frontal medallion gives the bronze object a crafted focal point.
const medallion = new THREE.Mesh(
new THREE.CylinderGeometry(0.135, 0.135, 0.036, 48),
materials.bronzeLight
);
medallion.rotation.x = Math.PI / 2;
medallion.position.set(-2.05, 1.55, 1.205);
medallion.castShadow = true;
display.add(medallion);
const medallionCenter = new THREE.Mesh(
new THREE.CylinderGeometry(0.052, 0.052, 0.041, 40),
materials.bronzeDark
);
medallionCenter.rotation.x = Math.PI / 2;
medallionCenter.position.set(-2.05, 1.55, 1.229);
medallionCenter.castShadow = true;
display.add(medallionCenter);
// Negative form: a clay block with a deep, vessel-shaped cavity.
const blockWidth = 3.22;
const blockHeight = 3.72;
const blockOutline = roundedRectShape(
blockWidth,
blockHeight,
0.16
);
const cavityBase = -blockHeight / 2 + 0.22;
const cavityPath = new THREE.Shape();
// Clockwise vessel silhouette, used as a true hole in the block.
cavityPath.moveTo(0, cavityBase);
for (let i = 1; i < outerProfile.length; i++) {
const [radius, height] = outerProfile[i];
cavityPath.lineTo(-radius, cavityBase + height);
}
const last = outerProfile[outerProfile.length - 1];
cavityPath.lineTo(last[0], cavityBase + last[1]);
for (let i = outerProfile.length - 2; i >= 1; i--) {
const [radius, height] = outerProfile[i];
cavityPath.lineTo(radius, cavityBase + height);
}
cavityPath.closePath();
blockOutline.holes.push(cavityPath);
const blockGeometry = new THREE.ExtrudeGeometry(blockOutline, {
depth: 0.50,
steps: 1,
bevelEnabled: true,
bevelSegments: 4,
bevelSize: 0.052,
bevelThickness: 0.052,
curveSegments: 24
});
const moldBlock = new THREE.Mesh(
blockGeometry,
[materials.clayFace, materials.claySide]
);
moldBlock.position.set(2.05, 0.08 + blockHeight / 2, 0);
moldBlock.castShadow = true;
moldBlock.receiveShadow = true;
display.add(moldBlock);
// Dark back wall makes the hole read as a deep cavity rather than a cutout.
const cavityBackGeometry = new THREE.ShapeGeometry(cavityPath, 24);
const cavityBack = new THREE.Mesh(
cavityBackGeometry,
materials.cavity
);
cavityBack.position.set(2.05, 0.08 + blockHeight / 2, -0.205);
cavityBack.receiveShadow = true;
display.add(cavityBack);
// Subtle inner rim catches the light around the negative silhouette.
const rimPoints = cavityPath.getPoints(160).map(
(point) => new THREE.Vector3(
point.x + 2.05,
point.y + 0.08 + blockHeight / 2,
0.558
)
);
const rimGeometry = new THREE.BufferGeometry().setFromPoints(rimPoints);
const rim = new THREE.Line(
rimGeometry,
new THREE.LineBasicMaterial({
color: 0xd9cbb6,
transparent: true,
opacity: 0.58
})
);
display.add(rim);
// A few small surface marks make the mould feel hand-worked.
const markMaterial = new THREE.MeshStandardMaterial({
color: 0x9e8e77,
roughness: 0.94
});
for (let i = 0; i < 7; i++) {
const mark = new THREE.Mesh(
new THREE.BoxGeometry(0.09, 0.012, 0.018),
markMaterial
);
mark.position.set(
2.05 - 1.05 + i * 0.35,
0.08 + blockHeight - 0.18,
0.585
);
mark.rotation.z = (i % 2 ? 1 : -1) * 0.16;
display.add(mark);
}
// Custom camera controls, implemented directly without addons.
const pointers = new Map();
let previousPinchDistance = 0;
function clamp(value, min, max) {
return Math.max(min, Math.min(max, value));
}
function updateCamera() {
const sinPitch = Math.sin(cameraPitch);
const cosPitch = Math.cos(cameraPitch);
camera.position.set(
cameraTarget.x +
cameraRadius * sinPitch * Math.sin(cameraYaw),
cameraTarget.y +
cameraRadius * cosPitch,
cameraTarget.z +
cameraRadius * sinPitch * Math.cos(cameraYaw)
);
camera.lookAt(cameraTarget);
}
renderer.domElement.addEventListener("pointerdown", (event) => {
pointers.set(event.pointerId, {
x: event.clientX,
y: event.clientY
});
renderer.domElement.setPointerCapture(event.pointerId);
userMovedCamera = true;
});
renderer.domElement.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;
pointers.set(event.pointerId, {
x: event.clientX,
y: event.clientY
});
if (pointers.size === 1) {
cameraYaw -= dx * 0.0055;
cameraPitch = clamp(
cameraPitch + dy * 0.0048,
0.67,
1.43
);
} else if (pointers.size === 2) {
const points = [...pointers.values()];
const distance = Math.hypot(
points[0].x - points[1].x,
points[0].y - points[1].y
);
if (previousPinchDistance > 0) {
cameraRadius = clamp(
cameraRadius * (previousPinchDistance / distance),
5.2,
21
);
}
previousPinchDistance = distance;
}
});
function releasePointer(event) {
pointers.delete(event.pointerId);
previousPinchDistance = 0;
}
renderer.domElement.addEventListener(
"pointerup",
releasePointer
);
renderer.domElement.addEventListener(
"pointercancel",
releasePointer
);
renderer.domElement.addEventListener(
"wheel",
(event) => {
event.preventDefault();
userMovedCamera = true;
cameraRadius = clamp(
cameraRadius + event.deltaY * 0.006,
5.2,
21
);
},
{ passive: false }
);
renderer.domElement.addEventListener("contextmenu", (event) => {
event.preventDefault();
});
function resize() {
const width = window.innerWidth;
const height = window.innerHeight;
const aspect = width / height;
camera.aspect = aspect;
camera.updateProjectionMatrix();
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
renderer.setSize(width, height);
if (!userMovedCamera) {
cameraRadius = aspect < 0.8 ? 16.5 : 8.7;
}
}
window.addEventListener("resize", resize);
const positiveLabel = document.querySelector("#positive-label");
const negativeLabel = document.querySelector("#negative-label");
const positiveAnchor = new THREE.Vector3(
-2.05,
3.40,
0.10
);
const negativeAnchor = new THREE.Vector3(
2.05,
4.13,
0.20
);
function positionLabel(element, worldPosition) {
const projected = worldPosition.clone().project(camera);
const visible = projected.z > -1 && projected.z < 1;
element.style.opacity = visible ? "1" : "0";
element.style.left = `${(projected.x * 0.5 + 0.5) * window.innerWidth}px`;
element.style.top = `${(-projected.y * 0.5 + 0.5) * window.innerHeight}px`;
}
updateCamera();
resize();
function animate() {
requestAnimationFrame(animate);
positionLabel(positiveLabel, positiveAnchor);
positionLabel(negativeLabel, negativeAnchor);
renderer.render(scene, camera);
}
renderer.render(scene, camera);
animate();
requestAnimationFrame(() => {
loading.style.opacity = "0";
setTimeout(() => loading.remove(), 400);
});
</script>
</body>
</html>
```