@@ -568,14 +568,14 @@ const SceneLayer = ({
568568
569569 const getRandomWalkable = ( allowChairs : boolean ) => {
570570 if ( ! collisionMap ) return { row : 32 , col : 32 } ;
571- for ( let i = 0 ; i < 80 ; i ++ ) {
572- const r = Math . floor ( Math . random ( ) * collisionMap . rows ) ;
573- const c = Math . floor ( Math . random ( ) * collisionMap . cols ) ;
574- const state = collisionMap . grid [ r ] [ c ] ;
575- if ( state <= 0 ) continue ;
576- if ( ! allowChairs && state === 2 ) continue ;
577- return { row : r , col : c } ;
578- }
571+ for ( let i = 0 ; i < 80 ; i ++ ) {
572+ const r = Math . floor ( Math . random ( ) * collisionMap . rows ) ;
573+ const c = Math . floor ( Math . random ( ) * collisionMap . cols ) ;
574+ const state = collisionMap . grid [ r ] [ c ] ;
575+ if ( state <= 0 ) continue ;
576+ if ( ! allowChairs && state === 2 ) continue ;
577+ return { row : r , col : c } ;
578+ }
579579 return { row : 32 , col : 32 } ;
580580 } ;
581581
@@ -1355,16 +1355,16 @@ const SceneLayer = ({
13551355 const motion = 0 ;
13561356 const direction = sprite . direction || "front" ;
13571357 const movement = Math . hypot ( sprite . targetX - sprite . x , sprite . targetY - sprite . y ) ;
1358- const isRunning = movement > 0.8 ;
1359- const isWalking = movement > 0.2 ;
1360- const currentTile = pixelToTile ( sprite . x , sprite . y ) ;
1361- const isOnWorkChair = Boolean (
1362- collisionMap ?. workNodes ?. some (
1363- ( node ) => node . row === currentTile . row && node . col === currentTile . col
1364- )
1365- ) ;
1366- const shouldJump = agent . status === "thinking" && isOnWorkChair ;
1367- const state = shouldJump ? "jump" : isRunning ? "run" : isWalking ? "walk" : "idle" ;
1358+ const isRunning = movement > 0.8 ;
1359+ const isWalking = movement > 0.2 ;
1360+ const currentTile = pixelToTile ( sprite . x , sprite . y ) ;
1361+ const isOnWorkChair = Boolean (
1362+ collisionMap ?. workNodes ?. some (
1363+ ( node ) => node . row === currentTile . row && node . col === currentTile . col
1364+ )
1365+ ) ;
1366+ const shouldJump = agent . status === "thinking" && isOnWorkChair ;
1367+ const state = shouldJump ? "jump" : isRunning ? "run" : isWalking ? "walk" : "idle" ;
13681368 const sheet = spriteSheets [ state ] || spriteSheets . idle ;
13691369 const frameCount = sheet ?. right . length || 1 ;
13701370 const frameSpeed = isRunning ? 90 : isWalking ? 120 : 200 ;
@@ -1452,7 +1452,7 @@ const SceneLayer = ({
14521452 const labelPaddingX = 4 ;
14531453 const chipHeight = 12 ;
14541454 const chipGap = 4 ;
1455- const labelY = y + 34 + motion ;
1455+ const labelY = y + 34 + motion ;
14561456 const activityBubbleSize = 18 ;
14571457 const activityBubbleX = sprite . x - activityBubbleSize / 2 ;
14581458 const messageBubble : MessageBubbleData = {
@@ -1627,7 +1627,7 @@ export const PixiScene = (props: PixiSceneProps) => {
16271627 < Stage
16281628 width = { dimensions . width }
16291629 height = { dimensions . height }
1630- style = { { width : dimensions . width , height : dimensions . height , display : "block" } }
1630+ style = { { display : "block" } }
16311631 options = { {
16321632 antialias : false ,
16331633 backgroundColor : 0x101615 ,
0 commit comments