@woosh/meep-engine 3.42.0 → 3.44.0
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/editor/prototypeEditorShell.d.ts.map +1 -1
- package/editor/prototypeEditorShell.js +4 -2
- package/package.json +91 -96
- package/src/engine/Clock.d.ts +15 -0
- package/src/engine/Clock.d.ts.map +1 -1
- package/src/engine/Clock.js +29 -5
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +11 -19
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts +57 -0
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts.map +1 -0
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.js +84 -0
- package/src/engine/graphics3/AnimationGraphSystem.d.ts +23 -13
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +61 -64
- package/src/engine/graphics3/AnimationSystem.d.ts +24 -15
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +67 -61
- package/src/engine/graphics3/MeshSkinSystem.d.ts +56 -0
- package/src/engine/graphics3/MeshSkinSystem.d.ts.map +1 -0
- package/src/engine/graphics3/MeshSkinSystem.js +317 -0
- package/src/engine/graphics3/MeshSystem.d.ts +15 -35
- package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
- package/src/engine/graphics3/MeshSystem.js +21 -298
- package/src/engine/graphics3/RowChains.d.ts +76 -0
- package/src/engine/graphics3/RowChains.d.ts.map +1 -0
- package/src/engine/graphics3/RowChains.js +347 -0
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts +6 -0
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics3/ShadedGeometrySystem.js +329 -309
- package/src/engine/graphics3/animation/AnimationClips.d.ts +56 -0
- package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -0
- package/src/engine/graphics3/animation/AnimationClips.js +79 -0
- package/src/engine/graphics3/animation/ClipListPlayer.d.ts +13 -14
- package/src/engine/graphics3/animation/ClipListPlayer.d.ts.map +1 -1
- package/src/engine/graphics3/animation/ClipListPlayer.js +262 -263
- package/src/engine/graphics3/animation/write_clip_playback.d.ts +3 -3
- package/src/engine/graphics3/animation/write_clip_playback.js +4 -4
- package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts +5 -0
- package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
- package/src/engine/graphics3/pose/query_entity_node_world_pose.js +80 -75
- package/src/engine/graphics3/prefab/PrefabInstance.d.ts +4 -24
- package/src/engine/graphics3/prefab/PrefabInstance.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/PrefabInstance.js +60 -80
- package/src/engine/graphics3/prefab/prefab_instantiate.d.ts +16 -3
- package/src/engine/graphics3/prefab/prefab_instantiate.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_instantiate.js +49 -12
- package/src/engine/graphics3/prefab/prefab_place.d.ts +31 -17
- package/src/engine/graphics3/prefab/prefab_place.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_place.js +175 -130
- package/src/engine/graphics3/register_clips.d.ts +64 -0
- package/src/engine/graphics3/register_clips.d.ts.map +1 -0
- package/src/engine/graphics3/register_clips.js +114 -0
- package/src/engine/physics/cloth/MEASUREMENTS.md +795 -0
- package/src/engine/physics/cloth/PLAN.md +339 -9
- package/src/engine/physics/cloth/build/ClothProxy.d.ts +113 -61
- package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/ClothProxy.js +142 -77
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +22 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +75 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +43 -30
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +357 -284
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts +62 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +280 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.d.ts +17 -9
- package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.js +220 -212
- package/src/engine/physics/cloth/ecs/ClothDynamicsFlags.js +6 -0
- package/src/engine/physics/cloth/ecs/ClothHold.d.ts +91 -0
- package/src/engine/physics/cloth/ecs/ClothHold.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothHold.js +103 -0
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +254 -48
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +277 -47
- package/src/engine/physics/cloth/ecs/ClothPin.d.ts +73 -0
- package/src/engine/physics/cloth/ecs/ClothPin.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothPin.js +92 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts +36 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.js +61 -0
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts +23 -17
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothRig.js +29 -27
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +12 -14
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +20 -15
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +57 -36
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +816 -179
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +12 -13
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +20 -14
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +63 -11
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +321 -84
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +9 -7
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +9 -7
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +3 -3
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +30 -30
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +37 -0
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +142 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts +97 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.js +608 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +2 -2
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +160 -9
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +17 -22
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +55 -117
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -6
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +44 -15
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +5 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +60 -16
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +65 -58
- package/src/engine/physics/cloth/playground/collide_main.js +1 -1
- package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/garment_build.js +17 -5
- package/src/engine/physics/cloth/playground/garment_main.js +1 -1
- package/src/engine/physics/cloth/playground/rig_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/rig_build.js +302 -296
- package/src/engine/physics/cloth/solver/ClothState.d.ts +45 -7
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +63 -7
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +6 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +7 -2
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts +114 -0
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_hold_line.js +362 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +6 -2
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +13 -13
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +24 -12
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +24 -12
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +16 -0
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +183 -20
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +1 -0
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +10 -3
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.js +353 -346
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +7 -5
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +7 -5
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +9 -9
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +26 -26
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/simulation/Ticker.d.ts +13 -0
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +43 -8
- package/src/shade/RENDERER_CONTRACT.md +8 -2
- package/src/shade/playground/mesh_row_ceiling/main.js +2 -1
- package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +11 -19
- package/src/shade/playground/skinned_blas_refit/place_character.d.ts +6 -3
- package/src/shade/playground/skinned_blas_refit/place_character.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/place_character.js +90 -90
- package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/main.js +502 -509
- package/src/shade/playground/texture_encode/README.md +129 -109
- package/src/shade/playground/texture_encode/main.js +1430 -1430
- package/src/shade/playground/vgeo_runtime/README.md +5 -4
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +6 -5
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts +45 -14
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +316 -64
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +5 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +11 -1
- package/src/shade/renderer/atmosphere/GPUSky.d.ts +12 -0
- package/src/shade/renderer/atmosphere/GPUSky.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/GPUSky.js +162 -147
- package/src/shade/renderer/geometry/BoxGeometry.d.ts +1 -11
- package/src/shade/renderer/geometry/BoxGeometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/BoxGeometry.js +6 -13
- package/src/shade/renderer/geometry/CapsuleGeometry.d.ts +19 -0
- package/src/shade/renderer/geometry/CapsuleGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/CapsuleGeometry.js +24 -0
- package/src/shade/renderer/geometry/ConeGeometry.d.ts +20 -0
- package/src/shade/renderer/geometry/ConeGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/ConeGeometry.js +33 -0
- package/src/shade/renderer/geometry/CylinderGeometry.d.ts +21 -0
- package/src/shade/renderer/geometry/CylinderGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/CylinderGeometry.js +35 -0
- package/src/shade/renderer/geometry/PlaneGeometry.d.ts +17 -0
- package/src/shade/renderer/geometry/PlaneGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/PlaneGeometry.js +22 -0
- package/src/shade/renderer/geometry/TorusGeometry.d.ts +18 -0
- package/src/shade/renderer/geometry/TorusGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/TorusGeometry.js +23 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.d.ts +21 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.js +34 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts +19 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.js +205 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts +21 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.js +36 -0
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts +1 -1
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.js +44 -9
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts +20 -0
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.js +190 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +7 -2
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +26 -8
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +56 -39
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts +7 -0
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.js +46 -4
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.js +4 -2
- package/src/shade/renderer/gpu_primitive/sort/defs.d.ts +2 -2
- package/src/shade/renderer/gpu_primitive/sort/defs.js +79 -79
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +7 -3
- package/src/shade/renderer/lightmap/bake/shader_lightmap_denoise_sh.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/bake/shader_lightmap_denoise_sh.js +10 -3
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/particles/DESIGN.md +13 -9
- package/src/shade/renderer/particles/GPUParticleSystem.js +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +4 -3
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +200 -194
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +6 -2
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.js +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +334 -329
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +7 -2
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +16 -4
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +3 -2
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +3 -2
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +9 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +23 -1
- package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +2444 -2345
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.js +312 -310
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts +3 -3
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.js +383 -375
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.js +349 -346
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts +58 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.js +536 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts +21 -7
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.js +291 -327
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts +25 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.js +99 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts +5 -3
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.js +47 -71
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts +10 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.js +50 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts +4 -5
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.js +7 -8
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +4 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +74 -3
- package/src/shade/renderer/volumetrics/NOTES.md +1023 -957
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts +5 -4
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.js +5 -4
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts +1 -1
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.js +1 -1
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts +1 -1
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.js +1 -1
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts +41 -0
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.js +112 -0
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +9 -23
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +18 -126
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.d.ts +22 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.js +228 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +0 -53
- package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_transport.js +7 -5
- package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +1 -1
- package/src/shade/renderer/water/medium/GPUWaterBodies.js +8 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts +3 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts.map +1 -1
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.js +3 -2
- package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water.js +3 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.js +3 -1
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +4 -3
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +17 -7
- package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/graph_water_tessellation.js +11 -4
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +93 -30
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +13 -5
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +29 -8
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +155 -30
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +6 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +157 -39
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +91 -21
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/shader_water_particles.js +442 -70
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +11 -3
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +3 -0
- package/src/shade/wgsl/validate_wgsl_source.d.ts.map +1 -1
- package/src/shade/wgsl/validate_wgsl_source.js +74 -3
- package/src/engine/graphics3/register_instance_animation.d.ts +0 -114
- package/src/engine/graphics3/register_instance_animation.d.ts.map +0 -1
- package/src/engine/graphics3/register_instance_animation.js +0 -201
|
@@ -3,18 +3,19 @@ import { ResourceAccessKind } from "../../core/model/ResourceAccessKind.js";
|
|
|
3
3
|
import { ResourceAccessSpecification } from "../../core/model/ResourceAccessSpecification.js";
|
|
4
4
|
import { PosePlayback } from "../../shade/renderer/animation/pose/PosePlayback.js";
|
|
5
5
|
import { System } from "../ecs/System.js";
|
|
6
|
-
import {
|
|
6
|
+
import { AnimationClips } from "./animation/AnimationClips.js";
|
|
7
7
|
import { AnimationGraphController } from "./animation/AnimationGraphController.js";
|
|
8
8
|
import { write_graph_playback } from "./animation/write_graph_playback.js";
|
|
9
|
-
import {
|
|
10
|
-
register_instance_clips,
|
|
11
|
-
unregister_instance_clips
|
|
12
|
-
} from "./register_instance_animation.js";
|
|
9
|
+
import { register_clips, unregister_clips } from "./register_clips.js";
|
|
13
10
|
|
|
14
11
|
/**
|
|
15
12
|
* Drives every entity's {@link AnimationGraphController}: runs its clock, and tells the renderer
|
|
16
13
|
* what its clips weigh and where they are playing.
|
|
17
14
|
*
|
|
15
|
+
* **The clips are the entity's {@link AnimationClips}.** An entity is driven while it carries both
|
|
16
|
+
* components, whoever put them there — a model `MeshSystem` loaded, or a rig built in code. New
|
|
17
|
+
* clips are a new component, which this system sees as the entity leaving and coming back.
|
|
18
|
+
*
|
|
18
19
|
* **It is the CPU that plays the animation and the GPU that draws it.** Shade can advance a clip
|
|
19
20
|
* itself, and this never asks it to — `AnimationClipFlags.Playing` is left clear and every audible
|
|
20
21
|
* clip's time is written down each frame from the controller's own clock. That is I-4: the pose
|
|
@@ -23,7 +24,7 @@ import {
|
|
|
23
24
|
*
|
|
24
25
|
* **Nothing here is culled.** The legacy system skipped entities smaller than 32 px², which let
|
|
25
26
|
* camera framing decide whether a footstep effect or an ability release ever happened. The clock and
|
|
26
|
-
* its notifications are gameplay and run for every entity whose
|
|
27
|
+
* its notifications are gameplay and run for every entity whose clips have arrived; what may be
|
|
27
28
|
* culled is drawing, and drawing is Shade's to cull.
|
|
28
29
|
*/
|
|
29
30
|
export class AnimationGraphSystem extends System {
|
|
@@ -33,32 +34,31 @@ export class AnimationGraphSystem extends System {
|
|
|
33
34
|
#graphics;
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
|
-
* The
|
|
37
|
-
* for them.
|
|
37
|
+
* The scene whose GPU context issues the clip ids.
|
|
38
38
|
*
|
|
39
|
-
* @type {
|
|
39
|
+
* @type {Scene}
|
|
40
40
|
*/
|
|
41
|
-
#
|
|
41
|
+
#scene;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* @type {Map<number, {controller: AnimationGraphController,
|
|
44
|
+
* @type {Map<number, {controller: AnimationGraphController, clips: ShadeAnimationClip[], bound: boolean, clip_registration: ClipRegistration|null, slots: Int32Array, played_slots: Int32Array, clip_ids: Int32Array, weights: Float32Array, poses: PosePlayback[]}>}
|
|
45
45
|
*/
|
|
46
46
|
#entries = new Map();
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* @param {GraphicsEngine} graphics
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {Scene} scene
|
|
51
51
|
*/
|
|
52
|
-
constructor(graphics,
|
|
52
|
+
constructor(graphics, scene) {
|
|
53
53
|
super();
|
|
54
54
|
|
|
55
55
|
assert.defined(graphics, 'graphics');
|
|
56
|
-
assert.
|
|
56
|
+
assert.equal(scene?.isScene, true, 'scene.isScene !== true');
|
|
57
57
|
|
|
58
58
|
this.#graphics = graphics;
|
|
59
|
-
this.#
|
|
59
|
+
this.#scene = scene;
|
|
60
60
|
|
|
61
|
-
this.dependencies = [AnimationGraphController,
|
|
61
|
+
this.dependencies = [AnimationGraphController, AnimationClips];
|
|
62
62
|
|
|
63
63
|
// this tick's clip times are this system's to set: whatever evaluates a pose from them
|
|
64
64
|
// (exact queries, IK's base pose) reads AnimationGraphController and so runs after it
|
|
@@ -68,14 +68,20 @@ export class AnimationGraphSystem extends System {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
+
* Only noted here: the graph is bound to the clips by the next {@link update}. A link can happen
|
|
72
|
+
* anywhere the components are added — inside a model's spawn, for one `MeshSystem` loads — and a
|
|
73
|
+
* graph naming a clip the entity has not got throws, which belongs in this system's tick and not
|
|
74
|
+
* in whoever added the component.
|
|
75
|
+
*
|
|
71
76
|
* @param {AnimationGraphController} controller
|
|
72
|
-
* @param {
|
|
77
|
+
* @param {AnimationClips} clips
|
|
73
78
|
* @param {number} entity
|
|
74
79
|
*/
|
|
75
|
-
link(controller,
|
|
80
|
+
link(controller, clips, entity) {
|
|
76
81
|
this.#entries.set(entity, {
|
|
77
82
|
controller,
|
|
78
|
-
|
|
83
|
+
clips: clips.clips,
|
|
84
|
+
bound: false,
|
|
79
85
|
clip_registration: null,
|
|
80
86
|
slots: new Int32Array(0),
|
|
81
87
|
played_slots: new Int32Array(0),
|
|
@@ -86,15 +92,15 @@ export class AnimationGraphSystem extends System {
|
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
/**
|
|
89
|
-
* What the entity
|
|
90
|
-
*
|
|
95
|
+
* What the entity is playing, in the form the CPU pose evaluator takes: one entry per clip
|
|
96
|
+
* **this graph names**, at the weight and the time the renderer has been given.
|
|
91
97
|
*
|
|
92
98
|
* **The clips the graph does not name are not here, because they are not registered** (D37).
|
|
93
99
|
* The GPU's accumulator marks a joint dirty for every bound clip that writes to it, weight and
|
|
94
100
|
* all — so a bound clip at weight zero resolves the joints only it drives to zero rather than
|
|
95
101
|
* leaving them at rest. The answer is not to hand those clips to the evaluator so it can make
|
|
96
102
|
* the same mistake; it is not to bind them. What the graph never names, nothing plays, and the
|
|
97
|
-
* joints it alone would have driven stay where
|
|
103
|
+
* joints it alone would have driven stay where they rest.
|
|
98
104
|
*
|
|
99
105
|
* A clip the graph names but is not currently playing **is** here, at weight zero, because it is
|
|
100
106
|
* bound and the accumulator does see it.
|
|
@@ -105,16 +111,17 @@ export class AnimationGraphSystem extends System {
|
|
|
105
111
|
* @param {PosePlayback[]} target appended to
|
|
106
112
|
* @param {number} entity
|
|
107
113
|
* @returns {boolean} whether this system is driving the entity — `false` for one with no
|
|
108
|
-
* {@link AnimationGraphController}, and for one whose
|
|
114
|
+
* {@link AnimationGraphController} or no {@link AnimationClips}, and for one whose clips arrived
|
|
115
|
+
* since the last update
|
|
109
116
|
*/
|
|
110
117
|
write_pose_playbacks(target, entity) {
|
|
111
118
|
const entry = this.#entries.get(entity);
|
|
112
119
|
|
|
113
|
-
if (entry === undefined || entry.
|
|
120
|
+
if (entry === undefined || !entry.bound) {
|
|
114
121
|
return false;
|
|
115
122
|
}
|
|
116
123
|
|
|
117
|
-
const clips = entry.
|
|
124
|
+
const clips = entry.clips;
|
|
118
125
|
const poses = entry.poses;
|
|
119
126
|
const played = entry.played_slots;
|
|
120
127
|
|
|
@@ -136,7 +143,7 @@ export class AnimationGraphSystem extends System {
|
|
|
136
143
|
const weight = weights[i];
|
|
137
144
|
|
|
138
145
|
// assignment rather than accumulation, and it matters only where two of the graph's
|
|
139
|
-
// clips are one clip of the
|
|
146
|
+
// clips are one clip of the entity: the renderer is written to in this order too, so the
|
|
140
147
|
// last of them is what it holds
|
|
141
148
|
pose.weight = weight;
|
|
142
149
|
|
|
@@ -155,10 +162,10 @@ export class AnimationGraphSystem extends System {
|
|
|
155
162
|
|
|
156
163
|
/**
|
|
157
164
|
* @param {AnimationGraphController} controller
|
|
158
|
-
* @param {
|
|
165
|
+
* @param {AnimationClips} clips
|
|
159
166
|
* @param {number} entity
|
|
160
167
|
*/
|
|
161
|
-
unlink(controller,
|
|
168
|
+
unlink(controller, clips, entity) {
|
|
162
169
|
controller.unlink();
|
|
163
170
|
|
|
164
171
|
const entry = this.#entries.get(entity);
|
|
@@ -186,7 +193,7 @@ export class AnimationGraphSystem extends System {
|
|
|
186
193
|
* **An id may only be handed back to the manager that issued it.** A renderer restart replaces
|
|
187
194
|
* the GPU scene context and voids every id it gave out, so a registration stamped with a context
|
|
188
195
|
* that is no longer current is forgotten rather than returned — returning it would corrupt a
|
|
189
|
-
* stranger's table. Same rule as {@link
|
|
196
|
+
* stranger's table. Same rule as {@link unregister_clips}, same `===`.
|
|
190
197
|
*
|
|
191
198
|
* @param {object} entry
|
|
192
199
|
*/
|
|
@@ -197,8 +204,8 @@ export class AnimationGraphSystem extends System {
|
|
|
197
204
|
return;
|
|
198
205
|
}
|
|
199
206
|
|
|
200
|
-
if (registration.context === this.#graphics.scene_context(this.#
|
|
201
|
-
|
|
207
|
+
if (registration.context === this.#graphics.scene_context(this.#scene)) {
|
|
208
|
+
unregister_clips(registration);
|
|
202
209
|
}
|
|
203
210
|
|
|
204
211
|
entry.clip_registration = null;
|
|
@@ -210,22 +217,15 @@ export class AnimationGraphSystem extends System {
|
|
|
210
217
|
update(time_delta_seconds) {
|
|
211
218
|
const ecd = this.entityManager.dataset;
|
|
212
219
|
|
|
213
|
-
const context = this.#graphics.scene_context(this.#
|
|
220
|
+
const context = this.#graphics.scene_context(this.#scene);
|
|
214
221
|
|
|
215
222
|
// No device — before the first start, and again after a stop. The clocks still run: a unit
|
|
216
223
|
// that fires an ability while the renderer is being replaced still fires it.
|
|
217
224
|
const manager = context === null ? null : context.animation_manager;
|
|
218
225
|
|
|
219
226
|
for (const [entity, entry] of this.#entries) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
if (instance === null) {
|
|
223
|
-
// the model has not arrived, and its clips are what say how long they run
|
|
224
|
-
continue;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (instance !== entry.instance) {
|
|
228
|
-
this.#bind_model(entry, entity, instance, ecd);
|
|
227
|
+
if (!entry.bound) {
|
|
228
|
+
this.#bind_clips(entry, entity, ecd);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
entry.controller.tick(time_delta_seconds);
|
|
@@ -240,7 +240,7 @@ export class AnimationGraphSystem extends System {
|
|
|
240
240
|
noticed — in one comparison, without depending on when anything last ran.
|
|
241
241
|
*/
|
|
242
242
|
if (entry.clip_registration === null || entry.clip_registration.context !== context) {
|
|
243
|
-
this.#bind_gpu(entry,
|
|
243
|
+
this.#bind_gpu(entry, context);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
write_graph_playback(manager, entry.controller, entry.clip_ids, entry.weights);
|
|
@@ -248,15 +248,16 @@ export class AnimationGraphSystem extends System {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
|
-
* Bind the graph to
|
|
252
|
-
*
|
|
251
|
+
* Bind the graph to the entity's clips: work out which of them each of the graph's clips is, how
|
|
252
|
+
* long each of them runs, and start the graph on that.
|
|
253
253
|
*
|
|
254
254
|
* @param {object} entry
|
|
255
255
|
* @param {number} entity
|
|
256
|
-
* @param {PrefabInstance} instance
|
|
257
256
|
* @param {EntityComponentDataset} ecd
|
|
258
257
|
*/
|
|
259
|
-
#
|
|
258
|
+
#bind_clips(entry, entity, ecd) {
|
|
259
|
+
const clips = entry.clips;
|
|
260
|
+
|
|
260
261
|
const clip_index = entry.controller.def.clipIndex;
|
|
261
262
|
const clip_count = clip_index.length;
|
|
262
263
|
|
|
@@ -266,26 +267,25 @@ export class AnimationGraphSystem extends System {
|
|
|
266
267
|
for (let i = 0; i < clip_count; i++) {
|
|
267
268
|
const name = clip_index[i].name;
|
|
268
269
|
|
|
269
|
-
const slot =
|
|
270
|
+
const slot = clips.findIndex(clip => clip.name === name);
|
|
270
271
|
|
|
271
272
|
if (slot === -1) {
|
|
272
|
-
throw new Error(`Animation clip '${name}' is not
|
|
273
|
+
throw new Error(`Animation clip '${name}' is not among the clips of entity ${entity}`);
|
|
273
274
|
}
|
|
274
275
|
|
|
275
276
|
slots[i] = slot;
|
|
276
|
-
durations[i] =
|
|
277
|
+
durations[i] = clips[slot].duration;
|
|
277
278
|
}
|
|
278
279
|
|
|
279
280
|
entry.controller.unlink();
|
|
280
281
|
entry.controller.link(entity, ecd, durations);
|
|
281
282
|
|
|
282
|
-
entry.instance = instance;
|
|
283
283
|
entry.slots = slots;
|
|
284
284
|
|
|
285
285
|
/*
|
|
286
|
-
The distinct clips
|
|
287
|
-
|
|
288
|
-
|
|
286
|
+
The distinct clips this graph plays. Two states can name one clip — an idle a hurt returns
|
|
287
|
+
to, say — and it is one row on the GPU either way, so it is one entry here: registered once,
|
|
288
|
+
reported to the pose evaluator once.
|
|
289
289
|
*/
|
|
290
290
|
const played = [];
|
|
291
291
|
|
|
@@ -299,28 +299,25 @@ export class AnimationGraphSystem extends System {
|
|
|
299
299
|
|
|
300
300
|
entry.clip_ids = new Int32Array(clip_count);
|
|
301
301
|
entry.weights = new Float32Array(clip_count).fill(-1);
|
|
302
|
-
entry.poses =
|
|
302
|
+
entry.poses = clips.map(() => new PosePlayback());
|
|
303
303
|
|
|
304
|
-
|
|
305
|
-
// have
|
|
306
|
-
this.#release_clips(entry);
|
|
304
|
+
entry.bound = true;
|
|
307
305
|
}
|
|
308
306
|
|
|
309
307
|
/**
|
|
310
308
|
* Make this graph's clips playable, and take up the ids that come back.
|
|
311
309
|
*
|
|
312
310
|
* **Only the clips the graph names are registered** (D37), so there is nothing to silence: a
|
|
313
|
-
* clip
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
311
|
+
* clip no state plays is never bound, never marks a joint, and leaves the joints only it would
|
|
312
|
+
* have driven at rest. What this used to do instead — register everything and then write a zero
|
|
313
|
+
* weight over the surplus — kept them bound, and a bound clip at weight zero resolves its joints
|
|
314
|
+
* to zero rather than to the rig's own pose.
|
|
317
315
|
*
|
|
318
316
|
* @param {object} entry
|
|
319
|
-
* @param {PrefabInstance} instance
|
|
320
317
|
* @param {GPUSceneContext} context
|
|
321
318
|
*/
|
|
322
|
-
#bind_gpu(entry,
|
|
323
|
-
const registration =
|
|
319
|
+
#bind_gpu(entry, context) {
|
|
320
|
+
const registration = register_clips(context, entry.clips, entry.played_slots);
|
|
324
321
|
|
|
325
322
|
const slots = entry.slots;
|
|
326
323
|
const clip_ids = entry.clip_ids;
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The list path is what the game uses wherever there is no state machine — buildings, critters and
|
|
6
6
|
* the strategy map's groups — and {@link ClipListPlayer} is what plays it. This is the ECS half:
|
|
7
|
-
* which entity has
|
|
7
|
+
* which clips each entity has, and when the ids the renderer issued for them stopped meaning
|
|
8
8
|
* anything.
|
|
9
9
|
*
|
|
10
|
+
* **The clips are the entity's {@link AnimationClips}.** An entity is driven while it carries both
|
|
11
|
+
* components, whoever put them there — a model `MeshSystem` loaded, or a rig built in code. New
|
|
12
|
+
* clips are a new component, which this system sees as the entity leaving and coming back.
|
|
13
|
+
*
|
|
10
14
|
* **It is the CPU that plays the animation and the GPU that draws it.** Shade can advance a clip
|
|
11
15
|
* itself, and this never asks it to — `AnimationClipFlags.Playing` is left clear and every audible
|
|
12
16
|
* clip's time is written down each frame from the player's own clock. That is I-4: the pose
|
|
@@ -20,31 +24,31 @@
|
|
|
20
24
|
export class AnimationSystem extends System<any> {
|
|
21
25
|
/**
|
|
22
26
|
* @param {GraphicsEngine} graphics
|
|
23
|
-
* @param {
|
|
27
|
+
* @param {Scene} scene
|
|
24
28
|
*/
|
|
25
|
-
constructor(graphics: GraphicsEngine,
|
|
26
|
-
dependencies: (typeof
|
|
29
|
+
constructor(graphics: GraphicsEngine, scene: Scene);
|
|
30
|
+
dependencies: (typeof Animation | typeof AnimationClips)[];
|
|
27
31
|
components_used: ResourceAccessSpecification<typeof Animation>[];
|
|
28
32
|
/**
|
|
29
33
|
* What an entity is playing, and where each of them is.
|
|
30
34
|
*
|
|
31
35
|
* One entry per clip in the component's list, in the list's own order. Empty for an entity this
|
|
32
|
-
* system is not driving — one that has left, or one whose
|
|
33
|
-
* same wait the clip durations are on.
|
|
36
|
+
* system is not driving — one that has left, or one whose clips arrived since the last update.
|
|
34
37
|
*
|
|
35
38
|
* @param {number} entity
|
|
36
39
|
* @returns {ClipPlayback[]}
|
|
37
40
|
*/
|
|
38
41
|
playbacks_of(entity: number): ClipPlayback[];
|
|
39
42
|
/**
|
|
40
|
-
* What the entity
|
|
41
|
-
*
|
|
43
|
+
* What the entity is playing, in the form the CPU pose evaluator takes: one entry per clip of its
|
|
44
|
+
* {@link AnimationClips} that the list names, at the weight and the time the renderer has been
|
|
45
|
+
* given.
|
|
42
46
|
*
|
|
43
47
|
* **Only the clips the list names are here, because they are the only ones registered** (D37).
|
|
44
48
|
* The GPU's accumulator marks a joint dirty for every bound clip that writes to it, weight and
|
|
45
49
|
* all — so a bound clip at weight zero resolves the joints only it drives to zero rather than
|
|
46
50
|
* leaving them at rest. The answer is not to hand the surplus to the evaluator so it agrees with
|
|
47
|
-
* a mistake; it is not to bind them, and then a clip
|
|
51
|
+
* a mistake; it is not to bind them, and then a clip nothing names moves nothing.
|
|
48
52
|
*
|
|
49
53
|
* The entries are this system's own and are rewritten by the next call, which is what keeps a
|
|
50
54
|
* query on a per-frame path from allocating.
|
|
@@ -52,27 +56,32 @@ export class AnimationSystem extends System<any> {
|
|
|
52
56
|
* @param {PosePlayback[]} target appended to
|
|
53
57
|
* @param {number} entity
|
|
54
58
|
* @returns {boolean} whether this system is driving the entity — `false` for one with no
|
|
55
|
-
* {@link Animation}, and for one whose
|
|
59
|
+
* {@link Animation} or no {@link AnimationClips}, and for one whose clips arrived since the last
|
|
60
|
+
* update
|
|
56
61
|
*/
|
|
57
62
|
write_pose_playbacks(target: PosePlayback[], entity: number): boolean;
|
|
58
63
|
/**
|
|
64
|
+
* Only noted here: the clips are taken up by the next {@link update}. A link can happen anywhere
|
|
65
|
+
* the components are added — inside a model's spawn, for one `MeshSystem` loads — and binding is
|
|
66
|
+
* this system's work, on its own tick.
|
|
67
|
+
*
|
|
59
68
|
* @param {Animation} component
|
|
60
|
-
* @param {
|
|
69
|
+
* @param {AnimationClips} clips
|
|
61
70
|
* @param {number} entity
|
|
62
71
|
*/
|
|
63
|
-
link(component: Animation,
|
|
72
|
+
link(component: Animation, clips: AnimationClips, entity: number): void;
|
|
64
73
|
/**
|
|
65
74
|
* @param {Animation} component
|
|
66
|
-
* @param {
|
|
75
|
+
* @param {AnimationClips} clips
|
|
67
76
|
* @param {number} entity
|
|
68
77
|
*/
|
|
69
|
-
unlink(component: Animation,
|
|
78
|
+
unlink(component: Animation, clips: AnimationClips, entity: number): void;
|
|
70
79
|
shutdown(entityManager: any): Promise<void>;
|
|
71
80
|
#private;
|
|
72
81
|
}
|
|
73
82
|
import { System } from "../ecs/System.js";
|
|
74
|
-
import { SGMesh } from "../graphics/ecs/mesh-v2/aggregate/SGMesh.js";
|
|
75
83
|
import { Animation } from "../ecs/animation/Animation.js";
|
|
84
|
+
import { AnimationClips } from "./animation/AnimationClips.js";
|
|
76
85
|
import { ResourceAccessSpecification } from "../../core/model/ResourceAccessSpecification.js";
|
|
77
86
|
import { PosePlayback } from "../../shade/renderer/animation/pose/PosePlayback.js";
|
|
78
87
|
//# sourceMappingURL=AnimationSystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/AnimationSystem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AnimationSystem.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/AnimationSystem.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IAkBI;;;OAGG;IACH,oDAgBC;IAPG,2DAA+C;IAI/C,iEAEC;IAGL;;;;;;;;OAQG;IACH,qBAHW,MAAM,GACJ,cAAc,CAU1B;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,6BANW,YAAY,EAAE,UACd,MAAM,GACJ,OAAO,CAyCnB;IAED;;;;;;;;OAQG;IACH,gBAJW,SAAS,SACT,cAAc,UACd,MAAM,QAYhB;IAED;;;;OAIG;IACH,kBAJW,SAAS,SACT,cAAc,UACd,MAAM,QAUhB;IAED,4CAMC;;CAsKJ;uBAxWsB,kBAAkB;0BADf,+BAA+B;+BAE1B,+BAA+B;4CAJlB,iDAAiD;6BAChE,qDAAqD"}
|