Prompt specification
Build or customize the Three.js 3D scene "Artifact Stand With Provenance Card" 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: Artifact Stand With Provenance Card
Category: Art & Culture · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/artifact-stand-with-provenance-card-x3309
Scene Description Prompt:
Artifact stand with provenance card. Model a neutral object stand with separate fields for observation, source, and interpretation. Keep unknown entries visibly empty rather than filling them with invented details. Please build this with Three.js from cdnjs in one self-contained HTML file, using stylized solid shapes.
Working Three.js Starter (artifact-stand-with-provenance-card-x3309):
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Artifact Stand with Provenance Card</title>
<style>
:root {
color-scheme: light;
--ink: #252a2d;
--muted: #666a68;
--paper: rgba(246, 243, 236, 0.88);
--line: rgba(37, 42, 45, 0.18);
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #d9d6cf;
color: var(--ink);
font-family: Arial, Helvetica, sans-serif;
}
#app {
position: fixed;
inset: 0;
}
canvas {
display: block;
width: 100%;
height: 100%;
cursor: grab;
touch-action: none;
outline: none;
}
canvas:active {
cursor: grabbing;
}
.hud {
position: fixed;
top: 24px;
left: 24px;
z-index: 2;
pointer-events: none;
}
.eyebrow {
margin: 0 0 7px;
color: var(--muted);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
}
h1 {
margin: 0;
font-family: Georgia, "Times New Roman", serif;
font-size: clamp(28px, 4vw, 48px);
font-weight: 400;
line-height: 1;
letter-spacing: -0.035em;
}
.subtitle {
margin: 10px 0 0;
color: var(--muted);
font-size: 13px;
}
.note {
display: inline-block;
margin-top: 16px;
padding: 9px 12px;
border: 1px solid var(--line);
border-radius: 3px;
background: var(--paper);
backdrop-filter: blur(8px);
color: var(--muted);
font-size: 11px;
line-height: 1.45;
}
.reset {
position: fixed;
top: 24px;
right: 24px;
z-index: 3;
appearance: none;
padding: 10px 14px;
border: 1px solid var(--line);
border-radius: 3px;
background: var(--paper);
color: var(--ink);
cursor: pointer;
font: 600 11px Arial, Helvetica, sans-serif;
letter-spacing: 0.08em;
text-transform: uppercase;
backdrop-filter: blur(8px);
transition:
background 160ms ease,
transform 160ms ease;
}
.reset:hover {
background: rgba(255, 255, 255, 0.96);
transform: translateY(-1px);
}
.reset:focus-visible {
outline: 2px solid #4f5b60;
outline-offset: 3px;
}
.guide {
position: fixed;
right: 24px;
bottom: 22px;
z-index: 2;
color: rgba(37, 42, 45, 0.62);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
pointer-events: none;
}
@media (max-width: 640px) {
.hud {
top: 18px;
left: 18px;
}
.note {
max-width: 230px;
margin-top: 12px;
}
.reset {
top: 18px;
right: 18px;
padding: 9px 11px;
}
.guide {
right: 18px;
bottom: 16px;
font-size: 9px;
}
}
</style>
</head>
<body>
<main id="app"></main>
<header class="hud">
<p class="eyebrow">Collection display</p>
<h1>Artifact stand</h1>
<p class="subtitle">Provenance card</p>
<div class="note">
Observation, source, and interpretation are separate fields.
Unrecorded information is intentionally left blank.
</div>
</header>
<button class="reset" id="reset" type="button">Reset view</button>
<div class="guide">Drag to orbit · Scroll to zoom · Double-click to reset</div>
<script type="module">
import * as THREE from
"https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
const app = document.querySelector("#app");
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.05;
renderer.domElement.tabIndex = 0;
renderer.domElement.setAttribute(
"aria-label",
"Interactive 3D artifact stand with a blank provenance card"
);
app.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xd9d6cf);
scene.fog = new THREE.Fog(0xd9d6cf, 11, 24);
const camera = new THREE.PerspectiveCamera(
35,
window.innerWidth / window.innerHeight,
0.1,
50
);
const orbit = {
target: new THREE.Vector3(0.35, 1.35, 0),
radius: 8.8,
theta: 0.18,
phi: 1.18
};
function defaultRadius() {
const aspect = window.innerWidth / window.innerHeight;
if (aspect < 0.72) return 13.5;
if (aspect < 1.05) return 10.8;
return 8.8;
}
function updateCamera() {
const sinPhi = Math.sin(orbit.phi);
camera.position.set(
orbit.target.x + orbit.radius * sinPhi * Math.sin(orbit.theta),
orbit.target.y + orbit.radius * Math.cos(orbit.phi),
orbit.target.z + orbit.radius * sinPhi * Math.cos(orbit.theta)
);
camera.lookAt(orbit.target);
}
function resetView() {
orbit.radius = defaultRadius();
orbit.theta = 0.18;
orbit.phi = 1.18;
updateCamera();
}
orbit.radius = defaultRadius();
updateCamera();
// Lighting
const hemisphere = new THREE.HemisphereLight(0xffffff, 0x777269, 2.1);
scene.add(hemisphere);
const keyLight = new THREE.DirectionalLight(0xfff8eb, 3.1);
keyLight.position.set(-3.8, 7.2, 5.6);
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 = -7;
keyLight.shadow.camera.near = 0.5;
keyLight.shadow.camera.far = 20;
keyLight.shadow.bias = -0.00025;
scene.add(keyLight);
const fillLight = new THREE.DirectionalLight(0xdde7ed, 1.15);
fillLight.position.set(5, 3.8, -4);
scene.add(fillLight);
const frontLight = new THREE.PointLight(0xffffff, 12, 12, 2);
frontLight.position.set(1.5, 5.5, 6);
scene.add(frontLight);
// Ground
const floorMaterial = new THREE.MeshStandardMaterial({
color: 0xd6d2ca,
roughness: 0.98,
metalness: 0
});
const floor = new THREE.Mesh(
new THREE.PlaneGeometry(30, 30),
floorMaterial
);
floor.rotation.x = -Math.PI / 2;
floor.receiveShadow = true;
scene.add(floor);
// Soft contact-shadow texture
const shadowCanvas = document.createElement("canvas");
shadowCanvas.width = 256;
shadowCanvas.height = 256;
const shadowContext = shadowCanvas.getContext("2d");
const shadowGradient = shadowContext.createRadialGradient(
128, 128, 8,
128, 128, 124
);
shadowGradient.addColorStop(0, "rgba(30, 31, 30, 0.30)");
shadowGradient.addColorStop(0.48, "rgba(30, 31, 30, 0.13)");
shadowGradient.addColorStop(1, "rgba(30, 31, 30, 0)");
shadowContext.fillStyle = shadowGradient;
shadowContext.fillRect(0, 0, 256, 256);
const contactShadow = new THREE.Mesh(
new THREE.PlaneGeometry(4.1, 3.1),
new THREE.MeshBasicMaterial({
map: new THREE.CanvasTexture(shadowCanvas),
transparent: true,
depthWrite: false,
toneMapped: false
})
);
contactShadow.rotation.x = -Math.PI / 2;
contactShadow.position.set(-1.2, 0.006, 0.03);
scene.add(contactShadow);
// Display stand
const standMaterial = new THREE.MeshStandardMaterial({
color: 0xbcb6ab,
roughness: 0.83,
metalness: 0.02
});
const standEdgeMaterial = new THREE.MeshStandardMaterial({
color: 0xa9a398,
roughness: 0.78,
metalness: 0.03
});
function addCylinder(radius, height, y, material, radialSegments = 64) {
const mesh = new THREE.Mesh(
new THREE.CylinderGeometry(
radius,
radius,
height,
radialSegments
),
material
);
mesh.position.set(-1.25, y, 0);
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add(mesh);
return mesh;
}
addCylinder(1.03, 0.16, 0.08, standEdgeMaterial);
addCylinder(0.82, 0.56, 0.40, standMaterial);
addCylinder(0.97, 0.16, 0.80, standEdgeMaterial);
// Neutral, unidentified solid artifact
const profile = [
[0.00, 0.00],
[0.38, 0.00],
[0.58, 0.08],
[0.73, 0.29],
[0.77, 0.58],
[0.70, 0.88],
[0.57, 1.10],
[0.37, 1.28],
[0.27, 1.47],
[0.26, 1.68],
[0.37, 1.72],
[0.37, 1.85],
[0.28, 1.90],
[0.00, 1.90]
].map(([x, y]) => new THREE.Vector2(x, y));
const artifactGeometry = new THREE.LatheGeometry(profile, 40);
artifactGeometry.computeVertexNormals();
const artifactMaterial = new THREE.MeshStandardMaterial({
color: 0x42494c,
roughness: 0.7,
metalness: 0.06
});
const artifact = new THREE.Mesh(artifactGeometry, artifactMaterial);
artifact.position.set(-1.25, 0.88, 0);
artifact.castShadow = true;
artifact.receiveShadow = true;
scene.add(artifact);
// A restrained lip detail
const lip = new THREE.Mesh(
new THREE.TorusGeometry(0.325, 0.022, 8, 48),
new THREE.MeshStandardMaterial({
color: 0x343a3d,
roughness: 0.64,
metalness: 0.08
})
);
lip.rotation.x = Math.PI / 2;
lip.position.set(-1.25, 2.735, 0);
lip.castShadow = true;
scene.add(lip);
// Provenance card texture. All information fields are intentionally blank.
const cardCanvas = document.createElement("canvas");
cardCanvas.width = 1100;
cardCanvas.height = 1500;
const cardContext = cardCanvas.getContext("2d");
const cardWidth = cardCanvas.width;
const cardHeight = cardCanvas.height;
cardContext.fillStyle = "#f3eee4";
cardContext.fillRect(0, 0, cardWidth, cardHeight);
const paperGradient = cardContext.createLinearGradient(
0, 0, cardWidth, cardHeight
);
paperGradient.addColorStop(0, "rgba(255,255,255,0.30)");
paperGradient.addColorStop(0.55, "rgba(255,255,255,0)");
paperGradient.addColorStop(1, "rgba(96,82,60,0.06)");
cardContext.fillStyle = paperGradient;
cardContext.fillRect(0, 0, cardWidth, cardHeight);
// Border
cardContext.strokeStyle = "#aaa294";
cardContext.lineWidth = 4;
cardContext.strokeRect(34, 34, cardWidth - 68, cardHeight - 68);
cardContext.strokeStyle = "#d1c9bc";
cardContext.lineWidth = 2;
cardContext.strokeRect(54, 54, cardWidth - 108, cardHeight - 108);
// Card heading
cardContext.fillStyle = "#252a2d";
cardContext.font = "600 34px Arial, Helvetica, sans-serif";
cardContext.letterSpacing = "3px";
cardContext.fillText("PROVENANCE CARD", 92, 132);
cardContext.fillStyle = "#777168";
cardContext.font = "22px Arial, Helvetica, sans-serif";
cardContext.fillText("OBJECT RECORD", 92, 177);
cardContext.strokeStyle = "#8e887e";
cardContext.lineWidth = 3;
cardContext.beginPath();
cardContext.moveTo(92, 210);
cardContext.lineTo(cardWidth - 92, 210);
cardContext.stroke();
function drawBlankSection(title, top, lines) {
cardContext.fillStyle = "#2d3234";
cardContext.font = "700 27px Arial, Helvetica, sans-serif";
cardContext.letterSpacing = "2px";
cardContext.fillText(title, 92, top);
cardContext.strokeStyle = "#c2baad";
cardContext.lineWidth = 2;
for (let i = 0; i < lines; i++) {
const y = top + 68 + i * 58;
cardContext.beginPath();
cardContext.moveTo(92, y);
cardContext.lineTo(cardWidth - 92, y);
cardContext.stroke();
}
}
drawBlankSection("OBSERVATION", 285, 4);
drawBlankSection("SOURCE", 680, 4);
drawBlankSection("INTERPRETATION", 1075, 4);
// Bottom registration detail only; no provenance data.
cardContext.strokeStyle = "#9b9488";
cardContext.lineWidth = 2;
cardContext.beginPath();
cardContext.moveTo(92, 1414);
cardContext.lineTo(cardWidth - 92, 1414);
cardContext.stroke();
const cardTexture = new THREE.CanvasTexture(cardCanvas);
cardTexture.colorSpace = THREE.SRGBColorSpace;
cardTexture.anisotropy = Math.min(
8,
renderer.capabilities.getMaxAnisotropy()
);
// Card and easel
const cardEdgeMaterial = new THREE.MeshStandardMaterial({
color: 0xc6bdae,
roughness: 0.82,
metalness: 0.01
});
const cardBackMaterial = new THREE.MeshStandardMaterial({
color: 0xd7cfc1,
roughness: 0.88
});
const cardFrontMaterial = new THREE.MeshStandardMaterial({
map: cardTexture,
roughness: 0.9,
metalness: 0,
emissive: 0xffffff,
emissiveMap: cardTexture,
emissiveIntensity: 0.12
});
const card = new THREE.Mesh(
new THREE.BoxGeometry(1.84, 2.51, 0.085),
[
cardEdgeMaterial,
cardEdgeMaterial,
cardEdgeMaterial,
cardEdgeMaterial,
cardFrontMaterial,
cardBackMaterial
]
);
card.position.set(2.02, 1.96, 0.12);
card.rotation.y = 0.07;
card.castShadow = true;
card.receiveShadow = true;
scene.add(card);
const supportMaterial = new THREE.MeshStandardMaterial({
color: 0x77736c,
roughness: 0.62,
metalness: 0.12
});
const supportPost = new THREE.Mesh(
new THREE.BoxGeometry(0.13, 1.12, 0.13),
supportMaterial
);
supportPost.position.set(2.02, 0.56, -0.025);
supportPost.castShadow = true;
supportPost.receiveShadow = true;
scene.add(supportPost);
const supportFoot = new THREE.Mesh(
new THREE.BoxGeometry(1.18, 0.09, 0.48),
supportMaterial
);
supportFoot.position.set(2.02, 0.045, -0.015);
supportFoot.castShadow = true;
supportFoot.receiveShadow = true;
scene.add(supportFoot);
// Direct camera controls: no external controls module.
const canvas = renderer.domElement;
let dragging = false;
let pointerX = 0;
let pointerY = 0;
canvas.addEventListener("pointerdown", (event) => {
dragging = true;
pointerX = event.clientX;
pointerY = event.clientY;
canvas.setPointerCapture(event.pointerId);
});
canvas.addEventListener("pointermove", (event) => {
if (!dragging) return;
const deltaX = event.clientX - pointerX;
const deltaY = event.clientY - pointerY;
pointerX = event.clientX;
pointerY = event.clientY;
orbit.theta -= deltaX * 0.0055;
orbit.phi = THREE.MathUtils.clamp(
orbit.phi - deltaY * 0.0045,
0.66,
1.47
);
updateCamera();
});
function endDrag(event) {
dragging = false;
if (event.pointerId !== undefined &&
canvas.hasPointerCapture(event.pointerId)) {
canvas.releasePointerCapture(event.pointerId);
}
}
canvas.addEventListener("pointerup", endDrag);
canvas.addEventListener("pointercancel", endDrag);
canvas.addEventListener(
"wheel",
(event) => {
event.preventDefault();
orbit.radius = THREE.MathUtils.clamp(
orbit.radius + event.deltaY * 0.006,
5.8,
15.5
);
updateCamera();
},
{ passive: false }
);
canvas.addEventListener("dblclick", resetView);
canvas.addEventListener("keydown", (event) => {
const step = 0.07;
if (event.key === "ArrowLeft") orbit.theta += step;
else if (event.key === "ArrowRight") orbit.theta -= step;
else if (event.key === "ArrowUp") orbit.phi -= step;
else if (event.key === "ArrowDown") orbit.phi += step;
else if (event.key === "Home") {
resetView();
return;
} else {
return;
}
event.preventDefault();
orbit.phi = THREE.MathUtils.clamp(orbit.phi, 0.66, 1.47);
updateCamera();
});
document.querySelector("#reset").addEventListener("click", resetView);
window.addEventListener("resize", () => {
const width = window.innerWidth;
const height = window.innerHeight;
camera.aspect = width / height;
camera.updateProjectionMatrix();
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
renderer.setSize(width, height);
});
renderer.setAnimationLoop(() => {
renderer.render(scene, camera);
});
</script>
</body>
</html>
```