Skip to content

Commit 6521788

Browse files
stedrewclaude
andcommitted
Fix furniture scale — halve FBX model sizes to fit rooms (#15)
Hospital FBX models are authored in centimetres (a bed is ~200 cm long). The previous uniform scale of 0.012 made a bed occupy ~2.4 tiles — much too large. New per-type scale factors: bed: 0.006 (~1.2 tiles long) chair: 0.008 (~0.5 tiles) waiting_chair: 0.007 (~0.5 tiles) computer: 0.008 (~0.4 tiles) diagnostic_table: 0.006 (~1.2 tiles) medical_equipment:0.007 (~0.5 tiles) wheelchair: 0.007 (~0.5 tiles) Furniture now fits proportionally within room boundaries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2a06438 commit 6521788

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

environment/react_frontend/src/components/ThreeFloorPlan.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,19 @@ const MODEL_URLS: Record<string, string> = {
6868
const TEXTURE_ATLAS_URL = '/models/hospital/Texture_Atlas_Colors_2.png';
6969

7070
/**
71-
* Scale factors per equipment type. Hospital FBX models have varied
72-
* native sizes; these factors normalise them to roughly 1 tile.
71+
* Scale factors per equipment type. Hospital FBX models are authored
72+
* in centimetres; these factors convert to Three.js units where 1
73+
* unit = 1 map tile (~3 ft / ~1 m). A hospital bed is ~200 cm long
74+
* in the FBX, and should occupy ~1.2 tiles on screen → scale ≈ 0.006.
7375
*/
7476
const MODEL_SCALE: Record<string, number> = {
75-
bed: 0.012,
76-
chair: 0.012,
77-
waiting_room_chair: 0.012,
78-
computer: 0.012,
79-
diagnostic_table: 0.012,
80-
medical_equipment: 0.012,
81-
wheelchair: 0.012
77+
bed: 0.006,
78+
chair: 0.008,
79+
waiting_room_chair: 0.007,
80+
computer: 0.008,
81+
diagnostic_table: 0.006,
82+
medical_equipment: 0.007,
83+
wheelchair: 0.007
8284
};
8385

8486
/* ZONE_COLORS and CANVAS_BACKGROUND_COLOR imported from @/theme/colors */

0 commit comments

Comments
 (0)