@@ -8,7 +8,7 @@ import * as THREE from 'three';
88
99/**
1010 * 3D position in the game world.
11- * Units are in centimeters (1 unit = 1 cm ).
11+ * Units are in meters (1 unit = 1 m ).
1212 */
1313export interface Position {
1414 /** X coordinate (horizontal, east-west) */
@@ -269,46 +269,46 @@ export class Player {
269269 const group = new THREE . Group ( ) ;
270270
271271 // Body (torso)
272- const bodyGeometry = new THREE . BoxGeometry ( 60 , 80 , 40 ) ;
272+ const bodyGeometry = new THREE . BoxGeometry ( 0.6 , 0.8 , 0.4 ) ;
273273 const bodyMaterial = new THREE . MeshStandardMaterial ( { color : 0x4a90e2 } ) ;
274274 const body = new THREE . Mesh ( bodyGeometry , bodyMaterial ) ;
275- body . position . y = 110 ;
275+ body . position . y = 1.1 ;
276276 body . castShadow = true ;
277277 group . add ( body ) ;
278278
279279 // Head
280- const headGeometry = new THREE . BoxGeometry ( 40 , 40 , 40 ) ;
280+ const headGeometry = new THREE . BoxGeometry ( 0.4 , 0.4 , 0.4 ) ;
281281 const headMaterial = new THREE . MeshStandardMaterial ( { color : 0xffdbac } ) ;
282282 const head = new THREE . Mesh ( headGeometry , headMaterial ) ;
283- head . position . y = 170 ;
283+ head . position . y = 1.7 ;
284284 head . castShadow = true ;
285285 group . add ( head ) ;
286286
287287 // Legs
288- const legGeometry = new THREE . BoxGeometry ( 20 , 70 , 20 ) ;
288+ const legGeometry = new THREE . BoxGeometry ( 0.2 , 0.7 , 0.2 ) ;
289289 const legMaterial = new THREE . MeshStandardMaterial ( { color : 0x333333 } ) ;
290290
291291 const leftLeg = new THREE . Mesh ( legGeometry , legMaterial ) ;
292- leftLeg . position . set ( - 15 , 35 , 0 ) ;
292+ leftLeg . position . set ( - 0. 15, 0. 35, 0 ) ;
293293 leftLeg . castShadow = true ;
294294 group . add ( leftLeg ) ;
295295
296296 const rightLeg = new THREE . Mesh ( legGeometry , legMaterial ) ;
297- rightLeg . position . set ( 15 , 35 , 0 ) ;
297+ rightLeg . position . set ( 0. 15, 0. 35, 0 ) ;
298298 rightLeg . castShadow = true ;
299299 group . add ( rightLeg ) ;
300300
301301 // Arms
302- const armGeometry = new THREE . BoxGeometry ( 20 , 70 , 20 ) ;
302+ const armGeometry = new THREE . BoxGeometry ( 0.2 , 0.7 , 0.2 ) ;
303303 const armMaterial = new THREE . MeshStandardMaterial ( { color : 0x4a90e2 } ) ;
304304
305305 const leftArm = new THREE . Mesh ( armGeometry , armMaterial ) ;
306- leftArm . position . set ( - 40 , 110 , 0 ) ;
306+ leftArm . position . set ( - 0.4 , 1.1 , 0 ) ;
307307 leftArm . castShadow = true ;
308308 group . add ( leftArm ) ;
309309
310310 const rightArm = new THREE . Mesh ( armGeometry , armMaterial ) ;
311- rightArm . position . set ( 40 , 110 , 0 ) ;
311+ rightArm . position . set ( 0.4 , 1.1 , 0 ) ;
312312 rightArm . castShadow = true ;
313313 group . add ( rightArm ) ;
314314
@@ -329,8 +329,8 @@ export class Player {
329329 const texture = new THREE . CanvasTexture ( canvas ) ;
330330 const spriteMaterial = new THREE . SpriteMaterial ( { map : texture } ) ;
331331 const sprite = new THREE . Sprite ( spriteMaterial ) ;
332- sprite . position . y = 250 ;
333- sprite . scale . set ( 200 , 50 , 100 ) ;
332+ sprite . position . y = 2.5 ;
333+ sprite . scale . set ( 2.0 , 0.5 , 1.0 ) ;
334334 group . add ( sprite ) ;
335335
336336 // Activity info box (above name label)
@@ -345,8 +345,8 @@ export class Player {
345345 const activityTexture = new THREE . CanvasTexture ( activityCanvas ) ;
346346 const activitySpriteMaterial = new THREE . SpriteMaterial ( { map : activityTexture } ) ;
347347 const activitySprite = new THREE . Sprite ( activitySpriteMaterial ) ;
348- activitySprite . position . y = 310 ;
349- activitySprite . scale . set ( 240 , 36 , 100 ) ;
348+ activitySprite . position . y = 3.1 ;
349+ activitySprite . scale . set ( 2.4 , 0. 36, 1.0 ) ;
350350 group . add ( activitySprite ) ;
351351
352352 return { group, leftLeg, rightLeg, leftArm, rightArm, activityCanvas, activityTexture } ;
0 commit comments