@directivegames/genesys.js 3.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -0
- package/assets/animation-profiles/mixamo.skeleton-profile.json +63 -0
- package/assets/animation-profiles/rigify.skeleton-profile.json +61 -0
- package/assets/character/SKM_SB_MediumHuman.glb +0 -0
- package/assets/character/config/AnimationStateMachineComponent.md +107 -0
- package/assets/character/config/mannequin-anim.json +53 -0
- package/assets/character/mannequin.glb +0 -0
- package/assets/character/mannequinG.glb +0 -0
- package/assets/default.genesys-scene +194 -0
- package/assets/models/PickupActors/SM_Pickup_Health.glb +0 -0
- package/assets/models/PickupActors/SM_Pickup_Station.glb +0 -0
- package/assets/models/SM_Capsule.glb +0 -0
- package/assets/models/SM_ChamferCube.glb +0 -0
- package/assets/models/SM_Cone.glb +0 -0
- package/assets/models/SM_Cube.glb +0 -0
- package/assets/models/SM_Cylinder.glb +0 -0
- package/assets/models/SM_Plane.glb +0 -0
- package/assets/models/SM_Pyramid.glb +0 -0
- package/assets/models/SM_Sphere.glb +0 -0
- package/assets/models/SM_Torus.glb +0 -0
- package/assets/models/SM_Wedge.glb +0 -0
- package/assets/models/Weapons/SM_ShotGun_01.glb +0 -0
- package/assets/models/demo/Characters/Knightdude.glb +0 -0
- package/assets/models/demo/Characters/Spacedude.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Bush01.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Bush02.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Flower01.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Flower02.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Flower03.glb +0 -0
- package/assets/models/demo/LowPoly/SM_GeneratedLandscape.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Grass01.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Grass02.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Grass03.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Mushroom01.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Mushroom02.glb +0 -0
- package/assets/models/demo/LowPoly/SM_MushroomCluster01.glb +0 -0
- package/assets/models/demo/LowPoly/SM_MushroomCluster02.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Rock01.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Rock02.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Rock03.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Rock04.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Tree01.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Tree02.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Tree03.glb +0 -0
- package/assets/models/demo/LowPoly/SM_Tree04.glb +0 -0
- package/assets/models/demo/LowPoly/SM_TreeStump.glb +0 -0
- package/assets/models/demo/LowPoly/SM_TreeTrunk.glb +0 -0
- package/assets/models/demo/LowPoly/low_poly_ship_wreck.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Dirt.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Grass02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Grass02Patch.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Gravel.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Lava.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_LavaStone.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Sand.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Stone.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_StoneA.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_StoneC.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Wall.glb +0 -0
- package/assets/models/demo/SandboxAsset/Blocks/SM_SB_Block_Water.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_Arachnids_Large_Spider.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_Adventurer_F01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_Adventurer_M01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_Aviator_F01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_Aviator_M01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_Aztec_F01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_Aztec_M01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_MediumHuman.glb +0 -0
- package/assets/models/demo/SandboxAsset/Characters/SKM_SB_Shaman.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Cloud_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Cloud_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Cloud_03.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Cloud_04.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Env_Cloud_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Env_Cloud_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Env_Cloud_03.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Env_Cloud_04.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Env_Cloud_05.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Env_Cloud_06.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_Env_Cloud_07.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_SmallCloud01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Clouds/SM_SB_SmallCloud_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_AztecStatue.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Claypot_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Claypot_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Claypot_03.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Claypot_Broken_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Claypot_Broken_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Crystal_Calendar_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Crystal_Calendar_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Crystal_Skull.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Goldpile_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Goldpile_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Rubble_Skeleton_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_TreasureChest.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_TreasureChestSmall.glb +0 -0
- package/assets/models/demo/SandboxAsset/Decorations/SM_SB_Wall_Deco_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_AngledWall.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Arch.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Beams.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Beams02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Corner.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_CornerB.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Floor.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Floor2.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Floor3.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_GrowingTree.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_HalfFloor.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_IronBucket.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Pillar.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Railing.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_RoofWindow.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Stairs01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Statue.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Wall.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Wall02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Wall03.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Wall03B.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_Wall04.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_WallB.glb +0 -0
- package/assets/models/demo/SandboxAsset/Dungeon/SM_SB_WallTrim.glb +0 -0
- package/assets/models/demo/SandboxAsset/Floors/SM_SB_Floor_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Floors/SM_SB_Floor_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Flowers/SM_SB_Flower01_ColorA.glb +0 -0
- package/assets/models/demo/SandboxAsset/Flowers/SM_SB_Flower01_ColorB.glb +0 -0
- package/assets/models/demo/SandboxAsset/Flowers/SM_SB_Flower02_ColorA.glb +0 -0
- package/assets/models/demo/SandboxAsset/Flowers/SM_SB_Flower02_ColorB.glb +0 -0
- package/assets/models/demo/SandboxAsset/Flowers/SM_SB_Flower03_ColorA.glb +0 -0
- package/assets/models/demo/SandboxAsset/Flowers/SM_SB_Flower03_ColorB.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Beach_Grass.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Birgaradier_Tree.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Cactus_Long.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_ElephantEar01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Fern01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_GrassPatch.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Growing_Plant.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Leaf_bush01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Middle_Moss.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Oracle_Tree.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Plant01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_Tree01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Foliage/SM_SB_plant.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_Arrow_large_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_Arrow_large_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_HangingBridgeEnd_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_HangingBridgeEnd_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_HangingBridgeMiddle.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_MovingPlatform_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_MovingWall.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_ObsidianTrap.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_Scull_Arrowshooter01.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_Scull_Arrowshooter02.glb +0 -0
- package/assets/models/demo/SandboxAsset/GameItems/SM_SB_Snakepit.glb +0 -0
- package/assets/models/demo/SandboxAsset/Rocks/SM_SB_Rock01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Rocks/SM_SB_Rock02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Slides/SM_SB_Slide_Corner_L.glb +0 -0
- package/assets/models/demo/SandboxAsset/Slides/SM_SB_Slide_Corner_R.glb +0 -0
- package/assets/models/demo/SandboxAsset/Slides/SM_SB_Slide_Edge.glb +0 -0
- package/assets/models/demo/SandboxAsset/Slides/SM_SB_Slide_End01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Slides/SM_SB_Slide_Module.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_CaribbeanPine_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_CaribbeanPine_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_CoconutTree01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_CoconutTree02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_KapokTree_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_KapokTree_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_QueenPalm_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_QueenPalm_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trees/SM_SB_TreeTrunk.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimA.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimB.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimC.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimD.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimE.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimF.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimG.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimH.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimI.glb +0 -0
- package/assets/models/demo/SandboxAsset/Trims/SM_SB_TrimJ.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Aztec_Wall_01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Aztec_Wall_02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Brick01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_BrickBlock01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_BrickBlock02.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Vineswall01.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_WallDecoA.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_01B_128x96.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_01_128x96.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_02B_128x96.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_02C_128x96.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_02D_128x96.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_02_128x96.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_03B_128x96.glb +0 -0
- package/assets/models/demo/SandboxAsset/Walls/SM_SB_Wall_L_03_128x96.glb +0 -0
- package/assets/prefabs/actors/demo_health_pickup.prefab.json +114 -0
- package/assets/prefabs/actors/demo_health_pickup_spawner.prefab.json +102 -0
- package/assets/prefabs/actors/test.prefab.json +87 -0
- package/assets/shaders/M_Anisotropy_Brushed.material.json +89 -0
- package/assets/shaders/M_Anisotropy_Radial.material.json +55 -0
- package/assets/shaders/M_Chrome.material.json +18 -0
- package/assets/shaders/M_Emissive_Blue.material.json +26 -0
- package/assets/shaders/M_Glass_Frosted.material.json +24 -0
- package/assets/shaders/M_Glass_ThinFilm.material.json +23 -0
- package/assets/shaders/M_Glossy_Grey.material.json +20 -0
- package/assets/shaders/M_Matte_White.material.json +20 -0
- package/assets/shaders/M_Metal_Anisotropic_Gold.material.json +31 -0
- package/assets/shaders/M_Metal_Anisotropic_Silver.material.json +31 -0
- package/assets/shaders/M_Metal_Brushed.material.json +61 -0
- package/assets/shaders/M_Paint_Clearcoat.material.json +28 -0
- package/assets/shaders/M_Stone_Mossy.material.json +153 -0
- package/assets/shaders/M_Stone_Mossy_Snow.material.json +151 -0
- package/assets/shaders/M_Toon_Anime.material.json +49 -0
- package/assets/shaders/M_Toon_Anime_5Step.material.json +45 -0
- package/assets/shaders/M_Toon_Cel.material.json +49 -0
- package/assets/shaders/M_Transmission.material.json +42 -0
- package/assets/shaders/M_Velvet_Blue.material.json +33 -0
- package/assets/shaders/M_Velvet_Purple.material.json +30 -0
- package/assets/shaders/M_Velvet_Red.material.json +33 -0
- package/assets/shaders/M_Wax_SSSLite.material.json +55 -0
- package/assets/shaders/matcap/M_Matcap_Blue.material.json +27 -0
- package/assets/shaders/matcap/M_Matcap_Rainbow.material.json +26 -0
- package/assets/shaders/matcap/M_Matcap_White.material.json +28 -0
- package/assets/sounds/birds.mp3 +0 -0
- package/assets/sounds/explosion.mp3 +0 -0
- package/assets/sounds/game-gun-short.mp3 +0 -0
- package/assets/sounds/laser.mp3 +0 -0
- package/assets/sounds/pickup.mp3 +0 -0
- package/assets/sounds/tuba.mp3 +0 -0
- package/assets/textures/Checkerboard.png +0 -0
- package/assets/textures/Grid_10x10.png +0 -0
- package/assets/textures/T_AnisotropyMap_Radial.png +0 -0
- package/assets/textures/T_Anisotropy_Roughness.png +0 -0
- package/assets/textures/T_Gradient.png +0 -0
- package/assets/textures/T_Grid_01.png +0 -0
- package/assets/textures/T_Grid_01.texture.json +7 -0
- package/assets/textures/T_Metal_Brushed_Normal.png +0 -0
- package/assets/textures/T_Normal.png +0 -0
- package/assets/textures/T_Stone_Mossy_AmbientOcclusion.jpg +0 -0
- package/assets/textures/T_Stone_Mossy_BaseColor.jpg +0 -0
- package/assets/textures/T_Stone_Mossy_Normal.jpg +0 -0
- package/assets/textures/T_Stone_Mossy_Roughness.jpg +0 -0
- package/assets/textures/T_Stone_Mossy_Snow_AmbientOcclusion.jpg +0 -0
- package/assets/textures/T_Stone_Mossy_Snow_BaseColor.jpg +0 -0
- package/assets/textures/T_Stone_Mossy_Snow_Normal.jpg +0 -0
- package/assets/textures/T_Stone_Mossy_Snow_Roughness.jpg +0 -0
- package/assets/textures/T_Toon_Anime_4Step.png +0 -0
- package/assets/textures/T_Toon_Anime_5Step.png +0 -0
- package/assets/textures/T_Toon_Cel_2Step.png +0 -0
- package/assets/textures/T_Wax_Thickness.png +0 -0
- package/assets/textures/matcaps/T_Matcap_Rainbow.png.png +0 -0
- package/assets/textures/matcaps/beige.png +0 -0
- package/assets/textures/matcaps/black.png +0 -0
- package/assets/textures/matcaps/blue.png +0 -0
- package/assets/textures/matcaps/brown.png +0 -0
- package/assets/textures/matcaps/emeraldGreen.png +0 -0
- package/assets/textures/matcaps/gold.png +0 -0
- package/assets/textures/matcaps/gray.png +0 -0
- package/assets/textures/matcaps/green.png +0 -0
- package/assets/textures/matcaps/metal.png +0 -0
- package/assets/textures/matcaps/orange.png +0 -0
- package/assets/textures/matcaps/purple.png +0 -0
- package/assets/textures/matcaps/red.png +0 -0
- package/assets/textures/matcaps/white.png +0 -0
- package/assets/textures/matcaps/yellow.png +0 -0
- package/assets/textures/skybox/citrus_orchard_road_puresky_2k.hdr +0 -0
- package/assets/textures/skybox/venice_sunset_4k.hdr +0 -0
- package/assets/ui/styles/ammo-counter.css +58 -0
- package/assets/ui/styles/compass.css +54 -0
- package/assets/ui/styles/controls-help.css +21 -0
- package/assets/ui/styles/crosshair.css +51 -0
- package/assets/ui/styles/inventory-bar.css +112 -0
- package/assets/ui/styles/inventory-grid.css +257 -0
- package/assets/ui/styles/main-menu.css +59 -0
- package/assets/ui/styles/minimap.css +12 -0
- package/assets/ui/styles/number-display.css +18 -0
- package/assets/ui/styles/progress-bar.css +199 -0
- package/assets/ui/styles/reload-indicator.css +76 -0
- package/assets/ui/templates/ammo-counter.html +7 -0
- package/assets/ui/templates/compass.html +6 -0
- package/assets/ui/templates/controls-help.html +9 -0
- package/assets/ui/templates/crosshair.html +1 -0
- package/assets/ui/templates/inventory-bar.html +38 -0
- package/assets/ui/templates/inventory-grid.html +9 -0
- package/assets/ui/templates/main-menu.html +10 -0
- package/assets/ui/templates/minimap.html +3 -0
- package/assets/ui/templates/number-display.html +3 -0
- package/assets/ui/templates/progress-bar.html +7 -0
- package/assets/ui/templates/reload-indicator.html +13 -0
- package/dist/games/animation-demo.d.ts +21 -0
- package/dist/games/animation-demo.js +398 -0
- package/dist/games/animation-retarget-demo.d.ts +44 -0
- package/dist/games/animation-retarget-demo.js +574 -0
- package/dist/games/behavior-tree-demo.d.ts +100 -0
- package/dist/games/behavior-tree-demo.js +1656 -0
- package/dist/games/character_animation.d.ts +15 -0
- package/dist/games/character_animation.js +170 -0
- package/dist/games/collision-demo.d.ts +4 -0
- package/dist/games/collision-demo.js +134 -0
- package/dist/games/deprecated/advanced-grid-demo.d.ts +18 -0
- package/dist/games/deprecated/advanced-grid-demo.js +305 -0
- package/dist/games/deprecated/airplane-demo.d.ts +10 -0
- package/dist/games/deprecated/airplane-demo.js +136 -0
- package/dist/games/deprecated/character-controller.d.ts +6 -0
- package/dist/games/deprecated/character-controller.js +144 -0
- package/dist/games/deprecated/chase-game.d.ts +17 -0
- package/dist/games/deprecated/chase-game.js +269 -0
- package/dist/games/deprecated/collision-config.d.ts +7 -0
- package/dist/games/deprecated/collision-config.js +295 -0
- package/dist/games/deprecated/door-demo.d.ts +30 -0
- package/dist/games/deprecated/door-demo.js +562 -0
- package/dist/games/deprecated/fps-demo.d.ts +9 -0
- package/dist/games/deprecated/fps-demo.js +119 -0
- package/dist/games/deprecated/fps-shotgun-demo.d.ts +19 -0
- package/dist/games/deprecated/fps-shotgun-demo.js +221 -0
- package/dist/games/deprecated/index.d.ts +25 -0
- package/dist/games/deprecated/index.js +26 -0
- package/dist/games/deprecated/lightmapping-demo.d.ts +135 -0
- package/dist/games/deprecated/lightmapping-demo.js +1344 -0
- package/dist/games/deprecated/lights-demo.d.ts +93 -0
- package/dist/games/deprecated/lights-demo.js +815 -0
- package/dist/games/deprecated/matcap-demo.d.ts +54 -0
- package/dist/games/deprecated/matcap-demo.js +788 -0
- package/dist/games/deprecated/material-demo-2.d.ts +14 -0
- package/dist/games/deprecated/material-demo-2.js +521 -0
- package/dist/games/deprecated/material-demo.d.ts +8 -0
- package/dist/games/deprecated/material-demo.js +177 -0
- package/dist/games/deprecated/memory-leak-test.d.ts +6 -0
- package/dist/games/deprecated/memory-leak-test.js +20 -0
- package/dist/games/deprecated/model-stress-test.d.ts +10 -0
- package/dist/games/deprecated/model-stress-test.js +116 -0
- package/dist/games/deprecated/multiplayer-demo.d.ts +13 -0
- package/dist/games/deprecated/multiplayer-demo.js +377 -0
- package/dist/games/deprecated/physics-demo.d.ts +10 -0
- package/dist/games/deprecated/physics-demo.js +200 -0
- package/dist/games/deprecated/shadow-demo.d.ts +25 -0
- package/dist/games/deprecated/shadow-demo.js +402 -0
- package/dist/games/deprecated/shooting-demo.d.ts +19 -0
- package/dist/games/deprecated/shooting-demo.js +338 -0
- package/dist/games/deprecated/skybox-demo.d.ts +35 -0
- package/dist/games/deprecated/skybox-demo.js +323 -0
- package/dist/games/deprecated/sound-demo.d.ts +11 -0
- package/dist/games/deprecated/sound-demo.js +125 -0
- package/dist/games/deprecated/timer-demo.d.ts +11 -0
- package/dist/games/deprecated/timer-demo.js +150 -0
- package/dist/games/deprecated/voxel-demo.d.ts +5 -0
- package/dist/games/deprecated/voxel-demo.js +41 -0
- package/dist/games/deprecated/world-commands.d.ts +8 -0
- package/dist/games/deprecated/world-commands.js +168 -0
- package/dist/games/deprecated/world-loading.d.ts +6 -0
- package/dist/games/deprecated/world-loading.js +86 -0
- package/dist/games/examples/fps-advanced/const.d.ts +171 -0
- package/dist/games/examples/fps-advanced/const.js +116 -0
- package/dist/games/examples/fps-advanced/enemies.d.ts +21 -0
- package/dist/games/examples/fps-advanced/enemies.js +182 -0
- package/dist/games/examples/fps-advanced/game-mode.d.ts +53 -0
- package/dist/games/examples/fps-advanced/game-mode.js +353 -0
- package/dist/games/examples/fps-advanced/game.d.ts +9 -0
- package/dist/games/examples/fps-advanced/game.js +58 -0
- package/dist/games/examples/fps-advanced/pickups.d.ts +36 -0
- package/dist/games/examples/fps-advanced/pickups.js +225 -0
- package/dist/games/examples/fps-advanced/player.d.ts +12 -0
- package/dist/games/examples/fps-advanced/player.js +110 -0
- package/dist/games/examples/fps-advanced/ui/endgame-ui.d.ts +21 -0
- package/dist/games/examples/fps-advanced/ui/endgame-ui.js +291 -0
- package/dist/games/examples/fps-advanced/ui/game-hud.d.ts +17 -0
- package/dist/games/examples/fps-advanced/ui/game-hud.js +225 -0
- package/dist/games/examples/fps-advanced/ui/menu-ui.d.ts +13 -0
- package/dist/games/examples/fps-advanced/ui/menu-ui.js +224 -0
- package/dist/games/examples/fps-advanced/ui/weapon-hud.d.ts +27 -0
- package/dist/games/examples/fps-advanced/ui/weapon-hud.js +259 -0
- package/dist/games/examples/fps-advanced/weapons.d.ts +14 -0
- package/dist/games/examples/fps-advanced/weapons.js +173 -0
- package/dist/games/examples/index.d.ts +5 -0
- package/dist/games/examples/index.js +6 -0
- package/dist/games/examples/plugin-demo/game.d.ts +7 -0
- package/dist/games/examples/plugin-demo/game.js +168 -0
- package/dist/games/examples/plugin-demo/plugins/dynamic-lighting.d.ts +8 -0
- package/dist/games/examples/plugin-demo/plugins/dynamic-lighting.js +156 -0
- package/dist/games/examples/plugin-demo/plugins/instanced-forest.d.ts +7 -0
- package/dist/games/examples/plugin-demo/plugins/instanced-forest.js +194 -0
- package/dist/games/examples/plugin-demo/plugins/particle-fountain.d.ts +7 -0
- package/dist/games/examples/plugin-demo/plugins/particle-fountain.js +64 -0
- package/dist/games/examples/plugin-demo/plugins/physics-playground.d.ts +7 -0
- package/dist/games/examples/plugin-demo/plugins/physics-playground.js +185 -0
- package/dist/games/examples/plugin-demo/plugins/robot-follower.d.ts +7 -0
- package/dist/games/examples/plugin-demo/plugins/robot-follower.js +347 -0
- package/dist/games/examples/plugin-demo/plugins/scatter-models.d.ts +7 -0
- package/dist/games/examples/plugin-demo/plugins/scatter-models.js +70 -0
- package/dist/games/examples/plugin-demo/plugins/simple-cube.d.ts +7 -0
- package/dist/games/examples/plugin-demo/plugins/simple-cube.js +44 -0
- package/dist/games/examples/plugin-demo/plugins/tic-tac-toe.d.ts +8 -0
- package/dist/games/examples/plugin-demo/plugins/tic-tac-toe.js +526 -0
- package/dist/games/examples/plugin-demo/plugins/wobbling-sphere.d.ts +7 -0
- package/dist/games/examples/plugin-demo/plugins/wobbling-sphere.js +63 -0
- package/dist/games/examples/side-scroller-advanced/const.d.ts +97 -0
- package/dist/games/examples/side-scroller-advanced/const.js +82 -0
- package/dist/games/examples/side-scroller-advanced/game-mode.d.ts +54 -0
- package/dist/games/examples/side-scroller-advanced/game-mode.js +351 -0
- package/dist/games/examples/side-scroller-advanced/game.d.ts +9 -0
- package/dist/games/examples/side-scroller-advanced/game.js +70 -0
- package/dist/games/examples/side-scroller-advanced/level-generator.d.ts +68 -0
- package/dist/games/examples/side-scroller-advanced/level-generator.js +366 -0
- package/dist/games/examples/side-scroller-advanced/pickups.d.ts +18 -0
- package/dist/games/examples/side-scroller-advanced/pickups.js +147 -0
- package/dist/games/examples/side-scroller-advanced/player.d.ts +5 -0
- package/dist/games/examples/side-scroller-advanced/player.js +104 -0
- package/dist/games/examples/side-scroller-advanced/ui/endgame-ui.d.ts +16 -0
- package/dist/games/examples/side-scroller-advanced/ui/endgame-ui.js +290 -0
- package/dist/games/examples/side-scroller-advanced/ui/game-hud.d.ts +21 -0
- package/dist/games/examples/side-scroller-advanced/ui/game-hud.js +265 -0
- package/dist/games/examples/side-scroller-advanced/ui/menu-ui.d.ts +13 -0
- package/dist/games/examples/side-scroller-advanced/ui/menu-ui.js +222 -0
- package/dist/games/examples/vehicle/base-vehicle.d.ts +30 -0
- package/dist/games/examples/vehicle/base-vehicle.js +155 -0
- package/dist/games/examples/vehicle/game.d.ts +11 -0
- package/dist/games/examples/vehicle/game.js +140 -0
- package/dist/games/examples/vehicle/mesh-vehicle.d.ts +19 -0
- package/dist/games/examples/vehicle/mesh-vehicle.js +194 -0
- package/dist/games/examples/vehicle/player.d.ts +9 -0
- package/dist/games/examples/vehicle/player.js +87 -0
- package/dist/games/examples/vehicle/primitive-vehicle.d.ts +21 -0
- package/dist/games/examples/vehicle/primitive-vehicle.js +269 -0
- package/dist/games/examples/vr-game/VRAttachableCube.d.ts +8 -0
- package/dist/games/examples/vr-game/VRAttachableCube.js +41 -0
- package/dist/games/examples/vr-game/VRInteractableCylinder.d.ts +10 -0
- package/dist/games/examples/vr-game/VRInteractableCylinder.js +76 -0
- package/dist/games/examples/vr-game/VRPressableButton.d.ts +24 -0
- package/dist/games/examples/vr-game/VRPressableButton.js +135 -0
- package/dist/games/examples/vr-game/VRProjectileActor.d.ts +19 -0
- package/dist/games/examples/vr-game/VRProjectileActor.js +75 -0
- package/dist/games/examples/vr-game/VRRifleActor.d.ts +16 -0
- package/dist/games/examples/vr-game/VRRifleActor.js +142 -0
- package/dist/games/examples/vr-game/game.d.ts +9 -0
- package/dist/games/examples/vr-game/game.js +56 -0
- package/dist/games/examples/vr-game/index.d.ts +5 -0
- package/dist/games/examples/vr-game/index.js +9 -0
- package/dist/games/examples/vr-game/scene.d.ts +5 -0
- package/dist/games/examples/vr-game/scene.js +83 -0
- package/dist/games/hand-tracking-demo.d.ts +10 -0
- package/dist/games/hand-tracking-demo.js +65 -0
- package/dist/games/index.d.ts +21 -0
- package/dist/games/index.js +22 -0
- package/dist/games/instanced-mesh-demo.d.ts +45 -0
- package/dist/games/instanced-mesh-demo.js +416 -0
- package/dist/games/manifold-demo.d.ts +6 -0
- package/dist/games/manifold-demo.js +44 -0
- package/dist/games/navigation-demo.d.ts +30 -0
- package/dist/games/navigation-demo.js +336 -0
- package/dist/games/navmesh-primitives-demo.d.ts +167 -0
- package/dist/games/navmesh-primitives-demo.js +1105 -0
- package/dist/games/performance-test-demo.d.ts +13 -0
- package/dist/games/performance-test-demo.js +214 -0
- package/dist/games/postprocess-demo.d.ts +46 -0
- package/dist/games/postprocess-demo.js +829 -0
- package/dist/games/ragdoll-demo-simple.d.ts +34 -0
- package/dist/games/ragdoll-demo-simple.js +152 -0
- package/dist/games/ragdoll-demo.d.ts +30 -0
- package/dist/games/ragdoll-demo.js +258 -0
- package/dist/games/swipe-tap-demo.d.ts +24 -0
- package/dist/games/swipe-tap-demo.js +238 -0
- package/dist/games/tween-demo.d.ts +22 -0
- package/dist/games/tween-demo.js +122 -0
- package/dist/games/ui-demo.d.ts +75 -0
- package/dist/games/ui-demo.js +1054 -0
- package/dist/games/vfx-demo.d.ts +48 -0
- package/dist/games/vfx-demo.js +821 -0
- package/dist/games/vfx-wawa-demo.d.ts +7 -0
- package/dist/games/vfx-wawa-demo.js +471 -0
- package/dist/games/vr-ui-demo-minimal.d.ts +15 -0
- package/dist/games/vr-ui-demo-minimal.js +141 -0
- package/dist/games/vr-ui-demo.d.ts +32 -0
- package/dist/games/vr-ui-demo.js +871 -0
- package/dist/genesys.min.mjs +7035 -0
- package/dist/launcher.d.ts +1 -0
- package/dist/launcher.js +778 -0
- package/dist/scripts/build-browser-bundle.d.ts +5 -0
- package/dist/scripts/build-browser-bundle.js +69 -0
- package/dist/scripts/check-asset-path.d.ts +1 -0
- package/dist/scripts/check-asset-path.js +146 -0
- package/dist/scripts/dump-templates.d.ts +1 -0
- package/dist/scripts/dump-templates.js +16 -0
- package/dist/scripts/generate-dependencies.d.ts +1 -0
- package/dist/scripts/generate-dependencies.js +110 -0
- package/dist/scripts/generate-prefabs.d.ts +1 -0
- package/dist/scripts/generate-prefabs.js +106 -0
- package/dist/scripts/load-save-world.d.ts +2 -0
- package/dist/scripts/load-save-world.js +35 -0
- package/dist/scripts/loc.d.ts +1 -0
- package/dist/scripts/loc.js +80 -0
- package/dist/scripts/optimize-glb-wrapper.d.ts +1 -0
- package/dist/scripts/optimize-glb-wrapper.js +26 -0
- package/dist/scripts/optimize-glb.d.ts +41 -0
- package/dist/scripts/optimize-glb.js +296 -0
- package/dist/scripts/session-server.d.ts +117 -0
- package/dist/scripts/session-server.js +782 -0
- package/dist/scripts/test-world-loading.d.ts +14 -0
- package/dist/scripts/test-world-loading.js +19 -0
- package/dist/src/actors/Actor.d.ts +510 -0
- package/dist/src/actors/Actor.js +1180 -0
- package/dist/src/actors/GLTFMeshActor.d.ts +34 -0
- package/dist/src/actors/GLTFMeshActor.js +102 -0
- package/dist/src/actors/GlobalParticleManager.d.ts +154 -0
- package/dist/src/actors/GlobalParticleManager.js +365 -0
- package/dist/src/actors/Pawn.d.ts +191 -0
- package/dist/src/actors/Pawn.js +384 -0
- package/dist/src/actors/PlayerController.d.ts +177 -0
- package/dist/src/actors/PlayerController.js +763 -0
- package/dist/src/actors/PlayerStart.d.ts +8 -0
- package/dist/src/actors/PlayerStart.js +48 -0
- package/dist/src/actors/Projectile.d.ts +50 -0
- package/dist/src/actors/Projectile.js +157 -0
- package/dist/src/actors/RagdollTestActor.d.ts +31 -0
- package/dist/src/actors/RagdollTestActor.js +153 -0
- package/dist/src/actors/ThirdPersonCharacterPawn.d.ts +27 -0
- package/dist/src/actors/ThirdPersonCharacterPawn.js +149 -0
- package/dist/src/actors/index.d.ts +20 -0
- package/dist/src/actors/index.js +21 -0
- package/dist/src/animation/AnimationClipCache.d.ts +41 -0
- package/dist/src/animation/AnimationClipCache.js +97 -0
- package/dist/src/animation/AnimationRetargeting.d.ts +100 -0
- package/dist/src/animation/AnimationRetargeting.js +455 -0
- package/dist/src/animation/SkeletonProfile.d.ts +112 -0
- package/dist/src/animation/SkeletonProfile.js +84 -0
- package/dist/src/animation/index.d.ts +14 -0
- package/dist/src/animation/index.js +15 -0
- package/dist/src/animation/retargeting.d.ts +142 -0
- package/dist/src/animation/retargeting.js +834 -0
- package/dist/src/components/CharacterStatsComponent.d.ts +89 -0
- package/dist/src/components/CharacterStatsComponent.js +207 -0
- package/dist/src/components/CollisionShapeComponent.d.ts +102 -0
- package/dist/src/components/CollisionShapeComponent.js +232 -0
- package/dist/src/components/Component.d.ts +82 -0
- package/dist/src/components/Component.js +2 -0
- package/dist/src/components/FollowComponent.d.ts +67 -0
- package/dist/src/components/FollowComponent.js +128 -0
- package/dist/src/components/PrimitiveComponent.d.ts +183 -0
- package/dist/src/components/PrimitiveComponent.js +368 -0
- package/dist/src/components/ResetPositionComponent.d.ts +52 -0
- package/dist/src/components/ResetPositionComponent.js +161 -0
- package/dist/src/components/SceneComponent.d.ts +225 -0
- package/dist/src/components/SceneComponent.js +621 -0
- package/dist/src/components/audio/SoundComponent.d.ts +109 -0
- package/dist/src/components/audio/SoundComponent.js +353 -0
- package/dist/src/components/audio/index.d.ts +11 -0
- package/dist/src/components/audio/index.js +12 -0
- package/dist/src/components/csg/CSGCombiner.d.ts +87 -0
- package/dist/src/components/csg/CSGCombiner.js +240 -0
- package/dist/src/components/csg/CSGShapes.d.ts +173 -0
- package/dist/src/components/csg/CSGShapes.js +326 -0
- package/dist/src/components/csg/index.d.ts +12 -0
- package/dist/src/components/csg/index.js +13 -0
- package/dist/src/components/gameplay/BaseWeaponComponent.d.ts +175 -0
- package/dist/src/components/gameplay/BaseWeaponComponent.js +496 -0
- package/dist/src/components/gameplay/DoorComponent.d.ts +236 -0
- package/dist/src/components/gameplay/DoorComponent.js +928 -0
- package/dist/src/components/gameplay/Equipment.d.ts +22 -0
- package/dist/src/components/gameplay/Equipment.js +9 -0
- package/dist/src/components/gameplay/GenericEquipment.d.ts +37 -0
- package/dist/src/components/gameplay/GenericEquipment.js +90 -0
- package/dist/src/components/gameplay/InstantHitWeaponComponent.d.ts +96 -0
- package/dist/src/components/gameplay/InstantHitWeaponComponent.js +194 -0
- package/dist/src/components/gameplay/PickupComponent.d.ts +130 -0
- package/dist/src/components/gameplay/PickupComponent.js +429 -0
- package/dist/src/components/gameplay/ProjectileWeaponComponent.d.ts +49 -0
- package/dist/src/components/gameplay/ProjectileWeaponComponent.js +93 -0
- package/dist/src/components/gameplay/ShotgunComponent.d.ts +18 -0
- package/dist/src/components/gameplay/ShotgunComponent.js +216 -0
- package/dist/src/components/gameplay/SwitchComponent.d.ts +152 -0
- package/dist/src/components/gameplay/SwitchComponent.js +481 -0
- package/dist/src/components/gameplay/TriggerZoneComponent.d.ts +157 -0
- package/dist/src/components/gameplay/TriggerZoneComponent.js +312 -0
- package/dist/src/components/gameplay/index.d.ts +20 -0
- package/dist/src/components/gameplay/index.js +21 -0
- package/dist/src/components/index.d.ts +16 -0
- package/dist/src/components/index.js +18 -0
- package/dist/src/components/lights/AmbientLightComponent.d.ts +37 -0
- package/dist/src/components/lights/AmbientLightComponent.js +68 -0
- package/dist/src/components/lights/DirectionalLightComponent.d.ts +77 -0
- package/dist/src/components/lights/DirectionalLightComponent.js +146 -0
- package/dist/src/components/lights/HemisphereLightComponent.d.ts +67 -0
- package/dist/src/components/lights/HemisphereLightComponent.js +121 -0
- package/dist/src/components/lights/LightComponent.d.ts +145 -0
- package/dist/src/components/lights/LightComponent.js +315 -0
- package/dist/src/components/lights/PointLightComponent.d.ts +61 -0
- package/dist/src/components/lights/PointLightComponent.js +103 -0
- package/dist/src/components/lights/RectAreaLightComponent.d.ts +78 -0
- package/dist/src/components/lights/RectAreaLightComponent.js +135 -0
- package/dist/src/components/lights/SpotLightComponent.d.ts +100 -0
- package/dist/src/components/lights/SpotLightComponent.js +167 -0
- package/dist/src/components/lights/index.d.ts +17 -0
- package/dist/src/components/lights/index.js +18 -0
- package/dist/src/components/movement/AerialMovementComponent.d.ts +93 -0
- package/dist/src/components/movement/AerialMovementComponent.js +339 -0
- package/dist/src/components/movement/AirplaneMovementComponent.d.ts +59 -0
- package/dist/src/components/movement/AirplaneMovementComponent.js +215 -0
- package/dist/src/components/movement/BasePawnMovementComponent.d.ts +132 -0
- package/dist/src/components/movement/BasePawnMovementComponent.js +264 -0
- package/dist/src/components/movement/CharacterMovementComponent.d.ts +175 -0
- package/dist/src/components/movement/CharacterMovementComponent.js +448 -0
- package/dist/src/components/movement/DirectionalCharacterMovementComponent.d.ts +17 -0
- package/dist/src/components/movement/DirectionalCharacterMovementComponent.js +82 -0
- package/dist/src/components/movement/NpcMovementComponent.d.ts +232 -0
- package/dist/src/components/movement/NpcMovementComponent.js +890 -0
- package/dist/src/components/movement/PathMovementComponent.d.ts +54 -0
- package/dist/src/components/movement/PathMovementComponent.js +211 -0
- package/dist/src/components/movement/TopDownMovementComponent.d.ts +25 -0
- package/dist/src/components/movement/TopDownMovementComponent.js +79 -0
- package/dist/src/components/movement/TweenMovementComponent.d.ts +59 -0
- package/dist/src/components/movement/TweenMovementComponent.js +362 -0
- package/dist/src/components/movement/VehicleMovementComponent.d.ts +98 -0
- package/dist/src/components/movement/VehicleMovementComponent.js +402 -0
- package/dist/src/components/movement/index.d.ts +19 -0
- package/dist/src/components/movement/index.js +20 -0
- package/dist/src/components/physics/RagdollComponent.d.ts +118 -0
- package/dist/src/components/physics/RagdollComponent.js +671 -0
- package/dist/src/components/visual/AnimationComponent.d.ts +29 -0
- package/dist/src/components/visual/AnimationComponent.js +234 -0
- package/dist/src/components/visual/AnimationStateMachineComponent.d.ts +235 -0
- package/dist/src/components/visual/AnimationStateMachineComponent.js +1048 -0
- package/dist/src/components/visual/BaseInstancedMeshComponent.d.ts +253 -0
- package/dist/src/components/visual/BaseInstancedMeshComponent.js +763 -0
- package/dist/src/components/visual/BillboardComponent.d.ts +26 -0
- package/dist/src/components/visual/BillboardComponent.js +143 -0
- package/dist/src/components/visual/EditorOnlyMeshComponent.d.ts +17 -0
- package/dist/src/components/visual/EditorOnlyMeshComponent.js +53 -0
- package/dist/src/components/visual/FogComponent.d.ts +32 -0
- package/dist/src/components/visual/FogComponent.js +131 -0
- package/dist/src/components/visual/GLTFMeshComponent.d.ts +138 -0
- package/dist/src/components/visual/GLTFMeshComponent.js +411 -0
- package/dist/src/components/visual/InstancedGltfMeshComponent.d.ts +75 -0
- package/dist/src/components/visual/InstancedGltfMeshComponent.js +217 -0
- package/dist/src/components/visual/InstancedMeshComponent.d.ts +57 -0
- package/dist/src/components/visual/InstancedMeshComponent.js +114 -0
- package/dist/src/components/visual/MeshComponent.d.ts +71 -0
- package/dist/src/components/visual/MeshComponent.js +208 -0
- package/dist/src/components/visual/ParticleEmitterComponent.d.ts +145 -0
- package/dist/src/components/visual/ParticleEmitterComponent.js +569 -0
- package/dist/src/components/visual/SkyboxComponent.d.ts +135 -0
- package/dist/src/components/visual/SkyboxComponent.js +342 -0
- package/dist/src/components/visual/TerrainMeshComponent.d.ts +119 -0
- package/dist/src/components/visual/TerrainMeshComponent.js +309 -0
- package/dist/src/components/visual/UI3DComponent.d.ts +60 -0
- package/dist/src/components/visual/UI3DComponent.js +248 -0
- package/dist/src/components/visual/index.d.ts +23 -0
- package/dist/src/components/visual/index.js +24 -0
- package/dist/src/components/voxel/MagicaVoxelLoader.d.ts +18 -0
- package/dist/src/components/voxel/MagicaVoxelLoader.js +151 -0
- package/dist/src/components/voxel/VoxelMeshComponent.d.ts +66 -0
- package/dist/src/components/voxel/VoxelMeshComponent.js +246 -0
- package/dist/src/components/voxel/index.d.ts +2 -0
- package/dist/src/components/voxel/index.js +3 -0
- package/dist/src/const.d.ts +61 -0
- package/dist/src/const.js +62 -0
- package/dist/src/csg/CSGUtils.d.ts +118 -0
- package/dist/src/csg/CSGUtils.js +805 -0
- package/dist/src/csg/ManifoldWrapper.d.ts +172 -0
- package/dist/src/csg/ManifoldWrapper.js +629 -0
- package/dist/src/csg/index.d.ts +13 -0
- package/dist/src/csg/index.js +14 -0
- package/dist/src/dependencies.d.ts +125 -0
- package/dist/src/dependencies.js +72 -0
- package/dist/src/game/GameBuilder.d.ts +104 -0
- package/dist/src/game/GameBuilder.js +263 -0
- package/dist/src/game/GameLoop.d.ts +204 -0
- package/dist/src/game/GameLoop.js +545 -0
- package/dist/src/game/GameMode.d.ts +58 -0
- package/dist/src/game/GameMode.js +131 -0
- package/dist/src/game/Playable.d.ts +38 -0
- package/dist/src/game/Playable.js +83 -0
- package/dist/src/game/World.d.ts +512 -0
- package/dist/src/game/World.js +1467 -0
- package/dist/src/game/index.d.ts +18 -0
- package/dist/src/game/index.js +19 -0
- package/dist/src/index.d.ts +39 -0
- package/dist/src/index.js +40 -0
- package/dist/src/materials.d.ts +49 -0
- package/dist/src/materials.js +177 -0
- package/dist/src/multiplayer/MovementPrediction.d.ts +28 -0
- package/dist/src/multiplayer/MovementPrediction.js +204 -0
- package/dist/src/multiplayer/NetWorld.d.ts +125 -0
- package/dist/src/multiplayer/NetWorld.js +960 -0
- package/dist/src/multiplayer/implementations/MemorySession.d.ts +18 -0
- package/dist/src/multiplayer/implementations/MemorySession.js +112 -0
- package/dist/src/multiplayer/implementations/WebSocketSession.d.ts +134 -0
- package/dist/src/multiplayer/implementations/WebSocketSession.js +439 -0
- package/dist/src/multiplayer/implementations/index.d.ts +14 -0
- package/dist/src/multiplayer/implementations/index.js +15 -0
- package/dist/src/multiplayer/index.d.ts +16 -0
- package/dist/src/multiplayer/index.js +17 -0
- package/dist/src/multiplayer/interface.d.ts +134 -0
- package/dist/src/multiplayer/interface.js +87 -0
- package/dist/src/navigation/NavigationServer.d.ts +134 -0
- package/dist/src/navigation/NavigationServer.js +47 -0
- package/dist/src/navigation/RecastNavigationServer.d.ts +82 -0
- package/dist/src/navigation/RecastNavigationServer.js +325 -0
- package/dist/src/navigation/index.d.ts +16 -0
- package/dist/src/navigation/index.js +17 -0
- package/dist/src/npc/behavior-tree/BehaviorNode.d.ts +95 -0
- package/dist/src/npc/behavior-tree/BehaviorNode.js +177 -0
- package/dist/src/npc/behavior-tree/BehaviorTreeComponent.d.ts +104 -0
- package/dist/src/npc/behavior-tree/BehaviorTreeComponent.js +341 -0
- package/dist/src/npc/behavior-tree/behaviors/BehaviorAction.d.ts +52 -0
- package/dist/src/npc/behavior-tree/behaviors/BehaviorAction.js +70 -0
- package/dist/src/npc/behavior-tree/behaviors/ConditionEvaluator.d.ts +73 -0
- package/dist/src/npc/behavior-tree/behaviors/ConditionEvaluator.js +116 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialMoveToTargetAction.d.ts +33 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialMoveToTargetAction.js +138 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialSearchAction.d.ts +42 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialSearchAction.js +170 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialTrackTargetAction.d.ts +27 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialTrackTargetAction.js +86 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialWanderAction.d.ts +50 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/AerialWanderAction.js +189 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/index.d.ts +4 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/aerial/index.js +6 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/combat/MeleeAttackAction.d.ts +37 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/combat/MeleeAttackAction.js +172 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/combat/ShootAction.d.ts +35 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/combat/ShootAction.js +173 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/combat/index.d.ts +2 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/combat/index.js +4 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/FleeFromTargetAction.d.ts +34 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/FleeFromTargetAction.js +148 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/FollowActorAction.d.ts +30 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/FollowActorAction.js +129 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/MoveToPositionAction.d.ts +27 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/MoveToPositionAction.js +115 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/SetNextWaypointAction.d.ts +28 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/SetNextWaypointAction.js +120 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/WanderAction.d.ts +35 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/WanderAction.js +172 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/index.d.ts +5 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/ground/index.js +7 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/index.d.ts +4 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/index.js +10 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/CalculateTacticalPositionAction.d.ts +32 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/CalculateTacticalPositionAction.js +123 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/LookAtTargetAction.d.ts +43 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/LookAtTargetAction.js +140 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/WaitAction.d.ts +24 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/WaitAction.js +85 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/index.d.ts +3 -0
- package/dist/src/npc/behavior-tree/behaviors/actions/utility/index.js +5 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/BlackboardValueCondition.d.ts +40 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/BlackboardValueCondition.js +133 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/CanSeeTargetCondition.d.ts +29 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/CanSeeTargetCondition.js +167 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/HasLastKnownPositionCondition.d.ts +19 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/HasLastKnownPositionCondition.js +67 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/HpAbovePercentCondition.d.ts +25 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/HpAbovePercentCondition.js +94 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/IsPlayerNearCondition.d.ts +15 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/IsPlayerNearCondition.js +51 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/TargetBelowHpPercentCondition.d.ts +19 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/TargetBelowHpPercentCondition.js +66 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/TargetInConeCondition.d.ts +26 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/TargetInConeCondition.js +111 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/TimeLimitCondition.d.ts +24 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/TimeLimitCondition.js +81 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/index.d.ts +8 -0
- package/dist/src/npc/behavior-tree/behaviors/conditions/index.js +15 -0
- package/dist/src/npc/behavior-tree/behaviors/index.d.ts +4 -0
- package/dist/src/npc/behavior-tree/behaviors/index.js +8 -0
- package/dist/src/npc/behavior-tree/blackboard/Blackboard.d.ts +50 -0
- package/dist/src/npc/behavior-tree/blackboard/Blackboard.js +121 -0
- package/dist/src/npc/behavior-tree/blackboard/BlackboardKey.d.ts +35 -0
- package/dist/src/npc/behavior-tree/blackboard/BlackboardKey.js +66 -0
- package/dist/src/npc/behavior-tree/blackboard/index.d.ts +2 -0
- package/dist/src/npc/behavior-tree/blackboard/index.js +3 -0
- package/dist/src/npc/behavior-tree/index.d.ts +9 -0
- package/dist/src/npc/behavior-tree/index.js +19 -0
- package/dist/src/npc/behavior-tree/loader/BehaviorTreeLoader.d.ts +91 -0
- package/dist/src/npc/behavior-tree/loader/BehaviorTreeLoader.js +240 -0
- package/dist/src/npc/behavior-tree/nodes/CompositeNode.d.ts +46 -0
- package/dist/src/npc/behavior-tree/nodes/CompositeNode.js +93 -0
- package/dist/src/npc/behavior-tree/nodes/LeafNode.d.ts +8 -0
- package/dist/src/npc/behavior-tree/nodes/LeafNode.js +11 -0
- package/dist/src/npc/behavior-tree/nodes/composite/SelectorNode.d.ts +15 -0
- package/dist/src/npc/behavior-tree/nodes/composite/SelectorNode.js +61 -0
- package/dist/src/npc/behavior-tree/nodes/composite/SequenceNode.d.ts +15 -0
- package/dist/src/npc/behavior-tree/nodes/composite/SequenceNode.js +61 -0
- package/dist/src/physics/BasePhysicsEngine.d.ts +389 -0
- package/dist/src/physics/BasePhysicsEngine.js +1227 -0
- package/dist/src/physics/IPhysicsVehicle.d.ts +150 -0
- package/dist/src/physics/IPhysicsVehicle.js +2 -0
- package/dist/src/physics/PhysicsEngine.d.ts +425 -0
- package/dist/src/physics/PhysicsEngine.js +69 -0
- package/dist/src/physics/PhysicsTypes.d.ts +91 -0
- package/dist/src/physics/PhysicsTypes.js +24 -0
- package/dist/src/physics/implementations/RapierDebugRender.d.ts +24 -0
- package/dist/src/physics/implementations/RapierDebugRender.js +66 -0
- package/dist/src/physics/implementations/RapierPhysics.d.ts +122 -0
- package/dist/src/physics/implementations/RapierPhysics.js +1191 -0
- package/dist/src/physics/implementations/RapierVehicle.d.ts +31 -0
- package/dist/src/physics/implementations/RapierVehicle.js +236 -0
- package/dist/src/physics/index.d.ts +16 -0
- package/dist/src/physics/index.js +17 -0
- package/dist/src/render/EdgeOutlineEffect.d.ts +40 -0
- package/dist/src/render/EdgeOutlineEffect.js +389 -0
- package/dist/src/render/PostProcessManager.d.ts +274 -0
- package/dist/src/render/PostProcessManager.js +932 -0
- package/dist/src/render/Renderer.d.ts +84 -0
- package/dist/src/render/Renderer.js +306 -0
- package/dist/src/render/Texture.d.ts +51 -0
- package/dist/src/render/Texture.js +144 -0
- package/dist/src/render/index.d.ts +20 -0
- package/dist/src/render/index.js +21 -0
- package/dist/src/render/lightmapping/LightmapAtlas.d.ts +52 -0
- package/dist/src/render/lightmapping/LightmapAtlas.js +201 -0
- package/dist/src/render/lightmapping/LightmapBaker.d.ts +99 -0
- package/dist/src/render/lightmapping/LightmapBaker.js +239 -0
- package/dist/src/render/lightmapping/LightmapManager.d.ts +148 -0
- package/dist/src/render/lightmapping/LightmapManager.js +630 -0
- package/dist/src/render/lightmapping/LightmapMaterial.d.ts +26 -0
- package/dist/src/render/lightmapping/LightmapMaterial.js +242 -0
- package/dist/src/render/lightmapping/LightmapSerialization.d.ts +379 -0
- package/dist/src/render/lightmapping/LightmapSerialization.js +244 -0
- package/dist/src/render/lightmapping/LightmapSerializer.d.ts +94 -0
- package/dist/src/render/lightmapping/LightmapSerializer.js +223 -0
- package/dist/src/render/lightmapping/MultiLightmapperMaterial.d.ts +41 -0
- package/dist/src/render/lightmapping/MultiLightmapperMaterial.js +424 -0
- package/dist/src/render/lightmapping/index.d.ts +9 -0
- package/dist/src/render/lightmapping/index.js +6 -0
- package/dist/src/render/postprocessing/EffectPassWrapper.d.ts +17 -0
- package/dist/src/render/postprocessing/EffectPassWrapper.js +47 -0
- package/dist/src/render/postprocessing/ObjectOutlineEffect.d.ts +49 -0
- package/dist/src/render/postprocessing/ObjectOutlineEffect.js +364 -0
- package/dist/src/render/postprocessing/index.d.ts +2 -0
- package/dist/src/render/postprocessing/index.js +3 -0
- package/dist/src/runtime/GameRuntime.d.ts +25 -0
- package/dist/src/runtime/GameRuntime.js +131 -0
- package/dist/src/runtime/InjectedDependencies.d.ts +13 -0
- package/dist/src/runtime/InjectedDependencies.js +63 -0
- package/dist/src/runtime/Utils.d.ts +16 -0
- package/dist/src/runtime/Utils.js +113 -0
- package/dist/src/runtime/index.d.ts +4 -0
- package/dist/src/runtime/index.js +5 -0
- package/dist/src/runtime/materials/MatcapShaderMaterial.d.ts +23 -0
- package/dist/src/runtime/materials/MatcapShaderMaterial.js +235 -0
- package/dist/src/runtime/materials/index.d.ts +1 -0
- package/dist/src/runtime/materials/index.js +2 -0
- package/dist/src/scripting/Plugin.d.ts +64 -0
- package/dist/src/scripting/Plugin.js +2 -0
- package/dist/src/scripting/PluginManager.d.ts +40 -0
- package/dist/src/scripting/PluginManager.js +111 -0
- package/dist/src/scripting/index.d.ts +1 -0
- package/dist/src/scripting/index.js +2 -0
- package/dist/src/storage/defaultStorageProvider.d.ts +15 -0
- package/dist/src/storage/defaultStorageProvider.js +73 -0
- package/dist/src/storage/index.d.ts +16 -0
- package/dist/src/storage/index.js +17 -0
- package/dist/src/storage/projectContext.d.ts +80 -0
- package/dist/src/storage/projectContext.js +164 -0
- package/dist/src/storage/storageProvider.d.ts +148 -0
- package/dist/src/storage/storageProvider.js +181 -0
- package/dist/src/systems/ClassRegistry.d.ts +98 -0
- package/dist/src/systems/ClassRegistry.js +478 -0
- package/dist/src/systems/ConsoleManager.d.ts +66 -0
- package/dist/src/systems/ConsoleManager.js +465 -0
- package/dist/src/systems/ConsoleVariableHandler.d.ts +17 -0
- package/dist/src/systems/ConsoleVariableHandler.js +120 -0
- package/dist/src/systems/ConsoleVariableManager.d.ts +128 -0
- package/dist/src/systems/ConsoleVariableManager.js +295 -0
- package/dist/src/systems/InputManager.d.ts +511 -0
- package/dist/src/systems/InputManager.js +1025 -0
- package/dist/src/systems/ObjectNamingSystem.d.ts +9 -0
- package/dist/src/systems/ObjectNamingSystem.js +34 -0
- package/dist/src/systems/Stats.d.ts +36 -0
- package/dist/src/systems/Stats.js +193 -0
- package/dist/src/systems/TimerSystem.d.ts +180 -0
- package/dist/src/systems/TimerSystem.js +292 -0
- package/dist/src/systems/TweenManager.d.ts +57 -0
- package/dist/src/systems/TweenManager.js +107 -0
- package/dist/src/systems/WorldSerialization.d.ts +216 -0
- package/dist/src/systems/WorldSerialization.js +1082 -0
- package/dist/src/systems/collision/CollisionConfig.d.ts +56 -0
- package/dist/src/systems/collision/CollisionConfig.js +249 -0
- package/dist/src/systems/collision/CollisionTypes.d.ts +138 -0
- package/dist/src/systems/collision/CollisionTypes.js +204 -0
- package/dist/src/systems/collision/index.d.ts +15 -0
- package/dist/src/systems/collision/index.js +16 -0
- package/dist/src/systems/index.d.ts +23 -0
- package/dist/src/systems/index.js +24 -0
- package/dist/src/templates/MyActor.d.ts +9 -0
- package/dist/src/templates/MyActor.js +25 -0
- package/dist/src/templates/MySceneComponent.d.ts +9 -0
- package/dist/src/templates/MySceneComponent.js +25 -0
- package/dist/src/ui/LoadingScreen.d.ts +15 -0
- package/dist/src/ui/LoadingScreen.js +103 -0
- package/dist/src/ui/UIElement.d.ts +74 -0
- package/dist/src/ui/UIElement.js +202 -0
- package/dist/src/ui/UILayout.d.ts +126 -0
- package/dist/src/ui/UILayout.js +244 -0
- package/dist/src/ui/UIManager.d.ts +44 -0
- package/dist/src/ui/UIManager.js +148 -0
- package/dist/src/ui/UIResource.d.ts +6 -0
- package/dist/src/ui/UIResource.js +24 -0
- package/dist/src/ui/components/AmmoCounter.d.ts +28 -0
- package/dist/src/ui/components/AmmoCounter.js +125 -0
- package/dist/src/ui/components/BaseUIComponent.d.ts +128 -0
- package/dist/src/ui/components/BaseUIComponent.js +342 -0
- package/dist/src/ui/components/Compass.d.ts +28 -0
- package/dist/src/ui/components/Compass.js +125 -0
- package/dist/src/ui/components/ControlsPanel.d.ts +37 -0
- package/dist/src/ui/components/ControlsPanel.js +47 -0
- package/dist/src/ui/components/Crosshair.d.ts +20 -0
- package/dist/src/ui/components/Crosshair.js +67 -0
- package/dist/src/ui/components/InventoryBar.d.ts +103 -0
- package/dist/src/ui/components/InventoryBar.js +177 -0
- package/dist/src/ui/components/InventoryGrid.d.ts +139 -0
- package/dist/src/ui/components/InventoryGrid.js +407 -0
- package/dist/src/ui/components/Minimap.d.ts +39 -0
- package/dist/src/ui/components/Minimap.js +156 -0
- package/dist/src/ui/components/NumberDisplay.d.ts +51 -0
- package/dist/src/ui/components/NumberDisplay.js +164 -0
- package/dist/src/ui/components/ProgressBar.d.ts +115 -0
- package/dist/src/ui/components/ProgressBar.js +347 -0
- package/dist/src/ui/components/ReloadIndicator.d.ts +29 -0
- package/dist/src/ui/components/ReloadIndicator.js +147 -0
- package/dist/src/ui/components/index.d.ts +11 -0
- package/dist/src/ui/components/index.js +13 -0
- package/dist/src/ui/index.d.ts +21 -0
- package/dist/src/ui/index.js +22 -0
- package/dist/src/ui/ui-loader.d.ts +49 -0
- package/dist/src/ui/ui-loader.js +83 -0
- package/dist/src/utils/Color.d.ts +48 -0
- package/dist/src/utils/Color.js +121 -0
- package/dist/src/utils/Delegate.d.ts +72 -0
- package/dist/src/utils/Delegate.js +102 -0
- package/dist/src/utils/DescriptionHelpers.d.ts +47 -0
- package/dist/src/utils/DescriptionHelpers.js +65 -0
- package/dist/src/utils/EditorClassMeta.d.ts +99 -0
- package/dist/src/utils/EditorClassMeta.js +2 -0
- package/dist/src/utils/GlobalAudioManager.d.ts +141 -0
- package/dist/src/utils/GlobalAudioManager.js +312 -0
- package/dist/src/utils/IAsyncLoadable.d.ts +94 -0
- package/dist/src/utils/IAsyncLoadable.js +52 -0
- package/dist/src/utils/MaterialHelpers.d.ts +67 -0
- package/dist/src/utils/MaterialHelpers.js +278 -0
- package/dist/src/utils/MathHelpers.d.ts +65 -0
- package/dist/src/utils/MathHelpers.js +60 -0
- package/dist/src/utils/NodeJs.d.ts +1 -0
- package/dist/src/utils/NodeJs.js +81 -0
- package/dist/src/utils/Perlin.d.ts +39 -0
- package/dist/src/utils/Perlin.js +380 -0
- package/dist/src/utils/ResourceManager.d.ts +183 -0
- package/dist/src/utils/ResourceManager.js +703 -0
- package/dist/src/utils/SceneGraphUtils.d.ts +26 -0
- package/dist/src/utils/SceneGraphUtils.js +139 -0
- package/dist/src/utils/Spawn.d.ts +27 -0
- package/dist/src/utils/Spawn.js +73 -0
- package/dist/src/utils/ThreeJsExtensions.d.ts +298 -0
- package/dist/src/utils/ThreeJsExtensions.js +817 -0
- package/dist/src/utils/TweenExtensions.d.ts +8 -0
- package/dist/src/utils/TweenExtensions.js +103 -0
- package/dist/src/utils/UserCodeEngine.d.ts +70 -0
- package/dist/src/utils/UserCodeEngine.js +235 -0
- package/dist/src/utils/Utils.d.ts +65 -0
- package/dist/src/utils/Utils.js +296 -0
- package/dist/src/utils/VRButtonUtils.d.ts +21 -0
- package/dist/src/utils/VRButtonUtils.js +88 -0
- package/dist/src/utils/browser-polyfills/module.d.ts +20 -0
- package/dist/src/utils/browser-polyfills/module.js +31 -0
- package/dist/src/utils/browser-polyfills/path.d.ts +69 -0
- package/dist/src/utils/browser-polyfills/path.js +188 -0
- package/dist/src/utils/index.d.ts +29 -0
- package/dist/src/utils/index.js +30 -0
- package/dist/src/utils/serialization/cdo.d.ts +6 -0
- package/dist/src/utils/serialization/cdo.js +74 -0
- package/dist/src/utils/serialization/clsAlias.d.ts +15 -0
- package/dist/src/utils/serialization/clsAlias.js +96 -0
- package/dist/src/utils/serialization/decorator.d.ts +132 -0
- package/dist/src/utils/serialization/decorator.js +66 -0
- package/dist/src/utils/serialization/index.d.ts +7 -0
- package/dist/src/utils/serialization/index.js +8 -0
- package/dist/src/utils/serialization/prefab.d.ts +9 -0
- package/dist/src/utils/serialization/prefab.js +55 -0
- package/dist/src/utils/serialization/prefabManager.d.ts +17 -0
- package/dist/src/utils/serialization/prefabManager.js +84 -0
- package/dist/src/utils/serialization/serializable.d.ts +23 -0
- package/dist/src/utils/serialization/serializable.js +2 -0
- package/dist/src/utils/serialization/serializer.d.ts +126 -0
- package/dist/src/utils/serialization/serializer.js +1032 -0
- package/dist/src/utils/serialization/specialization.d.ts +1 -0
- package/dist/src/utils/serialization/specialization.js +194 -0
- package/dist/src/utils/serialization/specializationUtils.d.ts +27 -0
- package/dist/src/utils/serialization/specializationUtils.js +137 -0
- package/dist/src/vfx/VFXComponent.d.ts +65 -0
- package/dist/src/vfx/VFXComponent.js +202 -0
- package/dist/src/vfx/index.d.ts +11 -0
- package/dist/src/vfx/index.js +11 -0
- package/dist/src/vfx/types.d.ts +146 -0
- package/dist/src/vfx/types.js +146 -0
- package/dist/src/world-commands/common.d.ts +23 -0
- package/dist/src/world-commands/common.js +2 -0
- package/dist/src/world-commands/generate-code.d.ts +3 -0
- package/dist/src/world-commands/generate-code.js +90 -0
- package/dist/src/world-commands/index.d.ts +19 -0
- package/dist/src/world-commands/index.js +20 -0
- package/dist/src/world-commands/place-gltf.d.ts +25 -0
- package/dist/src/world-commands/place-gltf.js +39 -0
- package/dist/src/world-commands/place-prefab.d.ts +25 -0
- package/dist/src/world-commands/place-prefab.js +40 -0
- package/dist/src/world-commands/place-primitive.d.ts +39 -0
- package/dist/src/world-commands/place-primitive.js +100 -0
- package/dist/src/world-commands/remove-actors.d.ts +23 -0
- package/dist/src/world-commands/remove-actors.js +9 -0
- package/dist/src/xr/VRActor.d.ts +46 -0
- package/dist/src/xr/VRActor.js +56 -0
- package/dist/src/xr/VRControllerHandler.d.ts +25 -0
- package/dist/src/xr/VRControllerHandler.js +74 -0
- package/dist/src/xr/VRControllerManager.d.ts +194 -0
- package/dist/src/xr/VRControllerManager.js +539 -0
- package/dist/src/xr/VRDeviceHandler.d.ts +47 -0
- package/dist/src/xr/VRDeviceHandler.js +61 -0
- package/dist/src/xr/VRHandHandler.d.ts +23 -0
- package/dist/src/xr/VRHandHandler.js +161 -0
- package/dist/src/xr/VRInputDevice.d.ts +100 -0
- package/dist/src/xr/VRInputDevice.js +367 -0
- package/dist/src/xr/VRPawn.d.ts +198 -0
- package/dist/src/xr/VRPawn.js +771 -0
- package/dist/src/xr/actor-components/CanvasUIComponent.d.ts +61 -0
- package/dist/src/xr/actor-components/CanvasUIComponent.js +418 -0
- package/dist/src/xr/actor-components/VRBaseComponent.d.ts +15 -0
- package/dist/src/xr/actor-components/VRBaseComponent.js +24 -0
- package/dist/src/xr/actor-components/VRGrabbableComponent.d.ts +31 -0
- package/dist/src/xr/actor-components/VRGrabbableComponent.js +81 -0
- package/dist/src/xr/actor-components/VRInteractableComponent.d.ts +19 -0
- package/dist/src/xr/actor-components/VRInteractableComponent.js +50 -0
- package/dist/src/xr/index.d.ts +17 -0
- package/dist/src/xr/index.js +18 -0
- package/dist/src/xr/pawn-components/VRGrabComponent.d.ts +36 -0
- package/dist/src/xr/pawn-components/VRGrabComponent.js +445 -0
- package/dist/src/xr/pawn-components/VRInteractComponent.d.ts +20 -0
- package/dist/src/xr/pawn-components/VRInteractComponent.js +81 -0
- package/dist/src/xr/pawn-components/VRSnapTurnComponent.d.ts +25 -0
- package/dist/src/xr/pawn-components/VRSnapTurnComponent.js +114 -0
- package/dist/src/xr/pawn-components/VRTeleportComponent.d.ts +42 -0
- package/dist/src/xr/pawn-components/VRTeleportComponent.js +318 -0
- package/dist/src/xr/ui/CanvasColorPicker.d.ts +33 -0
- package/dist/src/xr/ui/CanvasColorPicker.js +188 -0
- package/dist/src/xr/ui/CanvasKeyboard.d.ts +21 -0
- package/dist/src/xr/ui/CanvasKeyboard.js +281 -0
- package/dist/src/xr/ui/CanvasSlider.d.ts +21 -0
- package/dist/src/xr/ui/CanvasSlider.js +112 -0
- package/dist/src/xr/ui/CanvasUI.d.ts +129 -0
- package/dist/src/xr/ui/CanvasUI.js +876 -0
- package/dist/src/xr/ui/index.d.ts +8 -0
- package/dist/src/xr/ui/index.js +9 -0
- package/dist/test/absolute-transform.test.d.ts +1 -0
- package/dist/test/absolute-transform.test.js +796 -0
- package/dist/test/asset-path.test.d.ts +1 -0
- package/dist/test/asset-path.test.js +339 -0
- package/dist/test/component.test.d.ts +1 -0
- package/dist/test/component.test.js +24 -0
- package/dist/test/construction.test.d.ts +1 -0
- package/dist/test/construction.test.js +26 -0
- package/dist/test/default-options-validation.test.d.ts +1 -0
- package/dist/test/default-options-validation.test.js +186 -0
- package/dist/test/metadata.test.d.ts +1 -0
- package/dist/test/metadata.test.js +82 -0
- package/dist/test/nodeStorage.d.ts +19 -0
- package/dist/test/nodeStorage.js +85 -0
- package/dist/test/postprocess-manager.test.d.ts +1 -0
- package/dist/test/postprocess-manager.test.js +77 -0
- package/dist/test/prefab.test.d.ts +1 -0
- package/dist/test/prefab.test.js +903 -0
- package/dist/test/scene-component.test.d.ts +1 -0
- package/dist/test/scene-component.test.js +13 -0
- package/dist/test/scene-graph.test.d.ts +1 -0
- package/dist/test/scene-graph.test.js +163 -0
- package/dist/test/serialization-v1.test.d.ts +15 -0
- package/dist/test/serialization-v1.test.js +1057 -0
- package/dist/test/serialization.test.d.ts +1 -0
- package/dist/test/serialization.test.js +425 -0
- package/dist/test/spawn.test.d.ts +1 -0
- package/dist/test/spawn.test.js +137 -0
- package/dist/test/utils.d.ts +27 -0
- package/dist/test/utils.js +115 -0
- package/docs/agent-instructions.md +49 -0
- package/docs/deprecated/8-guide-user-interface-2.md +600 -0
- package/docs/deprecated/Agents.md +117 -0
- package/docs/deprecated/TELEGRAM_MINIAPP_SUPPORT_PLAN.md +283 -0
- package/docs/deprecated/summary-2.md +101 -0
- package/docs/engine-summary.md +104 -0
- package/docs/guides/0-world-and-gameloop.md +331 -0
- package/docs/guides/1-actors-and-components.md +955 -0
- package/docs/guides/10-camera-system.md +778 -0
- package/docs/guides/11-equipment-and-weapons.md +850 -0
- package/docs/guides/12-threejs-extensions.md +528 -0
- package/docs/guides/13-visual-effects-and-particles.md +530 -0
- package/docs/guides/14-sound-system.md +436 -0
- package/docs/guides/15-global-audio-manager.md +367 -0
- package/docs/guides/15-navigation-and-pathfinding.md +818 -0
- package/docs/guides/16-ragdoll-physics.md +479 -0
- package/docs/guides/17-asset-referencing.md +248 -0
- package/docs/guides/18-lightmapping-system.md +984 -0
- package/docs/guides/19-webxr-virtual-reality.md +367 -0
- package/docs/guides/2-player-inputs-and-controls.md +737 -0
- package/docs/guides/3-physics-and-collisions.md +248 -0
- package/docs/guides/4-visuals-and-rendering.md +946 -0
- package/docs/guides/5-animation.md +310 -0
- package/docs/guides/6-ai-and-behavior-trees.md +1316 -0
- package/docs/guides/7-building-levels.md +211 -0
- package/docs/guides/8-user-interface.md +291 -0
- package/docs/guides/9-multiplayer.md +181 -0
- package/docs/high-level-class-hierarchy.md +218 -0
- package/eslint-rules/constructor-type-consistency.js +251 -0
- package/eslint-rules/default-getter-return-type.js +42 -0
- package/eslint-rules/engine-class-name-consistency.js +62 -0
- package/eslint-rules/no-async-override-mismatch.js +100 -0
- package/eslint-rules/no-default-class-fields.js +66 -0
- package/eslint-rules/no-override-methods.js +158 -0
- package/games/animation-demo.ts +367 -0
- package/games/animation-retarget-demo.ts +553 -0
- package/games/behavior-tree-demo.ts +1774 -0
- package/games/character_animation.ts +194 -0
- package/games/collision-demo.ts +139 -0
- package/games/deprecated/advanced-grid-demo.ts +336 -0
- package/games/deprecated/airplane-demo.ts +156 -0
- package/games/deprecated/character-controller.ts +161 -0
- package/games/deprecated/chase-game.ts +310 -0
- package/games/deprecated/collision-config.ts +317 -0
- package/games/deprecated/door-demo.ts +641 -0
- package/games/deprecated/fps-demo.ts +128 -0
- package/games/deprecated/fps-shotgun-demo.ts +227 -0
- package/games/deprecated/index.ts +25 -0
- package/games/deprecated/lightmapping-demo.ts +1515 -0
- package/games/deprecated/lights-demo.ts +957 -0
- package/games/deprecated/matcap-demo.ts +823 -0
- package/games/deprecated/material-demo-2.ts +582 -0
- package/games/deprecated/material-demo.ts +204 -0
- package/games/deprecated/memory-leak-test.ts +23 -0
- package/games/deprecated/model-stress-test.ts +150 -0
- package/games/deprecated/multiplayer-demo.ts +392 -0
- package/games/deprecated/physics-demo.ts +199 -0
- package/games/deprecated/shadow-demo.ts +435 -0
- package/games/deprecated/shooting-demo.ts +352 -0
- package/games/deprecated/skybox-demo.ts +341 -0
- package/games/deprecated/sound-demo.ts +117 -0
- package/games/deprecated/timer-demo.ts +178 -0
- package/games/deprecated/voxel-demo.ts +50 -0
- package/games/deprecated/world-commands.ts +184 -0
- package/games/deprecated/world-loading.ts +90 -0
- package/games/examples/fps-advanced/const.ts +122 -0
- package/games/examples/fps-advanced/enemies.ts +174 -0
- package/games/examples/fps-advanced/game-mode.ts +347 -0
- package/games/examples/fps-advanced/game.ts +74 -0
- package/games/examples/fps-advanced/pickups.ts +225 -0
- package/games/examples/fps-advanced/player.ts +101 -0
- package/games/examples/fps-advanced/ui/endgame-ui.ts +277 -0
- package/games/examples/fps-advanced/ui/game-hud.ts +211 -0
- package/games/examples/fps-advanced/ui/menu-ui.ts +217 -0
- package/games/examples/fps-advanced/ui/weapon-hud.ts +254 -0
- package/games/examples/fps-advanced/weapons.ts +209 -0
- package/games/examples/index.ts +5 -0
- package/games/examples/plugin-demo/game.ts +175 -0
- package/games/examples/plugin-demo/plugins/dynamic-lighting.ts +146 -0
- package/games/examples/plugin-demo/plugins/instanced-forest.ts +186 -0
- package/games/examples/plugin-demo/plugins/particle-fountain.ts +63 -0
- package/games/examples/plugin-demo/plugins/physics-playground.ts +189 -0
- package/games/examples/plugin-demo/plugins/robot-follower.ts +306 -0
- package/games/examples/plugin-demo/plugins/scatter-models.ts +74 -0
- package/games/examples/plugin-demo/plugins/simple-cube.ts +44 -0
- package/games/examples/plugin-demo/plugins/tic-tac-toe.ts +522 -0
- package/games/examples/plugin-demo/plugins/wobbling-sphere.ts +66 -0
- package/games/examples/side-scroller-advanced/const.ts +88 -0
- package/games/examples/side-scroller-advanced/game-mode.ts +350 -0
- package/games/examples/side-scroller-advanced/game.ts +80 -0
- package/games/examples/side-scroller-advanced/level-generator.ts +384 -0
- package/games/examples/side-scroller-advanced/pickups.ts +132 -0
- package/games/examples/side-scroller-advanced/player.ts +105 -0
- package/games/examples/side-scroller-advanced/ui/endgame-ui.ts +278 -0
- package/games/examples/side-scroller-advanced/ui/game-hud.ts +238 -0
- package/games/examples/side-scroller-advanced/ui/menu-ui.ts +215 -0
- package/games/examples/vehicle/base-vehicle.ts +159 -0
- package/games/examples/vehicle/game.ts +154 -0
- package/games/examples/vehicle/mesh-vehicle.ts +191 -0
- package/games/examples/vehicle/player.ts +86 -0
- package/games/examples/vehicle/primitive-vehicle.ts +266 -0
- package/games/examples/vr-game/VRAttachableCube.ts +39 -0
- package/games/examples/vr-game/VRInteractableCylinder.ts +83 -0
- package/games/examples/vr-game/VRPressableButton.ts +113 -0
- package/games/examples/vr-game/VRProjectileActor.ts +69 -0
- package/games/examples/vr-game/VRRifleActor.ts +138 -0
- package/games/examples/vr-game/game.ts +69 -0
- package/games/examples/vr-game/index.ts +9 -0
- package/games/examples/vr-game/scene.ts +99 -0
- package/games/hand-tracking-demo.ts +71 -0
- package/games/index.ts +21 -0
- package/games/instanced-mesh-demo.ts +429 -0
- package/games/manifold-demo.ts +52 -0
- package/games/navigation-demo.ts +351 -0
- package/games/navmesh-primitives-demo.ts +1252 -0
- package/games/performance-test-demo.ts +237 -0
- package/games/postprocess-demo.ts +867 -0
- package/games/ragdoll-demo-simple.ts +163 -0
- package/games/ragdoll-demo.ts +272 -0
- package/games/swipe-tap-demo.ts +228 -0
- package/games/tween-demo.ts +125 -0
- package/games/ui-demo.ts +1058 -0
- package/games/vfx-demo.ts +922 -0
- package/games/vfx-wawa-demo.ts +540 -0
- package/games/vr-ui-demo-minimal.ts +156 -0
- package/games/vr-ui-demo.ts +972 -0
- package/package.json +104 -0
- package/scripts/build-browser-bundle.ts +75 -0
- package/scripts/check-asset-path.ts +166 -0
- package/scripts/dump-templates.ts +21 -0
- package/scripts/generate-dependencies.ts +145 -0
- package/scripts/generate-prefabs.ts +120 -0
- package/scripts/load-save-world.ts +44 -0
- package/scripts/loc.ts +112 -0
- package/scripts/optimize-glb-wrapper.ts +28 -0
- package/scripts/optimize-glb.ts +352 -0
- package/scripts/session-server.ts +861 -0
- package/scripts/test-world-loading.ts +23 -0
- package/src/actors/Actor.ts +1183 -0
- package/src/actors/GLTFMeshActor.ts +107 -0
- package/src/actors/GlobalParticleManager.ts +460 -0
- package/src/actors/Pawn.ts +370 -0
- package/src/actors/PlayerController.ts +646 -0
- package/src/actors/PlayerStart.ts +47 -0
- package/src/actors/Projectile.ts +179 -0
- package/src/actors/RagdollTestActor.ts +153 -0
- package/src/actors/ThirdPersonCharacterPawn.ts +139 -0
- package/src/actors/index.ts +21 -0
- package/src/animation/AnimationClipCache.ts +86 -0
- package/src/animation/AnimationRetargeting.ts +566 -0
- package/src/animation/SkeletonProfile.ts +137 -0
- package/src/animation/index.ts +14 -0
- package/src/animation/retargeting.ts +866 -0
- package/src/components/CharacterStatsComponent.ts +199 -0
- package/src/components/CollisionShapeComponent.ts +256 -0
- package/src/components/Component.ts +111 -0
- package/src/components/FollowComponent.ts +149 -0
- package/src/components/PrimitiveComponent.ts +368 -0
- package/src/components/ResetPositionComponent.ts +175 -0
- package/src/components/SceneComponent.ts +628 -0
- package/src/components/audio/SoundComponent.ts +385 -0
- package/src/components/audio/index.ts +11 -0
- package/src/components/csg/CSGCombiner.ts +268 -0
- package/src/components/csg/CSGShapes.ts +344 -0
- package/src/components/csg/index.ts +12 -0
- package/src/components/gameplay/BaseWeaponComponent.ts +597 -0
- package/src/components/gameplay/DoorComponent.ts +930 -0
- package/src/components/gameplay/Equipment.ts +30 -0
- package/src/components/gameplay/GenericEquipment.ts +96 -0
- package/src/components/gameplay/InstantHitWeaponComponent.ts +248 -0
- package/src/components/gameplay/PickupComponent.ts +473 -0
- package/src/components/gameplay/ProjectileWeaponComponent.ts +114 -0
- package/src/components/gameplay/ShotgunComponent.ts +220 -0
- package/src/components/gameplay/SwitchComponent.ts +466 -0
- package/src/components/gameplay/TriggerZoneComponent.ts +346 -0
- package/src/components/gameplay/index.ts +20 -0
- package/src/components/index.ts +19 -0
- package/src/components/lights/AmbientLightComponent.ts +72 -0
- package/src/components/lights/DirectionalLightComponent.ts +163 -0
- package/src/components/lights/HemisphereLightComponent.ts +132 -0
- package/src/components/lights/LightComponent.ts +351 -0
- package/src/components/lights/PointLightComponent.ts +115 -0
- package/src/components/lights/RectAreaLightComponent.ts +151 -0
- package/src/components/lights/SpotLightComponent.ts +193 -0
- package/src/components/lights/index.ts +17 -0
- package/src/components/movement/AerialMovementComponent.ts +348 -0
- package/src/components/movement/AirplaneMovementComponent.ts +236 -0
- package/src/components/movement/BasePawnMovementComponent.ts +297 -0
- package/src/components/movement/CharacterMovementComponent.ts +446 -0
- package/src/components/movement/DirectionalCharacterMovementComponent.ts +79 -0
- package/src/components/movement/NpcMovementComponent.ts +930 -0
- package/src/components/movement/PathMovementComponent.ts +190 -0
- package/src/components/movement/TopDownMovementComponent.ts +88 -0
- package/src/components/movement/TweenMovementComponent.ts +386 -0
- package/src/components/movement/VehicleMovementComponent.ts +469 -0
- package/src/components/movement/index.ts +19 -0
- package/src/components/physics/RagdollComponent.ts +730 -0
- package/src/components/visual/AnimationComponent.ts +208 -0
- package/src/components/visual/AnimationStateMachineComponent.ts +1079 -0
- package/src/components/visual/BaseInstancedMeshComponent.ts +904 -0
- package/src/components/visual/BillboardComponent.ts +127 -0
- package/src/components/visual/EditorOnlyMeshComponent.ts +54 -0
- package/src/components/visual/FogComponent.ts +131 -0
- package/src/components/visual/GLTFMeshComponent.ts +444 -0
- package/src/components/visual/InstancedGltfMeshComponent.ts +215 -0
- package/src/components/visual/InstancedMeshComponent.ts +118 -0
- package/src/components/visual/MeshComponent.ts +224 -0
- package/src/components/visual/ParticleEmitterComponent.ts +628 -0
- package/src/components/visual/SkyboxComponent.ts +381 -0
- package/src/components/visual/TerrainMeshComponent.ts +346 -0
- package/src/components/visual/UI3DComponent.ts +264 -0
- package/src/components/visual/index.ts +23 -0
- package/src/components/voxel/MagicaVoxelLoader.ts +184 -0
- package/src/components/voxel/VoxelMeshComponent.ts +274 -0
- package/src/components/voxel/index.ts +3 -0
- package/src/const.ts +68 -0
- package/src/csg/CSGUtils.ts +771 -0
- package/src/csg/ManifoldWrapper.ts +704 -0
- package/src/csg/index.ts +13 -0
- package/src/dependencies.ts +76 -0
- package/src/game/GameBuilder.ts +280 -0
- package/src/game/GameLoop.ts +614 -0
- package/src/game/GameMode.ts +127 -0
- package/src/game/Playable.ts +84 -0
- package/src/game/World.ts +1430 -0
- package/src/game/index.ts +18 -0
- package/src/global.d.ts +11 -0
- package/src/index.ts +39 -0
- package/src/materials.ts +181 -0
- package/src/multiplayer/MovementPrediction.ts +202 -0
- package/src/multiplayer/NetWorld.ts +920 -0
- package/src/multiplayer/README.md +349 -0
- package/src/multiplayer/implementations/MemorySession.ts +112 -0
- package/src/multiplayer/implementations/WebSocketSession.ts +468 -0
- package/src/multiplayer/implementations/index.ts +14 -0
- package/src/multiplayer/index.ts +16 -0
- package/src/multiplayer/interface.ts +174 -0
- package/src/navigation/NavigationServer.ts +170 -0
- package/src/navigation/RecastNavigationServer.ts +370 -0
- package/src/navigation/index.ts +17 -0
- package/src/npc/behavior-tree/BehaviorNode.ts +191 -0
- package/src/npc/behavior-tree/BehaviorTreeComponent.ts +351 -0
- package/src/npc/behavior-tree/behaviors/BehaviorAction.ts +97 -0
- package/src/npc/behavior-tree/behaviors/ConditionEvaluator.ts +128 -0
- package/src/npc/behavior-tree/behaviors/actions/aerial/AerialMoveToTargetAction.ts +128 -0
- package/src/npc/behavior-tree/behaviors/actions/aerial/AerialSearchAction.ts +159 -0
- package/src/npc/behavior-tree/behaviors/actions/aerial/AerialTrackTargetAction.ts +76 -0
- package/src/npc/behavior-tree/behaviors/actions/aerial/AerialWanderAction.ts +160 -0
- package/src/npc/behavior-tree/behaviors/actions/aerial/index.ts +5 -0
- package/src/npc/behavior-tree/behaviors/actions/combat/MeleeAttackAction.ts +151 -0
- package/src/npc/behavior-tree/behaviors/actions/combat/ShootAction.ts +158 -0
- package/src/npc/behavior-tree/behaviors/actions/combat/index.ts +3 -0
- package/src/npc/behavior-tree/behaviors/actions/ground/FleeFromTargetAction.ts +157 -0
- package/src/npc/behavior-tree/behaviors/actions/ground/FollowActorAction.ts +131 -0
- package/src/npc/behavior-tree/behaviors/actions/ground/MoveToPositionAction.ts +99 -0
- package/src/npc/behavior-tree/behaviors/actions/ground/SetNextWaypointAction.ts +114 -0
- package/src/npc/behavior-tree/behaviors/actions/ground/WanderAction.ts +146 -0
- package/src/npc/behavior-tree/behaviors/actions/ground/index.ts +6 -0
- package/src/npc/behavior-tree/behaviors/actions/index.ts +13 -0
- package/src/npc/behavior-tree/behaviors/actions/utility/CalculateTacticalPositionAction.ts +117 -0
- package/src/npc/behavior-tree/behaviors/actions/utility/LookAtTargetAction.ts +136 -0
- package/src/npc/behavior-tree/behaviors/actions/utility/WaitAction.ts +70 -0
- package/src/npc/behavior-tree/behaviors/actions/utility/index.ts +4 -0
- package/src/npc/behavior-tree/behaviors/conditions/BlackboardValueCondition.ts +144 -0
- package/src/npc/behavior-tree/behaviors/conditions/CanSeeTargetCondition.ts +171 -0
- package/src/npc/behavior-tree/behaviors/conditions/HasLastKnownPositionCondition.ts +63 -0
- package/src/npc/behavior-tree/behaviors/conditions/HpAbovePercentCondition.ts +83 -0
- package/src/npc/behavior-tree/behaviors/conditions/IsPlayerNearCondition.ts +49 -0
- package/src/npc/behavior-tree/behaviors/conditions/TargetBelowHpPercentCondition.ts +61 -0
- package/src/npc/behavior-tree/behaviors/conditions/TargetInConeCondition.ts +106 -0
- package/src/npc/behavior-tree/behaviors/conditions/TimeLimitCondition.ts +65 -0
- package/src/npc/behavior-tree/behaviors/conditions/index.ts +19 -0
- package/src/npc/behavior-tree/behaviors/index.ts +9 -0
- package/src/npc/behavior-tree/blackboard/Blackboard.ts +127 -0
- package/src/npc/behavior-tree/blackboard/BlackboardKey.ts +59 -0
- package/src/npc/behavior-tree/blackboard/index.ts +2 -0
- package/src/npc/behavior-tree/index.ts +27 -0
- package/src/npc/behavior-tree/loader/BehaviorTreeLoader.ts +296 -0
- package/src/npc/behavior-tree/nodes/CompositeNode.ts +100 -0
- package/src/npc/behavior-tree/nodes/LeafNode.ts +11 -0
- package/src/npc/behavior-tree/nodes/composite/SelectorNode.ts +56 -0
- package/src/npc/behavior-tree/nodes/composite/SequenceNode.ts +56 -0
- package/src/physics/BasePhysicsEngine.ts +1486 -0
- package/src/physics/IPhysicsVehicle.ts +162 -0
- package/src/physics/PhysicsEngine.ts +517 -0
- package/src/physics/PhysicsTypes.ts +116 -0
- package/src/physics/implementations/RapierDebugRender.ts +55 -0
- package/src/physics/implementations/RapierPhysics.ts +1419 -0
- package/src/physics/implementations/RapierVehicle.ts +267 -0
- package/src/physics/index.ts +16 -0
- package/src/render/EdgeOutlineEffect.ts +365 -0
- package/src/render/PostProcessManager.ts +1025 -0
- package/src/render/Renderer.ts +310 -0
- package/src/render/Texture.ts +140 -0
- package/src/render/index.ts +22 -0
- package/src/render/lightmapping/LightmapAtlas.ts +248 -0
- package/src/render/lightmapping/LightmapBaker.ts +333 -0
- package/src/render/lightmapping/LightmapManager.ts +752 -0
- package/src/render/lightmapping/LightmapMaterial.ts +283 -0
- package/src/render/lightmapping/LightmapSerialization.ts +336 -0
- package/src/render/lightmapping/LightmapSerializer.ts +309 -0
- package/src/render/lightmapping/MultiLightmapperMaterial.ts +484 -0
- package/src/render/lightmapping/index.ts +18 -0
- package/src/render/postprocessing/EffectPassWrapper.ts +47 -0
- package/src/render/postprocessing/ObjectOutlineEffect.ts +356 -0
- package/src/render/postprocessing/index.ts +2 -0
- package/src/runtime/GameRuntime.ts +153 -0
- package/src/runtime/InjectedDependencies.ts +70 -0
- package/src/runtime/Utils.ts +146 -0
- package/src/runtime/index.ts +4 -0
- package/src/runtime/materials/MatcapShaderMaterial.ts +242 -0
- package/src/runtime/materials/index.ts +1 -0
- package/src/scripting/Plugin.ts +67 -0
- package/src/scripting/PluginManager.ts +99 -0
- package/src/scripting/index.ts +1 -0
- package/src/storage/defaultStorageProvider.ts +95 -0
- package/src/storage/index.ts +16 -0
- package/src/storage/projectContext.ts +176 -0
- package/src/storage/storageProvider.ts +271 -0
- package/src/systems/ClassRegistry.ts +484 -0
- package/src/systems/ConsoleManager.ts +484 -0
- package/src/systems/ConsoleVariableHandler.ts +105 -0
- package/src/systems/ConsoleVariableManager.ts +288 -0
- package/src/systems/InputManager.ts +1255 -0
- package/src/systems/ObjectNamingSystem.ts +30 -0
- package/src/systems/Stats.ts +178 -0
- package/src/systems/TimerSystem.ts +353 -0
- package/src/systems/TweenManager.ts +107 -0
- package/src/systems/WorldSerialization.ts +1211 -0
- package/src/systems/collision/CollisionConfig.ts +281 -0
- package/src/systems/collision/CollisionTypes.ts +185 -0
- package/src/systems/collision/index.ts +15 -0
- package/src/systems/index.ts +23 -0
- package/src/templates/MyActor.ts +29 -0
- package/src/templates/MySceneComponent.ts +29 -0
- package/src/templates/README.md +1 -0
- package/src/types/rapier-es.d.ts +16 -0
- package/src/types/stats.js.d.ts +22 -0
- package/src/ui/LoadingScreen.ts +110 -0
- package/src/ui/UIElement.ts +224 -0
- package/src/ui/UILayout.ts +269 -0
- package/src/ui/UIManager.ts +161 -0
- package/src/ui/UIResource.ts +20 -0
- package/src/ui/components/AmmoCounter.ts +126 -0
- package/src/ui/components/BaseUIComponent.md +296 -0
- package/src/ui/components/BaseUIComponent.ts +390 -0
- package/src/ui/components/Compass.ts +144 -0
- package/src/ui/components/ControlsPanel.ts +62 -0
- package/src/ui/components/Crosshair.ts +76 -0
- package/src/ui/components/InventoryBar.ts +224 -0
- package/src/ui/components/InventoryGrid.ts +471 -0
- package/src/ui/components/Minimap.ts +181 -0
- package/src/ui/components/NumberDisplay.ts +198 -0
- package/src/ui/components/ProgressBar.ts +403 -0
- package/src/ui/components/ReloadIndicator.ts +159 -0
- package/src/ui/components/index.ts +12 -0
- package/src/ui/index.ts +21 -0
- package/src/ui/ui-loader.ts +87 -0
- package/src/utils/Color.ts +51 -0
- package/src/utils/Delegate.ts +112 -0
- package/src/utils/DescriptionHelpers.ts +93 -0
- package/src/utils/EditorClassMeta.ts +91 -0
- package/src/utils/GlobalAudioManager.ts +370 -0
- package/src/utils/IAsyncLoadable.ts +122 -0
- package/src/utils/MaterialHelpers.ts +321 -0
- package/src/utils/MathHelpers.ts +79 -0
- package/src/utils/NodeJs.ts +79 -0
- package/src/utils/Perlin.ts +346 -0
- package/src/utils/ResourceManager.ts +716 -0
- package/src/utils/SceneGraphUtils.ts +173 -0
- package/src/utils/Spawn.ts +93 -0
- package/src/utils/ThreeJsExtensions.ts +1200 -0
- package/src/utils/TweenExtensions.ts +124 -0
- package/src/utils/UserCodeEngine.ts +243 -0
- package/src/utils/Utils.ts +328 -0
- package/src/utils/VRButtonUtils.ts +125 -0
- package/src/utils/browser-polyfills/module.ts +36 -0
- package/src/utils/browser-polyfills/path.ts +232 -0
- package/src/utils/index.ts +29 -0
- package/src/utils/serialization/cdo.ts +87 -0
- package/src/utils/serialization/clsAlias.ts +92 -0
- package/src/utils/serialization/decorator.ts +176 -0
- package/src/utils/serialization/index.ts +7 -0
- package/src/utils/serialization/prefab.ts +78 -0
- package/src/utils/serialization/prefabManager.ts +88 -0
- package/src/utils/serialization/serializable.ts +28 -0
- package/src/utils/serialization/serializer.ts +1111 -0
- package/src/utils/serialization/specialization.ts +224 -0
- package/src/utils/serialization/specializationUtils.ts +185 -0
- package/src/vfx/VFXComponent.ts +206 -0
- package/src/vfx/index.ts +17 -0
- package/src/vfx/types.ts +287 -0
- package/src/vfx/wawa-vfx-reference.md +399 -0
- package/src/world-commands/common.ts +25 -0
- package/src/world-commands/generate-code.ts +99 -0
- package/src/world-commands/index.ts +19 -0
- package/src/world-commands/place-gltf.ts +63 -0
- package/src/world-commands/place-prefab.ts +62 -0
- package/src/world-commands/place-primitive.ts +128 -0
- package/src/world-commands/remove-actors.ts +32 -0
- package/src/xr/VRActor.ts +71 -0
- package/src/xr/VRControllerHandler.ts +87 -0
- package/src/xr/VRControllerManager.ts +559 -0
- package/src/xr/VRDeviceHandler.ts +77 -0
- package/src/xr/VRHandHandler.ts +166 -0
- package/src/xr/VRInputDevice.ts +374 -0
- package/src/xr/VRPawn.ts +815 -0
- package/src/xr/actor-components/CanvasUIComponent.ts +425 -0
- package/src/xr/actor-components/VRBaseComponent.ts +26 -0
- package/src/xr/actor-components/VRGrabbableComponent.ts +73 -0
- package/src/xr/actor-components/VRInteractableComponent.ts +43 -0
- package/src/xr/index.ts +17 -0
- package/src/xr/pawn-components/VRGrabComponent.ts +435 -0
- package/src/xr/pawn-components/VRInteractComponent.ts +77 -0
- package/src/xr/pawn-components/VRSnapTurnComponent.ts +103 -0
- package/src/xr/pawn-components/VRTeleportComponent.ts +284 -0
- package/src/xr/ui/CanvasColorPicker.ts +172 -0
- package/src/xr/ui/CanvasKeyboard.ts +283 -0
- package/src/xr/ui/CanvasSlider.ts +83 -0
- package/src/xr/ui/CanvasUI.ts +879 -0
- package/src/xr/ui/index.ts +9 -0
|
@@ -0,0 +1,1252 @@
|
|
|
1
|
+
import * as ENGINE from 'genesys.js';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
4
|
+
import * as SkeletonUtils from 'three/examples/jsm/utils/SkeletonUtils.js';
|
|
5
|
+
import { Pane } from 'tweakpane';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Navmesh Primitives Demo
|
|
9
|
+
*
|
|
10
|
+
* This demo showcases automatic navmesh generation using the built-in scene analysis system,
|
|
11
|
+
* including the new export/import functionality for external editor workflows:
|
|
12
|
+
*
|
|
13
|
+
* Features Demonstrated:
|
|
14
|
+
* - Setting up scenes with primitive MeshComponents (boxes, spheres, cylinders)
|
|
15
|
+
* - Setting up scenes with GLTF models from the asset library
|
|
16
|
+
* - **Automatic scene analysis**: NavMesh generation finds all static geometry automatically
|
|
17
|
+
* - Respects `excludeFromNavigation` flags on mesh components
|
|
18
|
+
* - Only includes actors with `PhysicsMotionType.Static` motion type
|
|
19
|
+
* - Debug visualization of the generated navmesh
|
|
20
|
+
* - Interactive Tweakpane UI for real-time navmesh parameter adjustment
|
|
21
|
+
* - Real-time navmesh regeneration with updated parameters
|
|
22
|
+
* - **Export current navmesh to binary file for external editors**
|
|
23
|
+
* - **Import navmesh from binary file (direct application without regeneration)**
|
|
24
|
+
* - **NEW: Scene export with explicit resource metadata (no more currentScenePath!)**
|
|
25
|
+
* - **NEW: External tool APIs for setting resource references in scenes**
|
|
26
|
+
*
|
|
27
|
+
* The demo creates two environments side by side:
|
|
28
|
+
* LEFT SIDE (Primitives): Ground plane, primitive obstacles, platforms, maze walls
|
|
29
|
+
* RIGHT SIDE (GLTF): Floor tiles, modular walls, trees, rocks, vehicles, structures
|
|
30
|
+
* - **Automatic scene analysis**: No manual mesh collection required!
|
|
31
|
+
* - Green debug visualization overlay showing walkable areas across both scenes
|
|
32
|
+
* - Tweakpane controls for adjusting all Recast Navigation parameters
|
|
33
|
+
* - Export/Import buttons for navmesh workflow testing
|
|
34
|
+
*
|
|
35
|
+
* Export/Import Workflow:
|
|
36
|
+
* 1. Generate a navmesh using the "Regenerate Navmesh" button (automatic scene analysis)
|
|
37
|
+
* 2. Export it to binary file using "Export NavMesh" button
|
|
38
|
+
* 3. Optionally modify the navmesh in an external editor
|
|
39
|
+
* 4. Import the modified navmesh using "Import NavMesh" button
|
|
40
|
+
* 5. The imported navmesh is applied directly without regeneration
|
|
41
|
+
*
|
|
42
|
+
* NEW Resource Metadata Workflow:
|
|
43
|
+
* 1. Use "Set NavMesh Reference in Scene" to configure resource path
|
|
44
|
+
* 2. Use "Export Scene with NavMesh Reference" to save scene with metadata
|
|
45
|
+
* 3. External tools can edit scenes to set resource references
|
|
46
|
+
* 4. Engine automatically loads resources from scene metadata
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
export class NavmeshPrimitivesDemo extends ENGINE.BaseGameLoop {
|
|
50
|
+
|
|
51
|
+
private pane!: Pane;
|
|
52
|
+
|
|
53
|
+
// Tweakpane controls and parameters - defined as static getter to be available during construction
|
|
54
|
+
private static get DEFAULT_NAVMESH_PARAMS(): {
|
|
55
|
+
cs: number;
|
|
56
|
+
ch: number;
|
|
57
|
+
walkableSlopeAngle: number;
|
|
58
|
+
walkableHeight: number;
|
|
59
|
+
walkableClimb: number;
|
|
60
|
+
walkableRadius: number;
|
|
61
|
+
maxEdgeLen: number;
|
|
62
|
+
maxSimplificationError: number;
|
|
63
|
+
minRegionArea: number;
|
|
64
|
+
mergeRegionArea: number;
|
|
65
|
+
maxVertsPerPoly: number;
|
|
66
|
+
detailSampleDist: number;
|
|
67
|
+
detailSampleMaxError: number;
|
|
68
|
+
borderSize: number;
|
|
69
|
+
debugEnabled: boolean;
|
|
70
|
+
sceneType: 'Primitives' | 'GLTF' | 'Both';
|
|
71
|
+
} {
|
|
72
|
+
return {
|
|
73
|
+
// Cell dimensions
|
|
74
|
+
cs: 0.2, // Cell size (XZ plane resolution)
|
|
75
|
+
ch: 0.2, // Cell height (Y axis resolution)
|
|
76
|
+
|
|
77
|
+
// Agent capabilities
|
|
78
|
+
walkableSlopeAngle: 35, // Maximum slope angle in degrees
|
|
79
|
+
walkableHeight: 2.0, // Minimum ceiling height for agent
|
|
80
|
+
walkableClimb: 0.5, // Maximum step height agent can climb
|
|
81
|
+
walkableRadius: 0.5, // Agent radius (affects corridor width)
|
|
82
|
+
|
|
83
|
+
// Mesh generation quality
|
|
84
|
+
maxEdgeLen: 12, // Maximum edge length in world units
|
|
85
|
+
maxSimplificationError: 1.3, // Edge simplification tolerance
|
|
86
|
+
|
|
87
|
+
// Region processing
|
|
88
|
+
minRegionArea: 8, // Minimum area for isolated regions
|
|
89
|
+
mergeRegionArea: 20, // Merge regions smaller than this
|
|
90
|
+
|
|
91
|
+
// Polygon generation
|
|
92
|
+
maxVertsPerPoly: 6, // Maximum vertices per polygon
|
|
93
|
+
|
|
94
|
+
// Detail mesh (for height sampling)
|
|
95
|
+
detailSampleDist: 6, // Detail mesh sample distance
|
|
96
|
+
detailSampleMaxError: 1, // Maximum detail mesh error
|
|
97
|
+
|
|
98
|
+
// Border handling
|
|
99
|
+
borderSize: 0, // Border size around the mesh
|
|
100
|
+
|
|
101
|
+
// Debug visualization
|
|
102
|
+
debugEnabled: true, // Show navmesh debug visualization
|
|
103
|
+
|
|
104
|
+
// Scene control
|
|
105
|
+
sceneType: 'Both' as 'Primitives' | 'GLTF' | 'Both' // Which scene types to show
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
private navmeshParams = { ...NavmeshPrimitivesDemo.DEFAULT_NAVMESH_PARAMS };
|
|
110
|
+
|
|
111
|
+
constructor(container: HTMLElement, options?: ENGINE.BaseGameLoopOptions) {
|
|
112
|
+
super(container, options);
|
|
113
|
+
this.setupCamera(container);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Configure the world with navigation server enabled
|
|
118
|
+
*/
|
|
119
|
+
public override getWorldConfiguration(): ENGINE.WorldOptions {
|
|
120
|
+
// Use static defaults during construction when instance fields aren't ready yet
|
|
121
|
+
const params = NavmeshPrimitivesDemo.DEFAULT_NAVMESH_PARAMS;
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
...super.getWorldConfiguration(),
|
|
125
|
+
navigationOptions: {
|
|
126
|
+
engine: ENGINE.NavigationEngine.RecastNavigation,
|
|
127
|
+
debug: params.debugEnabled,
|
|
128
|
+
generateOnStartUp: false, // Manual generation after adding meshes
|
|
129
|
+
options: {
|
|
130
|
+
...ENGINE.RecastNavigationServer.DEFAULT_OPTIONS,
|
|
131
|
+
cs: params.cs,
|
|
132
|
+
ch: params.ch,
|
|
133
|
+
walkableSlopeAngle: params.walkableSlopeAngle,
|
|
134
|
+
walkableHeight: params.walkableHeight,
|
|
135
|
+
walkableClimb: params.walkableClimb,
|
|
136
|
+
walkableRadius: params.walkableRadius,
|
|
137
|
+
maxEdgeLen: params.maxEdgeLen,
|
|
138
|
+
maxSimplificationError: params.maxSimplificationError,
|
|
139
|
+
minRegionArea: params.minRegionArea,
|
|
140
|
+
mergeRegionArea: params.mergeRegionArea,
|
|
141
|
+
maxVertsPerPoly: params.maxVertsPerPoly,
|
|
142
|
+
detailSampleDist: params.detailSampleDist,
|
|
143
|
+
detailSampleMaxError: params.detailSampleMaxError,
|
|
144
|
+
borderSize: params.borderSize
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
protected override async preStart(): Promise<void> {
|
|
151
|
+
// Set up basic lighting
|
|
152
|
+
this.setupLighting();
|
|
153
|
+
|
|
154
|
+
// Create scenes based on current settings
|
|
155
|
+
this.createActiveScenes();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
protected override postStart(): void {
|
|
159
|
+
// // Generate navmesh after all geometry is in place
|
|
160
|
+
// await this.generateNavmesh();
|
|
161
|
+
|
|
162
|
+
// Create Tweakpane UI controls
|
|
163
|
+
this.createTweakPane();
|
|
164
|
+
|
|
165
|
+
// Log information about the new export/import functionality
|
|
166
|
+
console.log('🚀 NavMesh Export/Import Demo Ready!');
|
|
167
|
+
console.log('📝 Use Export/Import controls to save/load navmesh as GLTF files');
|
|
168
|
+
console.log('🆕 NEW: Scene export with resource metadata system!');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Create all scenes and set initial visibility based on scene type setting
|
|
174
|
+
*/
|
|
175
|
+
private createActiveScenes(): void {
|
|
176
|
+
// Always create both scenes so we can toggle between them
|
|
177
|
+
this.createScene();
|
|
178
|
+
this.createGLTFScene();
|
|
179
|
+
|
|
180
|
+
// Set initial visibility based on current scene type
|
|
181
|
+
this.updateSceneVisibility();
|
|
182
|
+
|
|
183
|
+
console.log(`Created all scenes, showing: ${this.navmeshParams.sceneType}`);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Update scene visibility based on current scene type setting
|
|
188
|
+
*/
|
|
189
|
+
private updateSceneVisibility(): void {
|
|
190
|
+
const sceneType = this.navmeshParams.sceneType;
|
|
191
|
+
|
|
192
|
+
// Get all actors in the world
|
|
193
|
+
const allActors = this.world.getActorsByPredicate(() => true);
|
|
194
|
+
|
|
195
|
+
allActors.forEach(actor => {
|
|
196
|
+
// Determine if this is a primitive or GLTF actor based on components
|
|
197
|
+
const hasMeshComponent = actor.getComponent(ENGINE.MeshComponent) !== null;
|
|
198
|
+
const hasGLTFComponent = actor.getComponent(ENGINE.GLTFMeshComponent) !== null;
|
|
199
|
+
|
|
200
|
+
// Skip lighting actors
|
|
201
|
+
if (actor.name.includes('Light') || actor.name.includes('light')) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
let shouldBeVisible = false;
|
|
206
|
+
|
|
207
|
+
if (hasMeshComponent && !hasGLTFComponent) {
|
|
208
|
+
// This is a primitive actor
|
|
209
|
+
shouldBeVisible = sceneType === 'Primitives' || sceneType === 'Both';
|
|
210
|
+
} else if (hasGLTFComponent) {
|
|
211
|
+
// This is a GLTF actor
|
|
212
|
+
shouldBeVisible = sceneType === 'GLTF' || sceneType === 'Both';
|
|
213
|
+
} else {
|
|
214
|
+
// Keep other actors visible (like lighting)
|
|
215
|
+
shouldBeVisible = true;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Update visibility
|
|
219
|
+
actor.rootComponent.visible = shouldBeVisible;
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
console.log(`Updated scene visibility: ${sceneType}`);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Set up basic lighting for the scene
|
|
227
|
+
*/
|
|
228
|
+
private setupLighting(): void {
|
|
229
|
+
console.log('Setting up lighting...');
|
|
230
|
+
|
|
231
|
+
// Ambient light for overall illumination
|
|
232
|
+
const ambientLight = new ENGINE.Actor({
|
|
233
|
+
name: 'AmbientLight',
|
|
234
|
+
sceneComponents: [
|
|
235
|
+
new ENGINE.AmbientLightComponent({
|
|
236
|
+
color: 0x404080,
|
|
237
|
+
intensity: 0.4
|
|
238
|
+
})
|
|
239
|
+
]
|
|
240
|
+
});
|
|
241
|
+
this.world.addActors(ambientLight);
|
|
242
|
+
|
|
243
|
+
// Directional light as main light source with shadows
|
|
244
|
+
const directionalLight = new ENGINE.Actor({
|
|
245
|
+
name: 'DirectionalLight',
|
|
246
|
+
position: new THREE.Vector3(10, 20, 10),
|
|
247
|
+
sceneComponents: [
|
|
248
|
+
new ENGINE.DirectionalLightComponent({
|
|
249
|
+
color: 0xffffff,
|
|
250
|
+
intensity: 1.5,
|
|
251
|
+
castShadow: true
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
});
|
|
255
|
+
this.world.addActors(directionalLight);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Create the scene with various primitive MeshComponents
|
|
260
|
+
*/
|
|
261
|
+
private createScene(): void {
|
|
262
|
+
console.log('Creating scene with primitive meshes...');
|
|
263
|
+
|
|
264
|
+
// Create ground plane
|
|
265
|
+
this.createGroundPlane();
|
|
266
|
+
|
|
267
|
+
// Create various obstacles and platforms
|
|
268
|
+
this.createObstacles();
|
|
269
|
+
|
|
270
|
+
// Create platforms at different heights
|
|
271
|
+
this.createPlatforms();
|
|
272
|
+
|
|
273
|
+
// Create a maze-like structure
|
|
274
|
+
this.createMazeWalls();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Create the main ground plane
|
|
279
|
+
*/
|
|
280
|
+
private createGroundPlane(): void {
|
|
281
|
+
const ground = new ENGINE.Actor({
|
|
282
|
+
name: 'Ground',
|
|
283
|
+
position: new THREE.Vector3(0, 0, 0),
|
|
284
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
285
|
+
geometry: new THREE.BoxGeometry(40, 0.2, 40),
|
|
286
|
+
material: new THREE.MeshStandardMaterial({
|
|
287
|
+
color: 0x8B7355, // Brown ground color
|
|
288
|
+
roughness: 0.8,
|
|
289
|
+
metalness: 0.1
|
|
290
|
+
})
|
|
291
|
+
})
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
// Enable shadows
|
|
295
|
+
const meshComponent = ground.rootComponent as ENGINE.MeshComponent;
|
|
296
|
+
meshComponent.receiveShadow = true;
|
|
297
|
+
|
|
298
|
+
this.world.addActors(ground);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Create various obstacles using different primitive shapes
|
|
303
|
+
*/
|
|
304
|
+
private createObstacles(): void {
|
|
305
|
+
// Box obstacles
|
|
306
|
+
const boxObstacle1 = new ENGINE.Actor({
|
|
307
|
+
name: 'BoxObstacle1',
|
|
308
|
+
position: new THREE.Vector3(5, 1, 5),
|
|
309
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
310
|
+
geometry: new THREE.BoxGeometry(2, 2, 2),
|
|
311
|
+
material: new THREE.MeshStandardMaterial({
|
|
312
|
+
color: 0xFF6B6B, // Red
|
|
313
|
+
roughness: 0.7,
|
|
314
|
+
metalness: 0.2
|
|
315
|
+
})
|
|
316
|
+
})
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
const boxObstacle2 = new ENGINE.Actor({
|
|
320
|
+
name: 'BoxObstacle2',
|
|
321
|
+
position: new THREE.Vector3(-8, 1.5, -3),
|
|
322
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
323
|
+
geometry: new THREE.BoxGeometry(3, 3, 1.5),
|
|
324
|
+
material: new THREE.MeshStandardMaterial({
|
|
325
|
+
color: 0x4ECDC4, // Teal
|
|
326
|
+
roughness: 0.6,
|
|
327
|
+
metalness: 0.3
|
|
328
|
+
})
|
|
329
|
+
})
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// Cylinder obstacles
|
|
333
|
+
const cylinderObstacle1 = new ENGINE.Actor({
|
|
334
|
+
name: 'CylinderObstacle1',
|
|
335
|
+
position: new THREE.Vector3(-5, 1, 8),
|
|
336
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
337
|
+
geometry: new THREE.CylinderGeometry(1.5, 1.5, 2, 8),
|
|
338
|
+
material: new THREE.MeshStandardMaterial({
|
|
339
|
+
color: 0x45B7D1, // Blue
|
|
340
|
+
roughness: 0.5,
|
|
341
|
+
metalness: 0.4
|
|
342
|
+
})
|
|
343
|
+
})
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
const cylinderObstacle2 = new ENGINE.Actor({
|
|
347
|
+
name: 'CylinderObstacle2',
|
|
348
|
+
position: new THREE.Vector3(10, 0.75, -8),
|
|
349
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
350
|
+
geometry: new THREE.CylinderGeometry(1, 1, 1.5, 6),
|
|
351
|
+
material: new THREE.MeshStandardMaterial({
|
|
352
|
+
color: 0x96CEB4, // Green
|
|
353
|
+
roughness: 0.8,
|
|
354
|
+
metalness: 0.1
|
|
355
|
+
})
|
|
356
|
+
})
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
// Sphere obstacles
|
|
360
|
+
const sphereObstacle = new ENGINE.Actor({
|
|
361
|
+
name: 'SphereObstacle',
|
|
362
|
+
position: new THREE.Vector3(0, 1.2, -12),
|
|
363
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
364
|
+
geometry: new THREE.SphereGeometry(1.2, 16, 12),
|
|
365
|
+
material: new THREE.MeshStandardMaterial({
|
|
366
|
+
color: 0xFECA57, // Yellow
|
|
367
|
+
roughness: 0.4,
|
|
368
|
+
metalness: 0.6
|
|
369
|
+
})
|
|
370
|
+
})
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// Enable shadows for all obstacles
|
|
374
|
+
const obstacles = [boxObstacle1, boxObstacle2, cylinderObstacle1, cylinderObstacle2, sphereObstacle];
|
|
375
|
+
obstacles.forEach(obstacle => {
|
|
376
|
+
const meshComponent = obstacle.rootComponent as ENGINE.MeshComponent;
|
|
377
|
+
meshComponent.castShadow = true;
|
|
378
|
+
meshComponent.receiveShadow = true;
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
this.world.addActors(...obstacles);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Create elevated platforms using box geometry
|
|
386
|
+
*/
|
|
387
|
+
private createPlatforms(): void {
|
|
388
|
+
// Platform 1 - Low platform
|
|
389
|
+
const platform1 = new ENGINE.Actor({
|
|
390
|
+
name: 'Platform1',
|
|
391
|
+
position: new THREE.Vector3(12, 1, 12),
|
|
392
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
393
|
+
geometry: new THREE.BoxGeometry(6, 2, 6),
|
|
394
|
+
material: new THREE.MeshStandardMaterial({
|
|
395
|
+
color: 0x686DE0, // Purple
|
|
396
|
+
roughness: 0.7,
|
|
397
|
+
metalness: 0.2
|
|
398
|
+
})
|
|
399
|
+
})
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
// Platform 2 - Medium platform
|
|
403
|
+
const platform2 = new ENGINE.Actor({
|
|
404
|
+
name: 'Platform2',
|
|
405
|
+
position: new THREE.Vector3(-12, 2, 12),
|
|
406
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
407
|
+
geometry: new THREE.BoxGeometry(5, 4, 5),
|
|
408
|
+
material: new THREE.MeshStandardMaterial({
|
|
409
|
+
color: 0xF8B500, // Orange
|
|
410
|
+
roughness: 0.6,
|
|
411
|
+
metalness: 0.3
|
|
412
|
+
})
|
|
413
|
+
})
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
// Platform 3 - High platform with ramp
|
|
417
|
+
const platform3 = new ENGINE.Actor({
|
|
418
|
+
name: 'Platform3',
|
|
419
|
+
position: new THREE.Vector3(-12, 3, -12),
|
|
420
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
421
|
+
geometry: new THREE.BoxGeometry(4, 6, 4),
|
|
422
|
+
material: new THREE.MeshStandardMaterial({
|
|
423
|
+
color: 0xE17055, // Dark orange
|
|
424
|
+
roughness: 0.8,
|
|
425
|
+
metalness: 0.1
|
|
426
|
+
})
|
|
427
|
+
})
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
// Ramp to platform 3
|
|
431
|
+
const ramp = new ENGINE.Actor({
|
|
432
|
+
name: 'Ramp',
|
|
433
|
+
position: new THREE.Vector3(-8, 1.5, -12),
|
|
434
|
+
rotation: new THREE.Euler(0, 0, Math.PI / 12), // Slight slope
|
|
435
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
436
|
+
geometry: new THREE.BoxGeometry(4, 0.5, 4),
|
|
437
|
+
material: new THREE.MeshStandardMaterial({
|
|
438
|
+
color: 0xA29BFE, // Light purple
|
|
439
|
+
roughness: 0.7,
|
|
440
|
+
metalness: 0.2
|
|
441
|
+
})
|
|
442
|
+
})
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
// Enable shadows for platforms
|
|
446
|
+
const platforms = [platform1, platform2, platform3, ramp];
|
|
447
|
+
platforms.forEach(platform => {
|
|
448
|
+
const meshComponent = platform.rootComponent as ENGINE.MeshComponent;
|
|
449
|
+
meshComponent.castShadow = true;
|
|
450
|
+
meshComponent.receiveShadow = true;
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
this.world.addActors(...platforms);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Create a simple maze-like structure using box walls
|
|
458
|
+
*/
|
|
459
|
+
private createMazeWalls(): void {
|
|
460
|
+
const walls: ENGINE.Actor[] = [];
|
|
461
|
+
|
|
462
|
+
// Create a series of wall segments to form a mini maze
|
|
463
|
+
const wallConfigs = [
|
|
464
|
+
{ pos: [15, 1, 0], size: [1, 2, 8] }, // Vertical wall 1
|
|
465
|
+
{ pos: [8, 1, -5], size: [6, 2, 1] }, // Horizontal wall 1
|
|
466
|
+
{ pos: [2, 1, -8], size: [1, 2, 6] }, // Vertical wall 2
|
|
467
|
+
{ pos: [-2, 1, -5], size: [4, 2, 1] }, // Horizontal wall 2
|
|
468
|
+
{ pos: [-8, 1, 0], size: [1, 2, 6] }, // Vertical wall 3
|
|
469
|
+
{ pos: [-12, 1, 3], size: [6, 2, 1] }, // Horizontal wall 3
|
|
470
|
+
];
|
|
471
|
+
|
|
472
|
+
wallConfigs.forEach((config, index) => {
|
|
473
|
+
const wall = new ENGINE.Actor({
|
|
474
|
+
name: `MazeWall${index + 1}`,
|
|
475
|
+
position: new THREE.Vector3(config.pos[0], config.pos[1], config.pos[2]),
|
|
476
|
+
rootComponent: new ENGINE.MeshComponent({
|
|
477
|
+
geometry: new THREE.BoxGeometry(config.size[0], config.size[1], config.size[2]),
|
|
478
|
+
material: new THREE.MeshStandardMaterial({
|
|
479
|
+
color: 0x74B9FF, // Light blue
|
|
480
|
+
roughness: 0.8,
|
|
481
|
+
metalness: 0.2
|
|
482
|
+
})
|
|
483
|
+
})
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
const meshComponent = wall.rootComponent as ENGINE.MeshComponent;
|
|
487
|
+
meshComponent.castShadow = true;
|
|
488
|
+
meshComponent.receiveShadow = true;
|
|
489
|
+
|
|
490
|
+
walls.push(wall);
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
this.world.addActors(...walls);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Create a scene using GLTF models for navmesh testing
|
|
498
|
+
*/
|
|
499
|
+
private createGLTFScene(): void {
|
|
500
|
+
console.log('Creating GLTF scene for navmesh testing...');
|
|
501
|
+
|
|
502
|
+
// Create a base ground using sandbox floor assets
|
|
503
|
+
this.createGLTFGround();
|
|
504
|
+
|
|
505
|
+
// Create walls and structures
|
|
506
|
+
this.createGLTFStructures();
|
|
507
|
+
|
|
508
|
+
// Add decorative elements and obstacles
|
|
509
|
+
this.createGLTFDecorations();
|
|
510
|
+
|
|
511
|
+
// Add some buildings/larger structures
|
|
512
|
+
this.createGLTFBuildings();
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Create ground/floor using GLTF tiles
|
|
517
|
+
*/
|
|
518
|
+
private createGLTFGround(): void {
|
|
519
|
+
// Create a grid of floor tiles
|
|
520
|
+
const floorSize = 4; // Assuming each floor tile is about 4x4 units
|
|
521
|
+
const gridSize = 6; // 6x6 grid of tiles
|
|
522
|
+
for (let x = 0; x < gridSize; x++) {
|
|
523
|
+
for (let z = 0; z < gridSize; z++) {
|
|
524
|
+
const floor = new ENGINE.Actor({
|
|
525
|
+
name: `GLTFFloor_${x}_${z}`,
|
|
526
|
+
position: new THREE.Vector3(
|
|
527
|
+
(x - gridSize/2) * floorSize + 30, // Offset to the right of primitive scene
|
|
528
|
+
0,
|
|
529
|
+
(z - gridSize/2) * floorSize
|
|
530
|
+
),
|
|
531
|
+
rootComponent: new ENGINE.GLTFMeshComponent({
|
|
532
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Floors/SM_SB_Floor_01.glb',
|
|
533
|
+
physicsOptions: {
|
|
534
|
+
enabled: true,
|
|
535
|
+
motionType: ENGINE.PhysicsMotionType.Static
|
|
536
|
+
}
|
|
537
|
+
})
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
this.world.addActors(floor);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Create walls and structural elements
|
|
547
|
+
*/
|
|
548
|
+
private createGLTFStructures(): void {
|
|
549
|
+
const structures = [
|
|
550
|
+
// Main walls creating rooms
|
|
551
|
+
{
|
|
552
|
+
name: 'WallNorth1',
|
|
553
|
+
position: new THREE.Vector3(25, 0, -10),
|
|
554
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_Wall_L_01_128x96.glb'
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
name: 'WallNorth2',
|
|
558
|
+
position: new THREE.Vector3(35, 0, -10),
|
|
559
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_Wall_L_02_128x96.glb'
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: 'WallEast1',
|
|
563
|
+
position: new THREE.Vector3(40, 0, -5),
|
|
564
|
+
rotation: new THREE.Euler(0, Math.PI/2, 0),
|
|
565
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_Wall_L_01B_128x96.glb'
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: 'WallEast2',
|
|
569
|
+
position: new THREE.Vector3(40, 0, 5),
|
|
570
|
+
rotation: new THREE.Euler(0, Math.PI/2, 0),
|
|
571
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_Wall_L_03_128x96.glb'
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: 'WallSouth1',
|
|
575
|
+
position: new THREE.Vector3(35, 0, 10),
|
|
576
|
+
rotation: new THREE.Euler(0, Math.PI, 0),
|
|
577
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_Aztec_Wall_01.glb'
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
name: 'WallSouth2',
|
|
581
|
+
position: new THREE.Vector3(25, 0, 10),
|
|
582
|
+
rotation: new THREE.Euler(0, Math.PI, 0),
|
|
583
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_Aztec_Wall_02.glb'
|
|
584
|
+
},
|
|
585
|
+
// Interior walls creating obstacles
|
|
586
|
+
{
|
|
587
|
+
name: 'InteriorWall1',
|
|
588
|
+
position: new THREE.Vector3(30, 0, 0),
|
|
589
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_BrickBlock01.glb'
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
name: 'InteriorWall2',
|
|
593
|
+
position: new THREE.Vector3(27, 0, -5),
|
|
594
|
+
rotation: new THREE.Euler(0, Math.PI/4, 0),
|
|
595
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Walls/SM_SB_BrickBlock02.glb'
|
|
596
|
+
}
|
|
597
|
+
];
|
|
598
|
+
|
|
599
|
+
structures.forEach(structure => {
|
|
600
|
+
const wall = new ENGINE.Actor({
|
|
601
|
+
name: structure.name,
|
|
602
|
+
position: structure.position,
|
|
603
|
+
rotation: structure.rotation ?? new THREE.Euler(0, 0, 0),
|
|
604
|
+
rootComponent: new ENGINE.GLTFMeshComponent({
|
|
605
|
+
modelUrl: structure.modelUrl,
|
|
606
|
+
physicsOptions: {
|
|
607
|
+
enabled: true,
|
|
608
|
+
motionType: ENGINE.PhysicsMotionType.Static
|
|
609
|
+
}
|
|
610
|
+
})
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
this.world.addActors(wall);
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Add decorative elements and obstacles
|
|
619
|
+
*/
|
|
620
|
+
private createGLTFDecorations(): void {
|
|
621
|
+
const decorations = [
|
|
622
|
+
// Trees for natural obstacles
|
|
623
|
+
{
|
|
624
|
+
name: 'Tree1',
|
|
625
|
+
position: new THREE.Vector3(32, 0, -7),
|
|
626
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Trees/SM_SB_CaribbeanPine_01.glb'
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
name: 'Tree2',
|
|
630
|
+
position: new THREE.Vector3(38, 0, 3),
|
|
631
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Trees/SM_SB_CoconutTree01.glb'
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
name: 'Tree3',
|
|
635
|
+
position: new THREE.Vector3(22, 0, 7),
|
|
636
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Trees/SM_SB_QueenPalm_01.glb'
|
|
637
|
+
},
|
|
638
|
+
// Rocks as obstacles
|
|
639
|
+
{
|
|
640
|
+
name: 'Rock1',
|
|
641
|
+
position: new THREE.Vector3(28, 0, 2),
|
|
642
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Rocks/SM_SB_Rock01.glb'
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
name: 'Rock2',
|
|
646
|
+
position: new THREE.Vector3(34, 0, -3),
|
|
647
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Rocks/SM_SB_Rock02.glb'
|
|
648
|
+
},
|
|
649
|
+
// Foliage for detail
|
|
650
|
+
{
|
|
651
|
+
name: 'Plant1',
|
|
652
|
+
position: new THREE.Vector3(26, 0, -2),
|
|
653
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Foliage/SM_SB_Plant01.glb'
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
name: 'Fern1',
|
|
657
|
+
position: new THREE.Vector3(37, 0, -1),
|
|
658
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Foliage/SM_SB_Fern01.glb'
|
|
659
|
+
},
|
|
660
|
+
// Game items as interesting obstacles
|
|
661
|
+
{
|
|
662
|
+
name: 'MovingPlatform',
|
|
663
|
+
position: new THREE.Vector3(29, 0, 5),
|
|
664
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Game Items/SM_SB_MovingPlatform_01.glb'
|
|
665
|
+
}
|
|
666
|
+
];
|
|
667
|
+
|
|
668
|
+
decorations.forEach(decoration => {
|
|
669
|
+
const actor = new ENGINE.Actor({
|
|
670
|
+
name: decoration.name,
|
|
671
|
+
position: decoration.position,
|
|
672
|
+
rootComponent: new ENGINE.GLTFMeshComponent({
|
|
673
|
+
modelUrl: decoration.modelUrl,
|
|
674
|
+
physicsOptions: {
|
|
675
|
+
enabled: true,
|
|
676
|
+
motionType: ENGINE.PhysicsMotionType.Static
|
|
677
|
+
}
|
|
678
|
+
})
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
this.world.addActors(actor);
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Add some larger structures and vehicles
|
|
687
|
+
*/
|
|
688
|
+
private createGLTFBuildings(): void {
|
|
689
|
+
const structures = [
|
|
690
|
+
// Large floor pieces as elevated platforms
|
|
691
|
+
{
|
|
692
|
+
position: new THREE.Vector3(45, 2, -8),
|
|
693
|
+
modelUrl: '@engine/assets/dev/models/Architecture/SM_Floor_400x400.glb'
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
position: new THREE.Vector3(45, 1, 0),
|
|
697
|
+
modelUrl: '@engine/assets/dev/models/Architecture/SM_Floor_300x300.glb'
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
position: new THREE.Vector3(45, 1.5, 8),
|
|
701
|
+
modelUrl: '@engine/assets/dev/models/Architecture/SM_Floor_200x400.glb'
|
|
702
|
+
},
|
|
703
|
+
// Add a vehicle as an obstacle
|
|
704
|
+
{
|
|
705
|
+
name: 'Car1',
|
|
706
|
+
position: new THREE.Vector3(20, 0, 0),
|
|
707
|
+
rotation: new THREE.Euler(0, Math.PI/4, 0),
|
|
708
|
+
modelUrl: '@engine/assets/dev/models/Vehicles/SM_Car01.glb'
|
|
709
|
+
},
|
|
710
|
+
// Add some larger decorative items
|
|
711
|
+
{
|
|
712
|
+
name: 'Slide1',
|
|
713
|
+
position: new THREE.Vector3(24, 0, 4),
|
|
714
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Slides/SM_SB_Slide_Module.glb'
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: 'Bridge1',
|
|
718
|
+
position: new THREE.Vector3(33, 1, -8),
|
|
719
|
+
modelUrl: '@engine/assets/dev/models/SandboxAsset/Game Items/SM_SB_HangingBridgeMiddle.glb'
|
|
720
|
+
}
|
|
721
|
+
];
|
|
722
|
+
|
|
723
|
+
structures.forEach(structure => {
|
|
724
|
+
const actor = new ENGINE.Actor({
|
|
725
|
+
name: structure.name,
|
|
726
|
+
position: structure.position,
|
|
727
|
+
rotation: structure.rotation ?? new THREE.Euler(0, 0, 0),
|
|
728
|
+
rootComponent: new ENGINE.GLTFMeshComponent({
|
|
729
|
+
modelUrl: structure.modelUrl,
|
|
730
|
+
physicsOptions: {
|
|
731
|
+
enabled: true,
|
|
732
|
+
motionType: ENGINE.PhysicsMotionType.Static
|
|
733
|
+
}
|
|
734
|
+
})
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
this.world.addActors(actor);
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Generate navmesh automatically from all static geometry in the scene
|
|
743
|
+
* Uses the built-in World.createNavigationMeshFromScene() method which automatically:
|
|
744
|
+
* - Finds all GLTFMeshComponents with Static motion type and !excludeFromNavigation
|
|
745
|
+
* - Finds all MeshComponents with Static motion type and !excludeFromNavigation
|
|
746
|
+
* - Waits for GLTF models to load before processing
|
|
747
|
+
*/
|
|
748
|
+
private async generateNavmesh(): Promise<void> {
|
|
749
|
+
console.log('Generating navmesh using built-in scene analysis...');
|
|
750
|
+
|
|
751
|
+
const navigationServer = this.world.getNavigationServer();
|
|
752
|
+
if (!navigationServer) {
|
|
753
|
+
console.error('Navigation server not available');
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
try {
|
|
758
|
+
// Update navigation server options with current parameters before generation
|
|
759
|
+
const navmeshOptions = {
|
|
760
|
+
cs: this.navmeshParams.cs,
|
|
761
|
+
ch: this.navmeshParams.ch,
|
|
762
|
+
walkableSlopeAngle: this.navmeshParams.walkableSlopeAngle,
|
|
763
|
+
walkableHeight: this.navmeshParams.walkableHeight,
|
|
764
|
+
walkableClimb: this.navmeshParams.walkableClimb,
|
|
765
|
+
walkableRadius: this.navmeshParams.walkableRadius,
|
|
766
|
+
maxEdgeLen: this.navmeshParams.maxEdgeLen,
|
|
767
|
+
maxSimplificationError: this.navmeshParams.maxSimplificationError,
|
|
768
|
+
minRegionArea: this.navmeshParams.minRegionArea,
|
|
769
|
+
mergeRegionArea: this.navmeshParams.mergeRegionArea,
|
|
770
|
+
maxVertsPerPoly: this.navmeshParams.maxVertsPerPoly,
|
|
771
|
+
detailSampleDist: this.navmeshParams.detailSampleDist,
|
|
772
|
+
detailSampleMaxError: this.navmeshParams.detailSampleMaxError,
|
|
773
|
+
borderSize: this.navmeshParams.borderSize
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
// Update the navigation server's options
|
|
777
|
+
(navigationServer as any).options = { ...(navigationServer as any).options, ...navmeshOptions };
|
|
778
|
+
|
|
779
|
+
// Use the built-in scene analysis method
|
|
780
|
+
// This automatically finds all static mesh components that should be included in navigation
|
|
781
|
+
await this.world.createNavigationMeshFromScene();
|
|
782
|
+
|
|
783
|
+
console.log('✅ NavMesh generated successfully using automatic scene analysis!');
|
|
784
|
+
|
|
785
|
+
// Create debug visualization if enabled
|
|
786
|
+
if (this.navmeshParams.debugEnabled) {
|
|
787
|
+
const debugVisualization = navigationServer.createDebugVisualization();
|
|
788
|
+
if (debugVisualization) {
|
|
789
|
+
// Disable raycasting for debug mesh to prevent interference
|
|
790
|
+
debugVisualization.traverse((child) => {
|
|
791
|
+
child.raycast = () => {};
|
|
792
|
+
});
|
|
793
|
+
debugVisualization.name = 'NavmeshDebugVisualization';
|
|
794
|
+
this.world.scene.add(debugVisualization);
|
|
795
|
+
console.log('Debug visualization added to scene');
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
} catch (error) {
|
|
799
|
+
console.error('❌ Error during navmesh generation:', error);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Set up camera for better viewing of both scenes
|
|
805
|
+
*/
|
|
806
|
+
private setupCamera(container: HTMLElement): void {
|
|
807
|
+
// Create and set an override camera for better scene viewing
|
|
808
|
+
const camera = new THREE.PerspectiveCamera(75, 1, 0.1, 1000);
|
|
809
|
+
const controls = new OrbitControls(camera, container);
|
|
810
|
+
controls.enableDamping = true;
|
|
811
|
+
controls.dampingFactor = 0.25;
|
|
812
|
+
controls.enableZoom = true;
|
|
813
|
+
controls.enablePan = true;
|
|
814
|
+
controls.enableRotate = true;
|
|
815
|
+
// controls.enableKeys = true;
|
|
816
|
+
// Position camera to see both primitive scene (left) and GLTF scene (right)
|
|
817
|
+
camera.position.set(15, 20, 35);
|
|
818
|
+
camera.lookAt(new THREE.Vector3(15, 0, 0)); // Look at center between both scenes
|
|
819
|
+
this.world.setOverrideCamera(camera);
|
|
820
|
+
console.log('Camera positioned for dual scene overview');
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Create Tweakpane UI for navmesh controls
|
|
825
|
+
*/
|
|
826
|
+
private createTweakPane(): void {
|
|
827
|
+
this.pane = new Pane({ title: 'Navmesh Generation Controls' });
|
|
828
|
+
|
|
829
|
+
// Actions folder - split into generation and export/import
|
|
830
|
+
const generationFolder = this.pane.addFolder({ title: 'NavMesh Generation', expanded: true });
|
|
831
|
+
|
|
832
|
+
const regenerateButton = generationFolder.addButton({ title: 'Regenerate Navmesh' });
|
|
833
|
+
regenerateButton.on('click', () => {
|
|
834
|
+
this.regenerateNavmesh();
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
// Export/Import folder for the new functionality
|
|
838
|
+
const exportImportFolder = this.pane.addFolder({ title: 'Export/Import', expanded: true });
|
|
839
|
+
|
|
840
|
+
const exportButton = exportImportFolder.addButton({ title: 'Export NavMesh' });
|
|
841
|
+
exportButton.on('click', () => {
|
|
842
|
+
this.exportNavmesh();
|
|
843
|
+
});
|
|
844
|
+
|
|
845
|
+
const importButton = exportImportFolder.addButton({ title: 'Import NavMesh' });
|
|
846
|
+
importButton.on('click', () => {
|
|
847
|
+
this.openImportDialog();
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
// Scene export functionality demonstrating the new metadata system
|
|
851
|
+
const sceneExportFolder = this.pane.addFolder({ title: 'Scene Export (New System)', expanded: true });
|
|
852
|
+
|
|
853
|
+
const exportSceneButton = sceneExportFolder.addButton({ title: 'Export Scene with NavMesh Reference' });
|
|
854
|
+
exportSceneButton.on('click', () => {
|
|
855
|
+
this.exportSceneWithNavMeshReference();
|
|
856
|
+
});
|
|
857
|
+
|
|
858
|
+
const setNavMeshReferenceButton = sceneExportFolder.addButton({ title: 'Set NavMesh Reference in Scene' });
|
|
859
|
+
setNavMeshReferenceButton.on('click', () => {
|
|
860
|
+
this.setNavMeshReferenceInScene();
|
|
861
|
+
});
|
|
862
|
+
|
|
863
|
+
// Status display following lightmapping demo pattern
|
|
864
|
+
this.pane.addBlade({ view: 'separator' });
|
|
865
|
+
const statusElement = document.createElement('div');
|
|
866
|
+
statusElement.style.padding = '8px';
|
|
867
|
+
statusElement.style.fontSize = '12px';
|
|
868
|
+
statusElement.style.color = '#888';
|
|
869
|
+
statusElement.style.backgroundColor = '#1a1a1a';
|
|
870
|
+
statusElement.style.borderRadius = '4px';
|
|
871
|
+
statusElement.innerHTML = 'Status: Ready<br/>🚀 NavMesh Export/Import Demo<br/>📝 1. Generate a navmesh<br/>📤 2. Export to .navmesh file<br/>📥 3. Import .navmesh file<br/>🔧 Files saved as scenename.navmesh<br/>🆕 NEW: Export scenes with resource metadata!';
|
|
872
|
+
sceneExportFolder.element.appendChild(statusElement);
|
|
873
|
+
|
|
874
|
+
// Store reference for updates
|
|
875
|
+
(this as any).statusElement = statusElement;
|
|
876
|
+
|
|
877
|
+
// Cell dimensions folder
|
|
878
|
+
const cellFolder = this.pane.addFolder({ title: 'Cell Dimensions', expanded: true });
|
|
879
|
+
cellFolder.addBinding(this.navmeshParams, 'cs', {
|
|
880
|
+
min: 0.05,
|
|
881
|
+
max: 1.0,
|
|
882
|
+
step: 0.05,
|
|
883
|
+
label: 'Cell Size (XZ)'
|
|
884
|
+
});
|
|
885
|
+
cellFolder.addBinding(this.navmeshParams, 'ch', {
|
|
886
|
+
min: 0.05,
|
|
887
|
+
max: 1.0,
|
|
888
|
+
step: 0.05,
|
|
889
|
+
label: 'Cell Height (Y)'
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
// Agent capabilities folder
|
|
893
|
+
const agentFolder = this.pane.addFolder({ title: 'Agent Capabilities', expanded: true });
|
|
894
|
+
agentFolder.addBinding(this.navmeshParams, 'walkableSlopeAngle', {
|
|
895
|
+
min: 0,
|
|
896
|
+
max: 90,
|
|
897
|
+
step: 1,
|
|
898
|
+
label: 'Max Slope (°)'
|
|
899
|
+
});
|
|
900
|
+
agentFolder.addBinding(this.navmeshParams, 'walkableHeight', {
|
|
901
|
+
min: 0.5,
|
|
902
|
+
max: 5.0,
|
|
903
|
+
step: 0.1,
|
|
904
|
+
label: 'Agent Height'
|
|
905
|
+
});
|
|
906
|
+
agentFolder.addBinding(this.navmeshParams, 'walkableClimb', {
|
|
907
|
+
min: 0.1,
|
|
908
|
+
max: 2.0,
|
|
909
|
+
step: 0.1,
|
|
910
|
+
label: 'Max Step Height'
|
|
911
|
+
});
|
|
912
|
+
agentFolder.addBinding(this.navmeshParams, 'walkableRadius', {
|
|
913
|
+
min: 0.1,
|
|
914
|
+
max: 2.0,
|
|
915
|
+
step: 0.1,
|
|
916
|
+
label: 'Agent Radius'
|
|
917
|
+
});
|
|
918
|
+
|
|
919
|
+
// Mesh quality folder
|
|
920
|
+
const qualityFolder = this.pane.addFolder({ title: 'Mesh Quality', expanded: false });
|
|
921
|
+
qualityFolder.addBinding(this.navmeshParams, 'maxEdgeLen', {
|
|
922
|
+
min: 1,
|
|
923
|
+
max: 50,
|
|
924
|
+
step: 1,
|
|
925
|
+
label: 'Max Edge Length'
|
|
926
|
+
});
|
|
927
|
+
qualityFolder.addBinding(this.navmeshParams, 'maxSimplificationError', {
|
|
928
|
+
min: 0.1,
|
|
929
|
+
max: 5.0,
|
|
930
|
+
step: 0.1,
|
|
931
|
+
label: 'Simplification Error'
|
|
932
|
+
});
|
|
933
|
+
|
|
934
|
+
// Region processing folder
|
|
935
|
+
const regionFolder = this.pane.addFolder({ title: 'Region Processing', expanded: false });
|
|
936
|
+
regionFolder.addBinding(this.navmeshParams, 'minRegionArea', {
|
|
937
|
+
min: 1,
|
|
938
|
+
max: 50,
|
|
939
|
+
step: 1,
|
|
940
|
+
label: 'Min Region Area'
|
|
941
|
+
});
|
|
942
|
+
regionFolder.addBinding(this.navmeshParams, 'mergeRegionArea', {
|
|
943
|
+
min: 1,
|
|
944
|
+
max: 100,
|
|
945
|
+
step: 1,
|
|
946
|
+
label: 'Merge Region Area'
|
|
947
|
+
});
|
|
948
|
+
|
|
949
|
+
// Advanced settings folder
|
|
950
|
+
const advancedFolder = this.pane.addFolder({ title: 'Advanced Settings', expanded: false });
|
|
951
|
+
advancedFolder.addBinding(this.navmeshParams, 'maxVertsPerPoly', {
|
|
952
|
+
min: 3,
|
|
953
|
+
max: 12,
|
|
954
|
+
step: 1,
|
|
955
|
+
label: 'Max Verts Per Poly'
|
|
956
|
+
});
|
|
957
|
+
advancedFolder.addBinding(this.navmeshParams, 'detailSampleDist', {
|
|
958
|
+
min: 1,
|
|
959
|
+
max: 20,
|
|
960
|
+
step: 1,
|
|
961
|
+
label: 'Detail Sample Dist'
|
|
962
|
+
});
|
|
963
|
+
advancedFolder.addBinding(this.navmeshParams, 'detailSampleMaxError', {
|
|
964
|
+
min: 0.1,
|
|
965
|
+
max: 5.0,
|
|
966
|
+
step: 0.1,
|
|
967
|
+
label: 'Detail Max Error'
|
|
968
|
+
});
|
|
969
|
+
advancedFolder.addBinding(this.navmeshParams, 'borderSize', {
|
|
970
|
+
min: 0,
|
|
971
|
+
max: 10,
|
|
972
|
+
step: 1,
|
|
973
|
+
label: 'Border Size'
|
|
974
|
+
});
|
|
975
|
+
|
|
976
|
+
// Scene control folder
|
|
977
|
+
const sceneFolder = this.pane.addFolder({ title: 'Scene Control', expanded: true });
|
|
978
|
+
const sceneTypeControl = sceneFolder.addBinding(this.navmeshParams, 'sceneType', {
|
|
979
|
+
options: {
|
|
980
|
+
'Primitives Only': 'Primitives',
|
|
981
|
+
'GLTF Only': 'GLTF',
|
|
982
|
+
'Both Scenes': 'Both'
|
|
983
|
+
},
|
|
984
|
+
label: 'Scene Type'
|
|
985
|
+
});
|
|
986
|
+
sceneTypeControl.on('change', () => {
|
|
987
|
+
this.updateSceneVisibility();
|
|
988
|
+
// Regenerate navmesh with the new scene configuration
|
|
989
|
+
this.regenerateNavmesh();
|
|
990
|
+
});
|
|
991
|
+
|
|
992
|
+
// Debug visualization folder
|
|
993
|
+
const debugFolder = this.pane.addFolder({ title: 'Debug Visualization', expanded: true });
|
|
994
|
+
const debugToggle = debugFolder.addBinding(this.navmeshParams, 'debugEnabled', {
|
|
995
|
+
label: 'Show Debug Mesh'
|
|
996
|
+
});
|
|
997
|
+
debugToggle.on('change', () => {
|
|
998
|
+
this.toggleDebugVisualization();
|
|
999
|
+
});
|
|
1000
|
+
|
|
1001
|
+
console.log('Tweakpane UI created successfully');
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Regenerate navmesh with current parameters
|
|
1006
|
+
*/
|
|
1007
|
+
private async regenerateNavmesh(): Promise<void> {
|
|
1008
|
+
console.log('Regenerating navmesh with updated parameters...');
|
|
1009
|
+
|
|
1010
|
+
// Clear existing debug visualization
|
|
1011
|
+
this.clearDebugVisualization();
|
|
1012
|
+
|
|
1013
|
+
// Generate new navmesh
|
|
1014
|
+
await this.generateNavmesh();
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Export the current navmesh to a binary file
|
|
1019
|
+
*/
|
|
1020
|
+
private async exportNavmesh(): Promise<void> {
|
|
1021
|
+
this.updateStatus('Exporting navmesh to binary file...');
|
|
1022
|
+
|
|
1023
|
+
const navigationServer = this.world.getNavigationServer();
|
|
1024
|
+
if (!navigationServer) {
|
|
1025
|
+
this.updateStatus('❌ Navigation server not available');
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
if (!navigationServer.isReady()) {
|
|
1030
|
+
this.updateStatus('❌ No navmesh to export - generate first');
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
try {
|
|
1035
|
+
// Create a dummy scene path for the demo (in a real game this would be the actual scene path)
|
|
1036
|
+
const demoScenePath = ENGINE.AssetPath.fromString('@project/assets/scenes/navmesh-demo.genesys-scene');
|
|
1037
|
+
|
|
1038
|
+
const result = await this.exportNavigationMesh(demoScenePath);
|
|
1039
|
+
|
|
1040
|
+
if (result.success && result.data && result.filename) {
|
|
1041
|
+
// Download the NavMesh file directly to user's computer
|
|
1042
|
+
const blob = new Blob([result.data], { type: 'application/octet-stream' });
|
|
1043
|
+
this.downloadBlob(blob, result.filename);
|
|
1044
|
+
|
|
1045
|
+
this.updateStatus(`✅ NavMesh exported as ${result.filename}`);
|
|
1046
|
+
console.log(`✅ NavMesh exported successfully as ${result.filename}`);
|
|
1047
|
+
} else {
|
|
1048
|
+
this.updateStatus('❌ Export failed');
|
|
1049
|
+
console.error('❌ Failed to export navmesh');
|
|
1050
|
+
}
|
|
1051
|
+
} catch (error) {
|
|
1052
|
+
this.updateStatus(`❌ Export error: ${error}`);
|
|
1053
|
+
console.error('❌ Error during NavMesh export:', error);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Helper method to download a blob as a file (following lightmapping demo pattern)
|
|
1059
|
+
*/
|
|
1060
|
+
private downloadBlob(blob: Blob, filename: string): void {
|
|
1061
|
+
const url = URL.createObjectURL(blob);
|
|
1062
|
+
const a = document.createElement('a');
|
|
1063
|
+
a.href = url;
|
|
1064
|
+
a.download = filename;
|
|
1065
|
+
a.style.display = 'none';
|
|
1066
|
+
document.body.appendChild(a);
|
|
1067
|
+
a.click();
|
|
1068
|
+
document.body.removeChild(a);
|
|
1069
|
+
URL.revokeObjectURL(url);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Opens a file dialog to select a navmesh file to import
|
|
1074
|
+
*/
|
|
1075
|
+
private openImportDialog(): void {
|
|
1076
|
+
// Create file input element for navmesh files
|
|
1077
|
+
const fileInput = document.createElement('input');
|
|
1078
|
+
fileInput.type = 'file';
|
|
1079
|
+
fileInput.accept = '.navmesh';
|
|
1080
|
+
fileInput.multiple = false;
|
|
1081
|
+
fileInput.style.display = 'none';
|
|
1082
|
+
|
|
1083
|
+
// Handle file selection
|
|
1084
|
+
fileInput.addEventListener('change', (event) => {
|
|
1085
|
+
const target = event.target as HTMLInputElement;
|
|
1086
|
+
const file = target.files?.[0];
|
|
1087
|
+
|
|
1088
|
+
if (file) {
|
|
1089
|
+
this.importNavmeshFromFile(file);
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// Clean up
|
|
1093
|
+
document.body.removeChild(fileInput);
|
|
1094
|
+
});
|
|
1095
|
+
|
|
1096
|
+
// Add to DOM and trigger click
|
|
1097
|
+
document.body.appendChild(fileInput);
|
|
1098
|
+
fileInput.click();
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* Import a navmesh from a selected file
|
|
1103
|
+
*/
|
|
1104
|
+
private async importNavmeshFromFile(file: File): Promise<void> {
|
|
1105
|
+
try {
|
|
1106
|
+
this.updateStatus('📂 Loading navmesh file...');
|
|
1107
|
+
|
|
1108
|
+
// Read the NavMesh binary file
|
|
1109
|
+
const fileData = await file.arrayBuffer();
|
|
1110
|
+
|
|
1111
|
+
this.updateStatus('📥 Importing navmesh data...');
|
|
1112
|
+
|
|
1113
|
+
// Import using the new API - can import from data directly
|
|
1114
|
+
const success = await this.importNavigationMesh(fileData);
|
|
1115
|
+
|
|
1116
|
+
if (success) {
|
|
1117
|
+
this.updateStatus(`✅ NavMesh imported from ${file.name}`);
|
|
1118
|
+
console.log(`✅ NavMesh imported successfully from ${file.name}`);
|
|
1119
|
+
|
|
1120
|
+
// Clear and recreate debug visualization if enabled
|
|
1121
|
+
if (this.navmeshParams.debugEnabled) {
|
|
1122
|
+
this.clearDebugVisualization();
|
|
1123
|
+
this.toggleDebugVisualization();
|
|
1124
|
+
}
|
|
1125
|
+
} else {
|
|
1126
|
+
this.updateStatus('❌ Import failed - check console for details');
|
|
1127
|
+
console.error('❌ Failed to import NavMesh');
|
|
1128
|
+
}
|
|
1129
|
+
} catch (error) {
|
|
1130
|
+
this.updateStatus(`❌ Import error: ${error}`);
|
|
1131
|
+
console.error('❌ Import failed:', error);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Sets a NavMesh resource reference in the current scene using the new metadata system
|
|
1137
|
+
*/
|
|
1138
|
+
private setNavMeshReferenceInScene(): void {
|
|
1139
|
+
this.updateStatus('Setting NavMesh reference in scene metadata...');
|
|
1140
|
+
|
|
1141
|
+
// Set the NavMesh resource reference using the new API
|
|
1142
|
+
const navMeshPath = '@engine/assets/dev/navmesh-demo.navmesh';
|
|
1143
|
+
this.world.setNavMeshResource(navMeshPath);
|
|
1144
|
+
|
|
1145
|
+
this.updateStatus(`✅ NavMesh reference set: ${navMeshPath}`);
|
|
1146
|
+
console.log(`✅ NavMesh resource reference set in scene: ${navMeshPath}`);
|
|
1147
|
+
console.log('Scene resources:', this.world.getSceneResources());
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Exports the current scene with NavMesh resource metadata
|
|
1152
|
+
*/
|
|
1153
|
+
private exportSceneWithNavMeshReference(): void {
|
|
1154
|
+
this.updateStatus('Exporting scene with NavMesh resource metadata...');
|
|
1155
|
+
|
|
1156
|
+
try {
|
|
1157
|
+
// Ensure we have a NavMesh reference set
|
|
1158
|
+
if (!this.world.getSceneResources()?.navMesh) {
|
|
1159
|
+
this.setNavMeshReferenceInScene();
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
// Export the current world/scene
|
|
1163
|
+
const context = new ENGINE.WorldSerializationContext();
|
|
1164
|
+
const sceneData = this.world.export(context, false);
|
|
1165
|
+
|
|
1166
|
+
// Convert to JSON string with nice formatting
|
|
1167
|
+
const sceneJson = JSON.stringify(sceneData, null, 2);
|
|
1168
|
+
|
|
1169
|
+
// Create and download the scene file
|
|
1170
|
+
const blob = new Blob([sceneJson], { type: 'application/json' });
|
|
1171
|
+
this.downloadBlob(blob, 'navmesh-demo-with-metadata.genesys-scene');
|
|
1172
|
+
|
|
1173
|
+
this.updateStatus('✅ Scene exported with NavMesh resource metadata');
|
|
1174
|
+
console.log('✅ Scene exported with resource metadata:', sceneData.resources);
|
|
1175
|
+
|
|
1176
|
+
// Log what the new system does differently
|
|
1177
|
+
console.log('🆕 NEW SYSTEM FEATURES:');
|
|
1178
|
+
console.log('- Scene file explicitly references NavMesh file path');
|
|
1179
|
+
console.log('- No more fragile path manipulation');
|
|
1180
|
+
console.log('- External tools can set resource references');
|
|
1181
|
+
console.log('- Engine loads resources from explicit paths');
|
|
1182
|
+
console.log('Resource metadata in scene:', sceneData.resources);
|
|
1183
|
+
|
|
1184
|
+
} catch (error) {
|
|
1185
|
+
this.updateStatus(`❌ Scene export error: ${error}`);
|
|
1186
|
+
console.error('❌ Error during scene export:', error);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Updates the status display in the UI
|
|
1192
|
+
*/
|
|
1193
|
+
private updateStatus(message: string): void {
|
|
1194
|
+
const statusElement = (this as any).statusElement;
|
|
1195
|
+
if (statusElement) {
|
|
1196
|
+
statusElement.innerHTML = `Status: ${message}`;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* Toggle debug visualization on/off
|
|
1202
|
+
*/
|
|
1203
|
+
private toggleDebugVisualization(): void {
|
|
1204
|
+
const navigationServer = this.world.getNavigationServer();
|
|
1205
|
+
if (!navigationServer) return;
|
|
1206
|
+
|
|
1207
|
+
if (this.navmeshParams.debugEnabled) {
|
|
1208
|
+
// Show debug visualization
|
|
1209
|
+
const debugVisualization = navigationServer.createDebugVisualization();
|
|
1210
|
+
if (debugVisualization) {
|
|
1211
|
+
debugVisualization.traverse((child) => {
|
|
1212
|
+
child.raycast = () => {};
|
|
1213
|
+
});
|
|
1214
|
+
debugVisualization.name = 'NavmeshDebugVisualization';
|
|
1215
|
+
this.world.scene.add(debugVisualization);
|
|
1216
|
+
console.log('Debug visualization enabled');
|
|
1217
|
+
}
|
|
1218
|
+
} else {
|
|
1219
|
+
// Hide debug visualization
|
|
1220
|
+
this.clearDebugVisualization();
|
|
1221
|
+
console.log('Debug visualization disabled');
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* Clear existing debug visualization
|
|
1227
|
+
*/
|
|
1228
|
+
private clearDebugVisualization(): void {
|
|
1229
|
+
const existingDebug = this.world.scene.getObjectByName('NavmeshDebugVisualization');
|
|
1230
|
+
if (existingDebug) {
|
|
1231
|
+
this.world.scene.remove(existingDebug);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* Clean up resources when demo is destroyed
|
|
1237
|
+
*/
|
|
1238
|
+
public override destroy(): void {
|
|
1239
|
+
// Clean up debug visualization
|
|
1240
|
+
this.clearDebugVisualization();
|
|
1241
|
+
|
|
1242
|
+
// Clean up Tweakpane
|
|
1243
|
+
if (this.pane) {
|
|
1244
|
+
this.pane.dispose();
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
super.destroy();
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
// Export the demo for use
|
|
1252
|
+
export default NavmeshPrimitivesDemo;
|