Prompt specification
Build or customize the Three.js 3D scene "Original Character With a Wheelchair Frame" 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 Character With a Wheelchair Frame
Category: Games & Play · Style: Procedural Solid / Shader 3D
License: MIT · Reference: https://three3d.app/scene/original-character-with-a-wheelchair-frame-x3693
Scene Description Prompt:
Please create one HTML file with Three.js from cdnjs showing an original low-poly wheelchair user with footrests, push rims, and supported body contact.
Working Three.js Starter (original-character-with-a-wheelchair-frame-x3693):
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Supported Motion — Low-Poly Wheelchair Study</title>
<style>
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #e8efeb;
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;
outline: none;
}
canvas:active {
cursor: grabbing;
}
.title-card {
position: fixed;
top: 28px;
left: 30px;
z-index: 10;
max-width: 290px;
color: #243a3d;
pointer-events: none;
user-select: none;
}
.eyebrow {
display: flex;
align-items: center;
gap: 9px;
margin-bottom: 9px;
color: #527074;
font-size: 11px;
font-weight: 750;
letter-spacing: 0.18em;
text-transform: uppercase;
}
.eyebrow::before {
width: 24px;
height: 3px;
border-radius: 999px;
background: #e76f51;
content: "";
}
h1 {
margin: 0;
font-size: clamp(28px, 4vw, 46px);
font-weight: 720;
letter-spacing: -0.055em;
line-height: 0.98;
}
.title-card p {
margin: 12px 0 0;
color: #607579;
font-size: 13px;
line-height: 1.5;
}
.controls {
position: fixed;
right: 24px;
bottom: 22px;
z-index: 20;
display: flex;
align-items: center;
gap: 12px;
}
.hint {
padding: 9px 12px;
border: 1px solid rgba(48, 77, 80, 0.13);
border-radius: 999px;
background: rgba(248, 251, 249, 0.74);
color: #567174;
font-size: 11px;
font-weight: 650;
letter-spacing: 0.03em;
backdrop-filter: blur(8px);
pointer-events: none;
user-select: none;
}
button {
border: 0;
border-radius: 999px;
padding: 10px 15px;
background: #23484b;
color: #f4f8f6;
font: inherit;
font-size: 11px;
font-weight: 720;
letter-spacing: 0.04em;
cursor: pointer;
box-shadow: 0 7px 18px rgba(31, 60, 63, 0.16);
transition: transform 160ms ease, background 160ms ease;
}
button:hover {
background: #2e5d60;
transform: translateY(-1px);
}
button:focus-visible {
outline: 3px solid rgba(231, 111, 81, 0.45);
outline-offset: 3px;
}
@media (max-width: 650px) {
.title-card {
top: 20px;
left: 20px;
}
.title-card p {
display: none;
}
.controls {
right: 14px;
bottom: 14px;
}
.hint {
display: none;
}
}
</style>
</head>
<body>
<div class="title-card">
<div class="eyebrow">Mobility study · 01</div>
<h1>Supported<br />Motion</h1>
<p>An original low-poly wheelchair user with fitted support, push rims, and paired footrests.</p>
</div>
<div class="controls">
<span class="hint">Drag to orbit · Scroll to zoom</span>
<button id="resetView" type="button">Reset view</button>
</div>
<script type="module">
import * as THREE from "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js";
// ---------------------------------------------------------------------
// Renderer, scene, camera
// ---------------------------------------------------------------------
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.setAttribute(
"aria-label",
"Interactive low-poly model of a wheelchair user"
);
renderer.domElement.tabIndex = 0;
document.body.prepend(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0xe8efeb);
scene.fog = new THREE.Fog(0xe8efeb, 8, 18);
const camera = new THREE.PerspectiveCamera(
37,
window.innerWidth / window.innerHeight,
0.1,
50
);
const cameraTarget = new THREE.Vector3(0.12, 1.04, 0);
let cameraTheta = 0.58;
let cameraPhi = 1.22;
let cameraRadius = 6.25;
function updateCamera() {
const horizontalRadius = cameraRadius * Math.sin(cameraPhi);
camera.position.set(
cameraTarget.x + horizontalRadius * Math.sin(cameraTheta),
cameraTarget.y + cameraRadius * Math.cos(cameraPhi),
cameraTarget.z + horizontalRadius * Math.cos(cameraTheta)
);
camera.lookAt(cameraTarget);
}
updateCamera();
// ---------------------------------------------------------------------
// Lighting
// ---------------------------------------------------------------------
const hemisphere = new THREE.HemisphereLight(0xf7fbf8, 0x8da29c, 2.15);
scene.add(hemisphere);
const keyLight = new THREE.DirectionalLight(0xfff1d8, 4.1);
keyLight.position.set(4.5, 7, 4);
keyLight.castShadow = true;
keyLight.shadow.mapSize.set(2048, 2048);
keyLight.shadow.camera.left = -4;
keyLight.shadow.camera.right = 4;
keyLight.shadow.camera.top = 5;
keyLight.shadow.camera.bottom = -3;
keyLight.shadow.camera.near = 0.5;
keyLight.shadow.camera.far = 15;
keyLight.shadow.normalBias = 0.025;
scene.add(keyLight);
const fillLight = new THREE.DirectionalLight(0xb9dce4, 1.35);
fillLight.position.set(-4, 3, -5);
scene.add(fillLight);
const rimLight = new THREE.DirectionalLight(0xffc7ad, 0.7);
rimLight.position.set(-3, 4, 4);
scene.add(rimLight);
// ---------------------------------------------------------------------
// Materials
// ---------------------------------------------------------------------
const material = (color, options = {}) =>
new THREE.MeshStandardMaterial({
color,
roughness: 0.78,
metalness: 0.02,
flatShading: true,
...options
});
const mats = {
frame: material(0x167c80, { roughness: 0.48 }),
frameDark: material(0x0d555b, { roughness: 0.52 }),
tire: material(0x20282b, { roughness: 0.92 }),
spoke: material(0x8ca0a1, { roughness: 0.42, metalness: 0.55 }),
pushRim: material(0xe8b75b, { roughness: 0.3, metalness: 0.65 }),
seat: material(0x293e50, { roughness: 0.94 }),
seatEdge: material(0x1c2f3c, { roughness: 0.9 }),
shirt: material(0xe56e51, { roughness: 0.82 }),
shirtDark: material(0xc7533d, { roughness: 0.85 }),
trousers: material(0x36536e, { roughness: 0.9 }),
shoe: material(0xf0bc50, { roughness: 0.84 }),
shoeDark: material(0x263845, { roughness: 0.9 }),
skin: material(0xc98765, { roughness: 0.88 }),
skinLight: material(0xd99a78, { roughness: 0.86 }),
hair: material(0x292c33, { roughness: 0.96 }),
eye: material(0x1b2024, { roughness: 0.72 }),
badge: material(0xf5d06f, { roughness: 0.52 }),
platform: material(0xdbe5df, { roughness: 0.92 }),
platformEdge: material(0xc4d2cc, { roughness: 0.88 }),
floor: material(0xe4ebe7, { roughness: 1 }),
belt: material(0x3d5960, { roughness: 0.84 })
};
// ---------------------------------------------------------------------
// Geometry helpers
// ---------------------------------------------------------------------
function addMesh(geometry, mat, position = [0, 0, 0]) {
const mesh = new THREE.Mesh(geometry, mat);
mesh.position.set(...position);
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add(mesh);
return mesh;
}
function addBox(width, height, depth, position, mat, rotationZ = 0) {
const mesh = addMesh(
new THREE.BoxGeometry(width, height, depth),
mat,
position
);
mesh.rotation.z = rotationZ;
return mesh;
}
function addIco(radius, position, mat, scale = [1, 1, 1]) {
const mesh = addMesh(
new THREE.IcosahedronGeometry(radius, 1),
mat,
position
);
mesh.scale.set(...scale);
return mesh;
}
function cylinderBetween(
pointA,
pointB,
radiusBottom,
mat,
segments = 8,
radiusTop = radiusBottom
) {
const a = new THREE.Vector3(...pointA);
const b = new THREE.Vector3(...pointB);
const direction = new THREE.Vector3().subVectors(b, a);
const length = direction.length();
const mesh = addMesh(
new THREE.CylinderGeometry(
radiusTop,
radiusBottom,
length,
segments,
1,
false
),
mat,
a.clone().add(b).multiplyScalar(0.5).toArray()
);
mesh.quaternion.setFromUnitVectors(
new THREE.Vector3(0, 1, 0),
direction.normalize()
);
return mesh;
}
function addTorus(
radius,
tube,
position,
mat,
radialSegments = 6,
tubularSegments = 28
) {
return addMesh(
new THREE.TorusGeometry(
radius,
tube,
radialSegments,
tubularSegments
),
mat,
position
);
}
// ---------------------------------------------------------------------
// Display platform and floor
// ---------------------------------------------------------------------
const floor = addMesh(
new THREE.PlaneGeometry(30, 30),
mats.floor,
[0, -0.12, 0]
);
floor.rotation.x = -Math.PI / 2;
floor.castShadow = false;
addMesh(
new THREE.CylinderGeometry(2.25, 2.36, 0.11, 64),
mats.platform,
[0, -0.065, 0]
);
const platformRing = addTorus(
2.08,
0.012,
[0, -0.006, 0],
mats.platformEdge,
6,
64
);
platformRing.rotation.x = Math.PI / 2;
platformRing.castShadow = false;
// ---------------------------------------------------------------------
// Wheelchair frame
// Forward direction is +X.
// ---------------------------------------------------------------------
const rearWheel = {
x: -0.32,
y: 0.72,
radius: 0.685
};
// Seat rails and under-seat structure.
for (const side of [-1, 1]) {
const z = side * 0.45;
cylinderBetween(
[-0.55, 0.89, z],
[0.52, 0.89, z],
0.038,
mats.frame,
8
);
cylinderBetween(
[-0.55, 0.89, z],
[-0.67, 1.88, z],
0.034,
mats.frame,
8
);
cylinderBetween(
[0.49, 0.89, z],
[0.91, 0.30, z],
0.035,
mats.frame,
8
);
cylinderBetween(
[-0.48, 0.31, z],
[0.83, 0.31, z],
0.027,
mats.frameDark,
8
);
cylinderBetween(
[-0.65, 1.84, z],
[-0.89, 1.92, z],
0.036,
mats.frameDark,
8
);
cylinderBetween(
[-0.82, 1.91, z],
[-0.99, 1.91, z],
0.047,
mats.seatEdge,
8
);
// Armrest supports.
cylinderBetween(
[0.36, 0.88, z],
[0.36, 1.19, z],
0.025,
mats.frame,
8
);
cylinderBetween(
[-0.34, 0.89, z],
[-0.34, 1.19, z],
0.025,
mats.frame,
8
);
// Footrest hanger.
cylinderBetween(
[0.49, 0.87, z],
[0.71, 0.32, z],
0.028,
mats.frame,
8
);
cylinderBetween(
[0.71, 0.32, z],
[0.75, 0.16, side * 0.22],
0.026,
mats.frame,
8
);
}
cylinderBetween(
[-0.50, 0.89, -0.45],
[-0.50, 0.89, 0.45],
0.028,
mats.frameDark,
8
);
cylinderBetween(
[0.47, 0.89, -0.45],
[0.47, 0.89, 0.45],
0.028,
mats.frameDark,
8
);
cylinderBetween(
[-0.47, 0.32, -0.45],
[0.83, 0.32, 0.45],
0.018,
mats.frameDark,
6
);
cylinderBetween(
[-0.47, 0.32, 0.45],
[0.83, 0.32, -0.45],
0.018,
mats.frameDark,
6
);
// Rear axle.
cylinderBetween(
[rearWheel.x, rearWheel.y, -0.62],
[rearWheel.x, rearWheel.y, 0.62],
0.035,
mats.frameDark,
10
);
// ---------------------------------------------------------------------
// Seat, backrest, arm pads, and calf supports
// ---------------------------------------------------------------------
addBox(0.83, 0.11, 0.76, [-0.02, 0.96, 0], mats.seat);
addBox(0.84, 0.055, 0.78, [-0.02, 0.887, 0], mats.seatEdge);
const backrest = addBox(
0.11,
0.79,
0.76,
[-0.53, 1.42, 0],
mats.seat
);
backrest.rotation.z = 0.1;
for (const side of [-1, 1]) {
addBox(
0.76,
0.075,
0.14,
[0.01, 1.22, side * 0.51],
mats.seatEdge
);
addBox(
0.08,
0.44,
0.17,
[0.46, 0.68, side * 0.21],
mats.seat
);
}
// ---------------------------------------------------------------------
// Main wheels, hubs, spokes, and separate push rims
// ---------------------------------------------------------------------
for (const side of [-1, 1]) {
const wheelZ = side * 0.68;
const pushRimZ = side * 0.84;
addTorus(
0.58,
0.105,
[rearWheel.x, rearWheel.y, wheelZ],
mats.tire,
6,
30
);
addTorus(
0.505,
0.022,
[rearWheel.x, rearWheel.y, wheelZ],
mats.spoke,
5,
30
);
// Distinct user-operated push rim.
addTorus(
0.50,
0.027,
[rearWheel.x, rearWheel.y, pushRimZ],
mats.pushRim,
6,
32
);
cylinderBetween(
[rearWheel.x, rearWheel.y, side * 0.61],
[rearWheel.x, rearWheel.y, side * 0.75],
0.066,
mats.spoke,
10
);
for (let i = 0; i < 10; i++) {
const angle = (i / 10) * Math.PI * 2;
cylinderBetween(
[
rearWheel.x,
rearWheel.y,
wheelZ
],
[
rearWheel.x + Math.cos(angle) * 0.49,
rearWheel.y + Math.sin(angle) * 0.49,
wheelZ
],
0.011,
mats.spoke,
5
);
}
}
// ---------------------------------------------------------------------
// Front caster wheels and forks
// ---------------------------------------------------------------------
for (const side of [-1, 1]) {
const z = side * 0.43;
cylinderBetween(
[0.88, 0.62, z],
[0.91, 0.19, z],
0.026,
mats.frame,
8
);
addTorus(
0.13,
0.045,
[0.92, 0.17, z],
mats.tire,
6,
18
);
addTorus(
0.075,
0.016,
[0.92, 0.17, z],
mats.spoke,
5,
14
);
cylinderBetween(
[0.92, 0.17, z - 0.07],
[0.92, 0.17, z + 0.07],
0.035,
mats.spoke,
8
);
}
// ---------------------------------------------------------------------
// Footplates
// ---------------------------------------------------------------------
for (const side of [-1, 1]) {
addBox(
0.35,
0.055,
0.23,
[0.84, 0.16, side * 0.22],
mats.frameDark
);
}
// ---------------------------------------------------------------------
// Seated user: pelvis, supported thighs, torso
// ---------------------------------------------------------------------
// Pelvis sits directly on the seat cushion.
addBox(
0.44,
0.23,
0.57,
[-0.08, 1.13, 0],
mats.trousers
);
// Torso leans slightly into the backrest.
cylinderBetween(
[-0.08, 1.20, 0],
[-0.22, 1.70, 0],
0.215,
mats.shirt,
7,
0.27
);
// Collar.
cylinderBetween(
[-0.215, 1.66, 0],
[-0.23, 1.75, 0],
0.17,
mats.shirtDark,
8,
0.105
);
// Geometric chest badge.
const badge = addMesh(
new THREE.CylinderGeometry(0.064, 0.064, 0.018, 8),
mats.badge,
[0.093, 1.47, 0.07]
);
badge.rotation.z = -Math.PI / 2;
// Lap belt crosses the supported pelvis.
addBox(
0.052,
0.075,
0.59,
[0.135, 1.205, 0],
mats.belt
);
addBox(
0.07,
0.095,
0.085,
[0.155, 1.205, 0.06],
mats.pushRim
);
// ---------------------------------------------------------------------
// Head and face
// ---------------------------------------------------------------------
cylinderBetween(
[-0.225, 1.72, 0],
[-0.235, 1.84, 0],
0.082,
mats.skin,
7
);
addIco(0.22, [-0.24, 1.99, 0], mats.skin);
addIco(
0.225,
[-0.315, 2.075, 0],
mats.hair,
[0.93, 0.78, 1]
);
// Small ears, nose, and eyes establish the forward-facing direction.
for (const side of [-1, 1]) {
addIco(
0.042,
[-0.245, 1.99, side * 0.207],
mats.skinLight,
[0.72, 1, 0.7]
);
addIco(
0.017,
[-0.008, 2.025, side * 0.073],
mats.eye,
[0.62, 1, 1]
);
}
addIco(
0.047,
[0.003, 1.973, 0],
mats.skinLight,
[1, 0.78, 0.8]
);
// ---------------------------------------------------------------------
// Legs: thighs rest on seat, lower legs meet calf pads, feet on plates
// ---------------------------------------------------------------------
for (const side of [-1, 1]) {
const hip = [-0.01, 1.135, side * 0.16];
const knee = [0.54, 1.10, side * 0.20];
const ankle = [0.63, 0.37, side * 0.21];
cylinderBetween(
hip,
knee,
0.123,
mats.trousers,
7,
0.112
);
addIco(0.112, knee, mats.trousers);
cylinderBetween(
knee,
ankle,
0.107,
mats.trousers,
7,
0.082
);
// Shoe rests on the footplate.
addBox(
0.34,
0.14,
0.205,
[0.84, 0.255, side * 0.21],
mats.shoe
);
addBox(
0.12,
0.145,
0.215,
[0.985, 0.255, side * 0.21],
mats.shoeDark
);
addBox(
0.075,
0.17,
0.16,
[0.69, 0.285, side * 0.21],
mats.trousers
);
}
// ---------------------------------------------------------------------
// Arms: elbows supported by armrests, hands contacting push rims
// ---------------------------------------------------------------------
for (const side of [-1, 1]) {
const shoulder = [-0.20, 1.61, side * 0.265];
const elbow = [0.16, 1.26, side * 0.51];
const wrist = [0.075, 1.075, side * 0.81];
const hand = [0.058, 1.052, side * 0.842];
cylinderBetween(
shoulder,
elbow,
0.09,
mats.shirt,
7,
0.078
);
addIco(0.078, elbow, mats.skin);
cylinderBetween(
elbow,
wrist,
0.071,
mats.skin,
7,
0.057
);
addBox(
0.135,
0.095,
0.075,
hand,
mats.skin
);
}
// ---------------------------------------------------------------------
// Custom camera controls implemented directly in this file
// ---------------------------------------------------------------------
const canvas = renderer.domElement;
const defaultView = {
theta: 0.58,
phi: 1.22,
radius: 6.25
};
let dragging = false;
let previousX = 0;
let previousY = 0;
function resetView() {
cameraTheta = defaultView.theta;
cameraPhi = defaultView.phi;
cameraRadius = defaultView.radius;
updateCamera();
}
canvas.addEventListener("pointerdown", (event) => {
dragging = true;
previousX = event.clientX;
previousY = event.clientY;
canvas.setPointerCapture(event.pointerId);
});
canvas.addEventListener("pointermove", (event) => {
if (!dragging) return;
const deltaX = event.clientX - previousX;
const deltaY = event.clientY - previousY;
previousX = event.clientX;
previousY = event.clientY;
cameraTheta += deltaX * 0.006;
cameraPhi = THREE.MathUtils.clamp(
cameraPhi + deltaY * 0.005,
0.62,
1.48
);
updateCamera();
});
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("lostpointercapture", () => {
dragging = false;
});
canvas.addEventListener(
"wheel",
(event) => {
event.preventDefault();
cameraRadius = THREE.MathUtils.clamp(
cameraRadius * Math.exp(event.deltaY * 0.001),
4.15,
9.2
);
updateCamera();
},
{ passive: false }
);
canvas.addEventListener("dblclick", resetView);
window.addEventListener("keydown", (event) => {
let handled = true;
switch (event.key) {
case "ArrowLeft":
cameraTheta -= 0.08;
break;
case "ArrowRight":
cameraTheta += 0.08;
break;
case "ArrowUp":
cameraPhi = Math.max(0.62, cameraPhi - 0.05);
break;
case "ArrowDown":
cameraPhi = Math.min(1.48, cameraPhi + 0.05);
break;
case "+":
case "=":
cameraRadius = Math.max(4.15, cameraRadius - 0.25);
break;
case "-":
case "_":
cameraRadius = Math.min(9.2, cameraRadius + 0.25);
break;
default:
handled = false;
}
if (handled) {
event.preventDefault();
updateCamera();
}
});
document
.getElementById("resetView")
.addEventListener("click", resetView);
window.addEventListener("resize", () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
renderer.setSize(window.innerWidth, window.innerHeight);
});
renderer.setAnimationLoop(() => {
renderer.render(scene, camera);
});
</script>
</body>
</html>
```