Prompt specification
Build or customize the Three.js 3D scene "Original Voxel Courier Silhouette" 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: Original Voxel Courier Silhouette
Category: Voxel Worlds · Style: Voxel 3D
License: MIT · Reference: https://three3d.app/scene/original-voxel-courier-silhouette-x3753
Scene Description Prompt:
Original voxel courier silhouette. Build a compact voxel courier with a distinctive cap, satchel, and boot proportions. Keep features recognizable from front and side without relying on texture detail. Please build this with Three.js from cdnjs in one self-contained HTML file, using visible voxel blocks.
Working Three.js Starter (original-voxel-courier-silhouette-x3753):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Parcel Runner — Voxel Courier</title>
<style>
:root {
color-scheme: light;
--ink: #173247;
--paper: #f5efe3;
--accent: #d95842;
--mustard: #e2ad3c;
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #e9e1d3;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", sans-serif;
}
canvas {
display: block;
width: 100%;
height: 100%;
touch-action: none;
cursor: grab;
}
canvas:active {
cursor: grabbing;
}
.title-card {
position: fixed;
top: 24px;
left: 28px;
z-index: 10;
pointer-events: none;
color: var(--ink);
}
.eyebrow {
margin: 0 0 6px;
font-size: 11px;
font-weight: 800;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--accent);
}
h1 {
margin: 0;
font-size: clamp(24px, 3vw, 38px);
line-height: 0.95;
letter-spacing: -0.055em;
text-transform: uppercase;
}
.subtitle {
margin: 9px 0 0;
font-size: 13px;
font-weight: 600;
opacity: 0.68;
}
.controls {
position: fixed;
left: 50%;
bottom: 24px;
z-index: 10;
display: flex;
align-items: center;
gap: 8px;
padding: 8px;
transform: translateX(-50%);
border: 1px solid rgba(23, 50, 71, 0.13);
border-radius: 16px;
background: rgba(250, 246, 238, 0.84);
box-shadow: 0 12px 40px rgba(31, 44, 50, 0.14);
backdrop-filter: blur(12px);
}
.controls button {
min-width: 68px;
padding: 10px 15px;
border: 0;
border-radius: 10px;
color: var(--ink);
background: transparent;
font: inherit;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
cursor: pointer;
transition:
color 160ms ease,
background 160ms ease,
transform 160ms ease;
}
.controls button:hover {
background: rgba(23, 50, 71, 0.07);
}
.controls button:active {
transform: translateY(1px);
}
.controls button.active {
color: #fffaf1;
background: var(--ink);
}
.hint {
position: fixed;
right: 26px;
bottom: 28px;
z-index: 10;
color: rgba(23, 50, 71, 0.64);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
pointer-events: none;
}
@media (max-width: 720px) {
.title-card {
top: 18px;
left: 18px;
}
.subtitle {
display: none;
}
.hint {
display: none;
}
.controls {
bottom: 16px;
}
.controls button {
min-width: 58px;
padding: 10px 11px;
font-size: 10px;
}
}
</style>
</head>
<body>
<canvas id="scene" aria-label="Interactive three-dimensional voxel courier"></canvas>
<div class="title-card">
<p class="eyebrow">Original voxel character</p>
<h1>Parcel<br />Runner</h1>
<p class="subtitle">Compact courier silhouette · built from visible blocks</p>
</div>
<div class="controls" role="group" aria-label="Camera views">
<button data-view="front">Front</button>
<button data-view="side">Side</button>
<button data-view="hero" class="active">3/4</button>
</div>
<div class="hint">Drag to orbit · Scroll to zoom</div>
<script type="module">
import * as THREE from "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
const canvas = document.querySelector("#scene");
const renderer = new THREE.WebGLRenderer({
canvas,
antialias: true,
powerPreference: "high-performance"
});
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
renderer.setSize(window.innerWidth, window.innerHeight, false);
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.12;
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xe9e1d3);
scene.fog = new THREE.Fog(0xe9e1d3, 17, 30);
const camera = new THREE.OrthographicCamera(-6, 6, 4, -4, 0.1, 60);
const target = new THREE.Vector3(0, 2.4, 0);
const orbitRadius = 12;
const viewPresets = {
front: { theta: 0, phi: 0.14 },
side: { theta: Math.PI / 2, phi: 0.16 },
hero: { theta: 0.63, phi: 0.28 }
};
const desired = {
theta: viewPresets.hero.theta,
phi: viewPresets.hero.phi,
zoom: 1
};
const current = {
theta: desired.theta,
phi: desired.phi,
zoom: desired.zoom
};
const hemisphere = new THREE.HemisphereLight(0xfff6e6, 0x69798a, 2.25);
scene.add(hemisphere);
const keyLight = new THREE.DirectionalLight(0xfff2dc, 4.1);
keyLight.position.set(5.5, 9, 7);
keyLight.castShadow = true;
keyLight.shadow.mapSize.set(2048, 2048);
keyLight.shadow.camera.left = -6;
keyLight.shadow.camera.right = 6;
keyLight.shadow.camera.top = 7;
keyLight.shadow.camera.bottom = -3;
keyLight.shadow.camera.near = 1;
keyLight.shadow.camera.far = 24;
keyLight.shadow.bias = -0.00025;
keyLight.shadow.normalBias = 0.025;
scene.add(keyLight);
const rimLight = new THREE.DirectionalLight(0xb9dcff, 1.55);
rimLight.position.set(-5, 5, -6);
scene.add(rimLight);
const standard = (color, roughness = 0.82) =>
new THREE.MeshStandardMaterial({
color,
roughness,
metalness: 0.02
});
const materials = {
coat: standard(0x28536b),
coatLight: standard(0x396a80),
coatDark: standard(0x1c3d52),
pants: standard(0x182d40),
boot: standard(0x25343b),
bootDark: standard(0x101c22),
cap: standard(0xd95842),
capLight: standard(0xeb7254),
capDark: standard(0xad3e31),
skin: standard(0xe9aa78),
skinLight: standard(0xf2ba87),
skinDark: standard(0xc9855c),
mustard: standard(0xe2ad3c),
mustardDark: standard(0xb77a22),
leather: standard(0x8b5535),
leatherLight: standard(0xb87543),
leatherDark: standard(0x613722),
cream: standard(0xf5e8c9),
eye: standard(0x14232b, 0.5),
silver: standard(0xaeb9b5, 0.48),
ground: standard(0xd6cbb8),
groundAlt: standard(0xdfd4c1),
groundDark: standard(0xc9beab),
parcel: standard(0xb88752),
parcelDark: standard(0x91623a)
};
const unitBox = new THREE.BoxGeometry(1, 1, 1);
function block(parent, material, x, y, z, width, height, depth, gap = 0.026) {
const mesh = new THREE.Mesh(unitBox, material);
mesh.position.set(x, y, z);
mesh.scale.set(
Math.max(0.01, width - gap),
Math.max(0.01, height - gap),
Math.max(0.01, depth - gap)
);
mesh.castShadow = true;
mesh.receiveShadow = true;
parent.add(mesh);
return mesh;
}
// Tiled voxel floor.
const floor = new THREE.Group();
scene.add(floor);
const tileMaterials = [
materials.ground,
materials.groundAlt,
materials.groundDark
];
for (let ix = -4; ix <= 4; ix++) {
for (let iz = -4; iz <= 4; iz++) {
const variation = (ix * 7 + iz * 11 + 32) % 13;
const material = tileMaterials[variation < 3 ? 1 : variation < 5 ? 2 : 0];
block(
floor,
material,
ix * 1.1,
-0.035,
iz * 1.1,
1.04,
0.07,
1.04,
0.035
);
}
}
// A few low parcel stacks to reinforce the courier theme.
const props = new THREE.Group();
scene.add(props);
function makeParcel(x, z, size, y = 0) {
block(
props,
materials.parcel,
x,
y + size / 2,
z,
size,
size,
size,
0.025
);
block(
props,
materials.mustard,
x,
y + size / 2 + 0.006,
z + size / 2 + 0.012,
size * 0.18,
size * 0.94,
0.045,
0.008
);
block(
props,
materials.parcelDark,
x,
y + size + 0.016,
z,
size * 0.94,
0.055,
size * 0.94,
0.009
);
}
makeParcel(-2.35, -1.65, 0.78);
makeParcel(-2.32, -1.62, 0.52, 0.79);
makeParcel(2.55, -1.8, 0.66);
makeParcel(2.58, -1.82, 0.44, 0.67);
// Small voxel route marker.
block(props, materials.mustard, 2.55, 0.22, 0.55, 0.46, 0.4, 0.46);
block(props, materials.cream, 2.55, 0.47, 0.55, 0.3, 0.14, 0.3);
// Courier character.
const courier = new THREE.Group();
scene.add(courier);
// Chunky boots with oversized soles and forward toes.
for (const x of [-0.48, 0.48]) {
block(courier, materials.bootDark, x, 0.13, 0.25, 0.66, 0.18, 1.02);
block(courier, materials.boot, x, 0.45, -0.14, 0.59, 0.5, 0.59);
block(courier, materials.boot, x, 0.37, 0.43, 0.62, 0.4, 0.55);
block(courier, materials.bootDark, x, 0.73, -0.05, 0.53, 0.3, 0.51);
block(courier, materials.mustardDark, x, 0.25, 0.69, 0.42, 0.1, 0.07, 0.012);
}
// Trouser legs.
for (const x of [-0.45, 0.45]) {
block(courier, materials.pants, x, 1.03, -0.04, 0.44, 0.43, 0.44);
block(courier, materials.pants, x, 1.43, -0.04, 0.44, 0.43, 0.44);
block(courier, materials.coatDark, x, 1.02, 0.205, 0.27, 0.23, 0.07, 0.012);
}
// Torso: two voxel layers deep.
for (const y of [1.82, 2.25, 2.68]) {
for (const x of [-0.47, 0, 0.47]) {
for (const z of [-0.2, 0.2]) {
const material =
y === 2.68 && x === 0 ? materials.coatLight : materials.coat;
block(courier, material, x, y, z, 0.43, 0.43, 0.43);
}
}
}
// Belt and front tailoring.
block(courier, materials.bootDark, 0, 1.66, 0.43, 0.68, 0.1, 0.08, 0.012);
block(courier, materials.mustard, 0, 1.66, 0.49, 0.14, 0.12, 0.08, 0.01);
block(courier, materials.silver, 0, 2.08, 0.44, 0.07, 0.24, 0.07, 0.01);
block(courier, materials.silver, 0, 2.45, 0.44, 0.07, 0.22, 0.07, 0.01);
block(courier, materials.coatLight, -0.32, 2.02, 0.44, 0.28, 0.22, 0.08, 0.014);
block(courier, materials.coatLight, 0.32, 2.02, 0.44, 0.28, 0.22, 0.08, 0.014);
// Chest badge, made as a raised block rather than a texture.
block(courier, materials.cream, 0.36, 2.5, 0.455, 0.2, 0.2, 0.08, 0.012);
block(courier, materials.mustard, 0.36, 2.5, 0.505, 0.1, 0.1, 0.05, 0.008);
// Left arm hanging down.
block(courier, materials.coatLight, -0.89, 2.61, 0, 0.4, 0.42, 0.42);
block(courier, materials.coat, -0.94, 2.2, 0.02, 0.38, 0.4, 0.4);
block(courier, materials.coat, -0.94, 1.8, 0.08, 0.37, 0.38, 0.38);
block(courier, materials.mustard, -0.94, 1.45, 0.08, 0.36, 0.16, 0.36);
block(courier, materials.skinLight, -0.94, 1.19, 0.08, 0.34, 0.34, 0.34);
// Right arm bends forward toward the satchel.
block(courier, materials.coatLight, 0.89, 2.61, -0.02, 0.4, 0.42, 0.42);
block(courier, materials.coat, 0.96, 2.2, 0.04, 0.38, 0.4, 0.4);
block(courier, materials.coat, 0.78, 1.91, 0.4, 0.38, 0.39, 0.39);
block(courier, materials.mustard, 0.59, 1.81, 0.49, 0.36, 0.16, 0.35);
block(courier, materials.skinLight, 0.47, 1.75, 0.51, 0.33, 0.33, 0.33);
// Scarf around the neck.
for (const x of [-0.36, 0, 0.36]) {
block(courier, materials.mustard, x, 3.12, 0.06, 0.36, 0.28, 0.36);
}
block(courier, materials.mustard, -0.36, 3.12, -0.25, 0.36, 0.28, 0.3);
block(courier, materials.mustard, 0.36, 3.12, -0.25, 0.36, 0.28, 0.3);
block(courier, materials.mustard, -0.37, 2.86, 0.43, 0.28, 0.3, 0.16);
block(courier, materials.mustardDark, -0.37, 2.57, 0.44, 0.28, 0.28, 0.15);
// Head: stepped voxel rows.
for (const x of [-0.38, 0, 0.38]) {
block(courier, materials.skin, x, 3.43, -0.02, 0.4, 0.4, 0.4);
block(courier, materials.skinLight, x, 3.81, -0.03, 0.4, 0.4, 0.4);
}
for (const x of [-0.27, 0, 0.27]) {
block(courier, materials.skinLight, x, 4.18, -0.04, 0.39, 0.38, 0.39);
}
// Ears and simple raised facial features.
block(courier, materials.skinDark, -0.46, 3.57, -0.01, 0.13, 0.25, 0.22);
block(courier, materials.skinDark, 0.46, 3.57, -0.01, 0.13, 0.25, 0.22);
block(courier, materials.eye, -0.16, 3.77, 0.215, 0.11, 0.13, 0.1, 0.012);
block(courier, materials.eye, 0.16, 3.77, 0.215, 0.11, 0.13, 0.1, 0.012);
block(courier, materials.skinDark, 0, 3.62, 0.29, 0.16, 0.22, 0.24, 0.012);
block(courier, materials.leatherDark, 0, 3.43, 0.215, 0.18, 0.06, 0.07, 0.01);
// Distinctive stepped courier cap.
for (const x of [-0.43, 0, 0.43]) {
block(courier, materials.cap, x, 4.43, -0.02, 0.41, 0.4, 0.41);
}
// Slightly asymmetric upper crown.
for (const x of [-0.27, 0.09, 0.45]) {
block(courier, materials.capLight, x, 4.78, -0.06, 0.38, 0.37, 0.38);
}
block(courier, materials.cap, 0.12, 5.04, -0.07, 0.32, 0.22, 0.33);
// Projecting visor.
for (const x of [-0.3, 0, 0.3]) {
block(courier, materials.capDark, x, 4.34, 0.39, 0.38, 0.14, 0.43, 0.018);
}
// Cap badge and side button.
block(courier, materials.mustard, 0.04, 4.52, 0.23, 0.17, 0.17, 0.08, 0.01);
block(courier, materials.cream, 0.47, 4.46, 0.02, 0.1, 0.13, 0.17, 0.01);
block(courier, materials.capDark, -0.48, 4.24, -0.03, 0.14, 0.29, 0.31);
// Large side satchel: a deep grid reads clearly in profile.
for (const y of [0.96, 1.37, 1.78]) {
for (const z of [-0.5, -0.05, 0.4]) {
block(courier, materials.leather, 1.15, y, z, 0.43, 0.43, 0.43);
}
}
// Raised outer flap, visible from the side camera.
for (const z of [-0.5, -0.05, 0.4]) {
block(courier, materials.leatherLight, 1.39, 1.79, z, 0.15, 0.43, 0.43);
}
// Front flap and clasp keep the bag readable from the front.
block(courier, materials.leatherLight, 1.15, 1.79, 0.63, 0.44, 0.43, 0.14, 0.014);
block(courier, materials.mustard, 1.39, 1.57, 0.39, 0.09, 0.15, 0.16, 0.01);
block(courier, materials.leatherDark, 1.15, 1.19, 0.63, 0.42, 0.08, 0.09, 0.012);
// Small top handle.
for (const z of [-0.24, 0, 0.24]) {
block(courier, materials.leatherDark, 1.15, 2.06, z, 0.16, 0.16, 0.18);
}
// Stepped diagonal shoulder strap across the chest.
for (let i = 0; i < 11; i++) {
const x = -0.58 + i * 0.135;
const y = 2.84 - i * 0.105;
block(
courier,
materials.leatherLight,
x,
y,
0.46,
0.2,
0.2,
0.18,
0.014
);
}
block(courier, materials.leatherLight, 0.9, 1.83, 0.46, 0.22, 0.18, 0.18, 0.012);
block(courier, materials.leatherDark, 1.15, 1.83, 0.46, 0.22, 0.18, 0.18, 0.012);
// Camera controls implemented directly, without addons.
function shortestAngleDifference(from, to) {
return Math.atan2(Math.sin(to - from), Math.cos(to - from));
}
function updateCamera() {
const horizontal = orbitRadius * Math.cos(current.phi);
camera.position.set(
target.x + horizontal * Math.sin(current.theta),
target.y + orbitRadius * Math.sin(current.phi),
target.z + horizontal * Math.cos(current.theta)
);
camera.lookAt(target);
camera.updateProjectionMatrix();
}
function resize() {
const width = window.innerWidth;
const height = window.innerHeight;
const aspect = width / height;
// Keep the entire silhouette visible on narrow screens.
const halfHeight = Math.max(3.65, 3.2 / aspect);
camera.left = -halfHeight * aspect;
camera.right = halfHeight * aspect;
camera.top = halfHeight;
camera.bottom = -halfHeight;
renderer.setSize(width, height, false);
camera.updateProjectionMatrix();
}
window.addEventListener("resize", resize);
resize();
const viewButtons = [...document.querySelectorAll("[data-view]")];
function setActiveButton(viewName) {
for (const button of viewButtons) {
button.classList.toggle("active", button.dataset.view === viewName);
}
}
for (const button of viewButtons) {
button.addEventListener("click", () => {
const preset = viewPresets[button.dataset.view];
desired.theta = preset.theta;
desired.phi = preset.phi;
desired.zoom = 1;
setActiveButton(button.dataset.view);
});
}
let dragging = false;
let previousX = 0;
let previousY = 0;
canvas.addEventListener("pointerdown", (event) => {
dragging = true;
previousX = event.clientX;
previousY = event.clientY;
canvas.setPointerCapture(event.pointerId);
});
canvas.addEventListener("pointermove", (event) => {
if (!dragging) return;
const dx = event.clientX - previousX;
const dy = event.clientY - previousY;
previousX = event.clientX;
previousY = event.clientY;
desired.theta -= dx * 0.008;
desired.phi = THREE.MathUtils.clamp(
desired.phi + dy * 0.005,
0.06,
0.75
);
setActiveButton("");
});
function stopDragging(event) {
dragging = false;
if (event.pointerId !== undefined && canvas.hasPointerCapture(event.pointerId)) {
canvas.releasePointerCapture(event.pointerId);
}
}
canvas.addEventListener("pointerup", stopDragging);
canvas.addEventListener("pointercancel", stopDragging);
canvas.addEventListener(
"wheel",
(event) => {
event.preventDefault();
desired.zoom = THREE.MathUtils.clamp(
desired.zoom * Math.exp(-event.deltaY * 0.001),
0.68,
1.55
);
},
{ passive: false }
);
window.addEventListener("keydown", (event) => {
const keyViews = {
"1": "front",
"2": "side",
"3": "hero"
};
const viewName = keyViews[event.key];
if (!viewName) return;
const preset = viewPresets[viewName];
desired.theta = preset.theta;
desired.phi = preset.phi;
desired.zoom = 1;
setActiveButton(viewName);
});
function animate() {
const thetaDifference = shortestAngleDifference(current.theta, desired.theta);
current.theta += thetaDifference * 0.12;
current.phi += (desired.phi - current.phi) * 0.12;
current.zoom += (desired.zoom - current.zoom) * 0.12;
camera.zoom = current.zoom;
updateCamera();
renderer.render(scene, camera);
requestAnimationFrame(animate);
}
updateCamera();
animate();
</script>
</body>
</html>
```