aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/props.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bluebey-studio/src/props.js')
-rw-r--r--public/bluebey-studio/src/props.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/public/bluebey-studio/src/props.js b/public/bluebey-studio/src/props.js
index ba682e4..3f09651 100644
--- a/public/bluebey-studio/src/props.js
+++ b/public/bluebey-studio/src/props.js
@@ -310,6 +310,39 @@ const buildCan = prop((group, material) => {
group.rotation.z = 0.05;
});
+/**
+ * ベッド. A wooden frame on four legs with a mattress, a headboard at the far end
+ * and a pillow, sized so the character can be posed lying on it.
+ */
+const buildBed = prop((group, material) => {
+ // Sized to take the character lying down: the body is a sphere of radius ~1.6,
+ // so the frame is a little over 3 units across and 4 units long.
+ for (const x of [-1.55, 1.55]) {
+ for (const z of [-1.85, 1.85]) {
+ addBox(group, material('wood'), [0.22, 0.5, 0.22], [x, 0.25, z]);
+ }
+ }
+ addBox(group, material('wood'), [3.5, 0.26, 4.3], [0, 0.63, 0]);
+ // The headboard sits at the far (-z) end, away from the camera.
+ addBox(group, material('wood'), [3.5, 1.5, 0.2], [0, 1.25, -2.15]);
+ addBox(group, material('paper'), [3.3, 0.46, 4.1], [0, 0.99, 0]);
+
+ // The pillow, slightly tipped up against the headboard.
+ const pillow = addBox(group, material('paper', 0.9), [2.2, 0.34, 0.9], [0, 1.39, -1.5]);
+ pillow.rotation.x = -0.08;
+});
+
+/**
+ * 布団. A mattress laid on the floor, a pillow and a quilt folded over the lower
+ * end.
+ */
+const buildFuton = prop((group, material) => {
+ addBox(group, material('paper'), [3.6, 0.3, 4.4], [0, 0.15, 0]);
+ const pillow = addBox(group, material('paper', 0.9), [2.2, 0.3, 0.9], [0, 0.45, -1.6]);
+ pillow.rotation.x = -0.06;
+ addBox(group, material('accent', 0.8), [3.6, 0.24, 2.7], [0, 0.42, 0.85]);
+});
+
// ---------------------------------------------------------------------------
// The library
// ---------------------------------------------------------------------------
@@ -328,6 +361,8 @@ export const PROP_LIBRARY = [
{ id: 'plant', label: '観葉植物', height: 1.7, build: buildPlant },
{ id: 'box', label: '段ボール箱', height: 1.15, build: buildBox },
{ id: 'can', label: '空いた缶詰', height: 0.65, build: buildCan },
+ { id: 'bed', label: 'ベッド', height: 2.0, build: buildBed },
+ { id: 'futon', label: '布団', height: 0.65, build: buildFuton },
];
/**
@@ -348,6 +383,8 @@ export const PROP_DEFAULTS = {
plant: { x: -2.0, y: 0, z: -1.8, rotY: 0.25, scale: 1 },
box: { x: 2.0, y: 0, z: -1.7, rotY: 0.55, scale: 1 },
can: { x: 1.7, y: 0, z: 1.5, rotY: -0.5, scale: 1 },
+ bed: { x: 0, y: 0, z: -4.7, rotY: 0, scale: 1 },
+ futon: { x: 4.2, y: 0, z: -0.6, rotY: -0.35, scale: 1 },
};
/** The palette entry each part reads, derived from the app's colours. */