diff options
Diffstat (limited to 'public/bluebey-studio/src/props.js')
| -rw-r--r-- | public/bluebey-studio/src/props.js | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/public/bluebey-studio/src/props.js b/public/bluebey-studio/src/props.js index 70a258d..9fb3e49 100644 --- a/public/bluebey-studio/src/props.js +++ b/public/bluebey-studio/src/props.js @@ -360,7 +360,9 @@ const buildPencil = prop((group, material) => { addCylinder(group, material('metal', 0.9), r, r, 0.12, [0, 0.22, 0], 6); addCylinder(group, material('accent'), r, r, 1.30, [0, 0.93, 0], 6); addCylinder(group, material('wood'), 0, r, 0.30, [0, 1.73, 0], 6); - addCylinder(group, material('metal', 0.3), 0, r * 0.3, 0.12, [0, 1.94, 0], 6); + // The lead's wide base sinks into the cone (whose tip is at y = 1.88), so the + // two look joined, while its point still pokes out past the wood. + addCylinder(group, material('metal', 0.3), 0, r * 0.3, 0.12, [0, 1.86, 0], 6); }); /** コップ: a mug with a rim, a handle and a little drink inside. */ @@ -371,6 +373,32 @@ const buildCup = prop((group, material) => { addMesh(group, new THREE.TorusGeometry(0.16, 0.045, 8, 16), material('paper'), 0.36, 0.36, 0); }); +/** ノート: a fat pad of pages under a thin cover, bound along one long edge. */ +const buildNotebook = prop((group, material) => { + const width = 1.5; + const depth = 2.0; + const pages = 0.18; + const cover = 0.04; + // The cover pokes out past the pages, so the notebook reads from above. + addBox(group, material('wood', 0.6), [width + 0.08, cover, depth + 0.08], [0, cover / 2, 0]); + addBox(group, material('paper'), [width, pages, depth], [0, cover + pages / 2, 0]); + addBox( + group, + material('accent'), + [0.16, pages + 0.04, depth + 0.02], + [-width / 2 + 0.08, cover + pages / 2, 0], + ); +}); + +/** 消しゴム: a chunky two-tone block, a hard accent top on a soft white base. */ +const buildEraser = prop((group, material) => { + const width = 0.9; + const depth = 0.5; + const half = 0.15; + addBox(group, material('paper'), [width, half, depth], [0, half / 2, 0]); + addBox(group, material('accent', 0.9), [width, half, depth], [0, half + half / 2, 0]); +}); + export const PROP_LIBRARY = [ { id: 'podium', label: '演台', height: 2.2, build: buildPodium }, { id: 'desk', label: '机', height: 1.5, build: buildDesk }, @@ -383,6 +411,8 @@ export const PROP_LIBRARY = [ { id: 'futon', label: '布団', height: 0.65, build: buildFuton }, { id: 'pencil', label: '鉛筆', height: 2.0, build: buildPencil }, { id: 'cup', label: 'コップ', height: 0.66, build: buildCup }, + { id: 'notebook', label: 'ノート', height: 0.22, build: buildNotebook }, + { id: 'eraser', label: '消しゴム', height: 0.3, build: buildEraser }, ]; /** @@ -407,6 +437,8 @@ export const PROP_DEFAULTS = { futon: { x: 4.2, y: 0, z: -0.6, rotY: -0.35, scale: 1 }, pencil: { x: -1.4, y: 0, z: 2.6, rotY: 0.3, scale: 1 }, cup: { x: 1.5, y: 0, z: 2.5, rotY: -0.4, scale: 1 }, + notebook: { x: -3.2, y: 0, z: -2.7, rotY: 0.35, scale: 1 }, + eraser: { x: 3.6, y: 0, z: 2.6, rotY: -0.45, scale: 1 }, }; /** The palette entry each part reads, derived from the app's colours. */ |
