@woosh/meep-engine 3.17.1 → 3.18.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/actions/concrete/ComponentAddAction.d.ts +1 -0
- package/editor/actions/concrete/ComponentAddAction.d.ts.map +1 -1
- package/editor/actions/concrete/ComponentAddAction.js +4 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts +1 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts.map +1 -1
- package/editor/actions/concrete/ComponentRemoveAction.js +4 -0
- package/editor/actions/concrete/EntityCreateAction.d.ts +1 -0
- package/editor/actions/concrete/EntityCreateAction.d.ts.map +1 -1
- package/editor/actions/concrete/EntityCreateAction.js +7 -0
- package/editor/actions/concrete/EntityRemoveAction.d.ts +1 -0
- package/editor/actions/concrete/EntityRemoveAction.d.ts.map +1 -1
- package/editor/actions/concrete/EntityRemoveAction.js +4 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts +10 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts.map +1 -1
- package/editor/actions/concrete/PatchTerrainHeightAction.js +107 -85
- package/editor/actions/concrete/TransformModifyAction.d.ts +1 -0
- package/editor/actions/concrete/TransformModifyAction.d.ts.map +1 -1
- package/editor/actions/concrete/TransformModifyAction.js +4 -0
- package/editor/particles/effect/ParticleEffectDocument.d.ts.map +1 -1
- package/editor/particles/effect/ParticleEffectDocument.js +10 -6
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
- package/editor/particles/effect/ParticleReferenceSimulation.js +98 -4
- package/editor/particles/effect/make_starter_particle_effect.d.ts.map +1 -1
- package/editor/particles/effect/make_starter_particle_effect.js +0 -2
- package/editor/tools/engine/ToolEngine.d.ts +30 -0
- package/editor/tools/engine/ToolEngine.d.ts.map +1 -1
- package/editor/tools/engine/ToolEngine.js +257 -188
- package/editor/view/ecs/EntityList.d.ts.map +1 -1
- package/editor/view/ecs/EntityList.js +6 -5
- package/editor/view/particles/effect/ParticleEmitterInspectorView.d.ts.map +1 -1
- package/editor/view/particles/effect/ParticleEmitterInspectorView.js +17 -9
- package/package.json +1 -1
- package/src/CODEC_LAYOUT_VERIFICATION.md +1 -2
- package/src/core/binary/meshopt/MESHOPT_VERTEX_BLOCK.d.ts +56 -0
- package/src/core/binary/meshopt/MESHOPT_VERTEX_BLOCK.d.ts.map +1 -0
- package/src/core/binary/meshopt/MESHOPT_VERTEX_BLOCK.js +73 -0
- package/src/core/binary/meshopt/meshopt_decode_vertex_buffer.d.ts.map +1 -1
- package/src/core/binary/meshopt/meshopt_decode_vertex_buffer.js +18 -63
- package/src/core/binary/meshopt/meshopt_encode_byte_group.d.ts +53 -0
- package/src/core/binary/meshopt/meshopt_encode_byte_group.d.ts.map +1 -0
- package/src/core/binary/meshopt/meshopt_encode_byte_group.js +140 -0
- package/src/core/binary/meshopt/meshopt_encode_data_block.d.ts +32 -0
- package/src/core/binary/meshopt/meshopt_encode_data_block.d.ts.map +1 -0
- package/src/core/binary/meshopt/meshopt_encode_data_block.js +77 -0
- package/src/core/binary/meshopt/meshopt_encode_index_sequence.d.ts +46 -0
- package/src/core/binary/meshopt/meshopt_encode_index_sequence.d.ts.map +1 -0
- package/src/core/binary/meshopt/meshopt_encode_index_sequence.js +146 -0
- package/src/core/binary/meshopt/meshopt_encode_vertex_buffer.d.ts +40 -0
- package/src/core/binary/meshopt/meshopt_encode_vertex_buffer.d.ts.map +1 -0
- package/src/core/binary/meshopt/meshopt_encode_vertex_buffer.js +700 -0
- package/src/core/binary/meshopt/meshopt_write_uint_var.d.ts +24 -0
- package/src/core/binary/meshopt/meshopt_write_uint_var.d.ts.map +1 -0
- package/src/core/binary/meshopt/meshopt_write_uint_var.js +39 -0
- package/src/core/math/random/seededRandom_Mulberry32.d.ts.map +1 -1
- package/src/core/math/random/seededRandom_Mulberry32.js +4 -2
- package/src/core/process/undo/Action.d.ts +19 -0
- package/src/core/process/undo/Action.d.ts.map +1 -1
- package/src/core/process/undo/Action.js +17 -0
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +78 -0
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -0
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +310 -0
- package/src/engine/graphics3/GraphicsEngine.d.ts +17 -0
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +30 -10
- package/src/engine/graphics3/particles/particle_gpu_records.d.ts.map +1 -1
- package/src/engine/graphics3/particles/particle_gpu_records.js +0 -2
- package/src/engine/interpolation/InterpolationSystem.d.ts +7 -0
- package/src/engine/interpolation/InterpolationSystem.d.ts.map +1 -1
- package/src/engine/interpolation/InterpolationSystem.js +10 -0
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +14 -34
- package/src/engine/network/time/RenderPlayout.d.ts +76 -0
- package/src/engine/network/time/RenderPlayout.d.ts.map +1 -0
- package/src/engine/network/time/RenderPlayout.js +163 -0
- package/src/engine/network/transport/adapters/WebSocketTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/WebSocketTransport.js +11 -4
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +4 -12
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +39 -13
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/sound/simulation/core/VolumeField.d.ts.map +1 -1
- package/src/engine/sound/simulation/core/VolumeField.js +4 -1
- package/src/format/scene/gltf/MESHOPT_COMPRESSION_PLAN.md +23 -2
- package/src/shade/playground/particle_system/README.md +139 -139
- package/src/shade/playground/particle_system/particle_prototype.d.ts.map +1 -1
- package/src/shade/playground/particle_system/particle_prototype.js +0 -2
- package/src/shade/playground/particle_system/particle_scene.d.ts +6 -9
- package/src/shade/playground/particle_system/particle_scene.d.ts.map +1 -1
- package/src/shade/playground/particle_system/particle_scene.js +6 -13
- package/src/shade/playground/ssr_reprojection/README.md +103 -0
- package/src/shade/playground/ssr_reprojection/SpatialFilterProbe.d.ts +17 -0
- package/src/shade/playground/ssr_reprojection/SpatialFilterProbe.d.ts.map +1 -0
- package/src/shade/playground/ssr_reprojection/SpatialFilterProbe.js +68 -0
- package/src/shade/playground/ssr_reprojection/index.html +79 -0
- package/src/shade/playground/ssr_reprojection/main.d.ts +2 -0
- package/src/shade/playground/ssr_reprojection/main.d.ts.map +1 -0
- package/src/shade/playground/ssr_reprojection/main.js +245 -0
- package/src/shade/playground/ssr_reprojection/scene.d.ts +18 -0
- package/src/shade/playground/ssr_reprojection/scene.d.ts.map +1 -0
- package/src/shade/playground/ssr_reprojection/scene.js +51 -0
- package/src/shade/renderer/Renderer.d.ts +2 -23
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +185 -218
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts +5 -8
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +12 -12
- package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUTypedTable.js +6 -0
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.js +7 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_sample_specular.d.ts +4 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_sample_specular.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_sample_specular.js +51 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_specular.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_specular.js +5 -35
- package/src/shade/renderer/particles/DESIGN.md +703 -514
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts +16 -4
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +1189 -991
- package/src/shade/renderer/particles/ParticleConstants.d.ts +64 -0
- package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
- package/src/shade/renderer/particles/ParticleConstants.js +71 -0
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds.d.ts +57 -0
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds.d.ts.map +1 -0
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds.js +181 -0
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds_unknown.d.ts +7 -0
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds_unknown.d.ts.map +1 -0
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds_unknown.js +12 -0
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts +33 -0
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts.map +1 -0
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.js +67 -0
- package/src/shade/renderer/particles/bounds/shader_particle_bounds.d.ts +40 -0
- package/src/shade/renderer/particles/bounds/shader_particle_bounds.d.ts.map +1 -0
- package/src/shade/renderer/particles/bounds/shader_particle_bounds.js +187 -0
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +15 -2
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +14 -8
- package/src/shade/renderer/particles/data/PARTICLE_COUNTERS.d.ts +58 -4
- package/src/shade/renderer/particles/data/PARTICLE_COUNTERS.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_COUNTERS.js +79 -4
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STATE.d.ts +23 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STATE.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STATE.js +35 -2
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts +4 -2
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js +5 -8
- package/src/shade/renderer/particles/data/particle_emitter_record.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/particle_emitter_record.js +0 -6
- package/src/shade/renderer/particles/graph_particles.d.ts +25 -3
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +108 -31
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts +6 -4
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles_avboit.js +5 -5
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +5 -0
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/EmitterRegistry.js +27 -6
- package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts +4 -0
- package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.js +6 -1
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +35 -27
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ParticleEmitter.js +424 -425
- package/src/shade/renderer/particles/shaders/chunk_particle_emitter_warmup.d.ts +20 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_emitter_warmup.d.ts.map +1 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts +4 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +38 -2
- package/src/shade/renderer/particles/shaders/chunk_particle_spawn_budget.d.ts +22 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_spawn_budget.d.ts.map +1 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_spawn_budget.js +42 -0
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_occupancy.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_occupancy.js +53 -22
- package/src/shade/renderer/particles/shaders/shader_particle_emitter_tick.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emitter_tick.js +213 -216
- package/src/shade/renderer/particles/shaders/shader_particle_reclaim.d.ts +50 -0
- package/src/shade/renderer/particles/shaders/shader_particle_reclaim.d.ts.map +1 -0
- package/src/shade/renderer/particles/shaders/shader_particle_render.js +1 -1
- package/src/shade/renderer/particles/warmup/chunk_particle_warmup_step.d.ts +36 -0
- package/src/shade/renderer/particles/warmup/chunk_particle_warmup_step.d.ts.map +1 -0
- package/src/shade/renderer/particles/warmup/chunk_particle_warmup_step.js +102 -0
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +102 -0
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -0
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +329 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup.d.ts +112 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup.d.ts.map +1 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup.js +318 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.d.ts +35 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.d.ts.map +1 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.js +108 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.d.ts +3 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.d.ts.map +1 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.js +70 -0
- package/src/shade/renderer/particles/warmup/warmup_schedule.d.ts +62 -0
- package/src/shade/renderer/particles/warmup/warmup_schedule.d.ts.map +1 -0
- package/src/shade/renderer/particles/warmup/warmup_schedule.js +55 -0
- package/src/shade/renderer/postprocess/PostProcess.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/PostProcess.js +2 -1
- package/src/shade/renderer/postprocess/ssr/REPROJECTION_PROPOSAL.md +286 -0
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +57 -21
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +230 -129
- package/src/shade/renderer/postprocess/ssr/SSRReprojectionMode.d.ts +11 -0
- package/src/shade/renderer/postprocess/ssr/SSRReprojectionMode.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/SSRReprojectionMode.js +6 -0
- package/src/shade/renderer/postprocess/ssr/chunk_ssr_metadata.d.ts +4 -0
- package/src/shade/renderer/postprocess/ssr/chunk_ssr_metadata.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/chunk_ssr_metadata.js +32 -0
- package/src/shade/renderer/postprocess/ssr/chunk_ssr_spatial_variance.d.ts +4 -0
- package/src/shade/renderer/postprocess/ssr/chunk_ssr_spatial_variance.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/chunk_ssr_spatial_variance.js +41 -0
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_reprojection.d.ts +3 -0
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_reprojection.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_reprojection.js +30 -0
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_sample_history.d.ts +4 -0
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_sample_history.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_sample_history.js +70 -0
- package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.d.ts +21 -0
- package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.js +363 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_get_neighbour_weight.js +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_Brick4.d.ts +2 -0
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_Brick4.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_Brick4.js +24 -0
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_IBL.d.ts +1 -6
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_IBL.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_IBL.js +16 -332
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_LPV.d.ts +1 -6
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_LPV.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_LPV.js +25 -358
- package/src/shade/renderer/postprocess/ssr/ssr_reproject_shader.d.ts +0 -5
- package/src/shade/renderer/postprocess/ssr/ssr_reproject_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/ssr_reproject_shader.js +201 -276
- package/src/shade/renderer/postprocess/ssr/ssr_spatial_denoise_shader.d.ts +1 -0
- package/src/shade/renderer/postprocess/ssr/ssr_spatial_denoise_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/ssr_spatial_denoise_shader.js +167 -143
- package/src/shade/renderer/shader/graph/graph_create_buffer.d.ts +15 -0
- package/src/shade/renderer/shader/graph/graph_create_buffer.d.ts.map +1 -0
- package/src/shade/renderer/shader/graph/graph_create_buffer.js +20 -0
- package/src/shade/renderer/view/GPUViewContext.d.ts +3 -4
- package/src/shade/renderer/view/GPUViewContext.d.ts.map +1 -1
- package/src/shade/renderer/view/GPUViewContext.js +5 -5
- package/src/core/binary/meshopt/__meshopt_test_streams.d.ts +0 -24
- package/src/core/binary/meshopt/__meshopt_test_streams.d.ts.map +0 -1
- package/src/core/binary/meshopt/__meshopt_test_streams.js +0 -237
- package/src/core/geom/3d/atlas/atlas_test_fixtures.d.ts +0 -84
- package/src/core/geom/3d/atlas/atlas_test_fixtures.d.ts.map +0 -1
- package/src/core/geom/3d/atlas/atlas_test_fixtures.js +0 -266
- package/src/engine/asset/loaders/gltf_test_fixtures.d.ts +0 -97
- package/src/engine/asset/loaders/gltf_test_fixtures.d.ts.map +0 -1
- package/src/engine/asset/loaders/gltf_test_fixtures.js +0 -359
- package/src/engine/sound/simulation/core/OcclusionSolver.d.ts +0 -29
- package/src/engine/sound/simulation/core/OcclusionSolver.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_test_fixtures.d.ts +0 -86
- package/src/shade/renderer/animation/skin_test_fixtures.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_test_fixtures.js +0 -250
- package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_test_fixtures.d.ts +0 -16
- package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_test_fixtures.d.ts.map +0 -1
- package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_layers_test_fixtures.js +0 -27
- package/src/shade/renderer/particles/particle_test_fixtures.d.ts +0 -151
- package/src/shade/renderer/particles/particle_test_fixtures.d.ts.map +0 -1
- package/src/shade/renderer/particles/particle_test_fixtures.js +0 -229
- package/src/shade/renderer/particles/shaders/chunk_particle_emitter_world_sphere.js +0 -23
- package/src/shade/renderer/postprocess/ssr/reproject/shader_ffx_denoiser_reflections_reproject.js +0 -457
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared inline glTF fixtures for the loader test suites — one triangle, in both of the containers
|
|
3
|
-
* the format ships in. Test-only; not imported by production code.
|
|
4
|
-
*
|
|
5
|
-
* The point of authoring the bytes here rather than checking a model in is that every field a loader
|
|
6
|
-
* reads is visible in one place: change the accessor and the test that depends on it says so.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { encode_meshopt_attributes } from "../../../core/binary/meshopt/__meshopt_test_streams.js";
|
|
10
|
-
import { align_4 } from "../../../core/binary/align_4.js";
|
|
11
|
-
|
|
12
|
-
export const GLTF_FIXTURE_NODE_NAME = 'unit_root';
|
|
13
|
-
export const GLTF_FIXTURE_MESH_NAME = 'unit_body';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Byte length of what {@link build_triangle_bin} produces — three positions, three normals, three
|
|
17
|
-
* texture coordinates and three indices, laid out back to back.
|
|
18
|
-
* @type {number}
|
|
19
|
-
*/
|
|
20
|
-
export const GLTF_FIXTURE_BIN_BYTE_LENGTH = 102;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @returns {ArrayBuffer}
|
|
24
|
-
*/
|
|
25
|
-
export function build_triangle_bin() {
|
|
26
|
-
const buffer = new ArrayBuffer(GLTF_FIXTURE_BIN_BYTE_LENGTH);
|
|
27
|
-
|
|
28
|
-
new Float32Array(buffer, 0, 9).set([0, 0, 0, 1, 0, 0, 0, 1, 0]);
|
|
29
|
-
new Float32Array(buffer, 36, 9).set([0, 0, 1, 0, 0, 1, 0, 0, 1]);
|
|
30
|
-
new Float32Array(buffer, 72, 6).set([0, 0, 1, 0, 0, 1]);
|
|
31
|
-
new Uint16Array(buffer, 96, 3).set([0, 1, 2]);
|
|
32
|
-
|
|
33
|
-
return buffer;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @param {string|undefined} buffer_uri `undefined` for a .glb, whose buffer is the binary chunk
|
|
38
|
-
* @returns {object}
|
|
39
|
-
*/
|
|
40
|
-
export function build_triangle_gltf_json(buffer_uri) {
|
|
41
|
-
return {
|
|
42
|
-
asset: { version: '2.0' },
|
|
43
|
-
scene: 0,
|
|
44
|
-
scenes: [{ nodes: [0] }],
|
|
45
|
-
nodes: [{ name: GLTF_FIXTURE_NODE_NAME, mesh: 0 }],
|
|
46
|
-
meshes: [{
|
|
47
|
-
name: GLTF_FIXTURE_MESH_NAME,
|
|
48
|
-
primitives: [{ attributes: { POSITION: 0, NORMAL: 1, TEXCOORD_0: 2 }, indices: 3 }]
|
|
49
|
-
}],
|
|
50
|
-
accessors: [
|
|
51
|
-
{
|
|
52
|
-
bufferView: 0, componentType: 5126, count: 3, type: 'VEC3',
|
|
53
|
-
min: [0, 0, 0], max: [1, 1, 0]
|
|
54
|
-
},
|
|
55
|
-
{ bufferView: 1, componentType: 5126, count: 3, type: 'VEC3' },
|
|
56
|
-
{ bufferView: 2, componentType: 5126, count: 3, type: 'VEC2' },
|
|
57
|
-
{ bufferView: 3, componentType: 5123, count: 3, type: 'SCALAR' }
|
|
58
|
-
],
|
|
59
|
-
bufferViews: [
|
|
60
|
-
{ buffer: 0, byteOffset: 0, byteLength: 36 },
|
|
61
|
-
{ buffer: 0, byteOffset: 36, byteLength: 36 },
|
|
62
|
-
{ buffer: 0, byteOffset: 72, byteLength: 24 },
|
|
63
|
-
{ buffer: 0, byteOffset: 96, byteLength: 6 }
|
|
64
|
-
],
|
|
65
|
-
buffers: [buffer_uri === undefined
|
|
66
|
-
? { byteLength: GLTF_FIXTURE_BIN_BYTE_LENGTH }
|
|
67
|
-
: { uri: buffer_uri, byteLength: GLTF_FIXTURE_BIN_BYTE_LENGTH }]
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* The same model with a base-colour texture on it, so that a test can watch what an image costs.
|
|
73
|
-
*
|
|
74
|
-
* The texture names its image the way the game's own models do — a `source` index into `images`,
|
|
75
|
-
* whose entry carries a relative `uri` — because that is the shape {@link gltf_used_image_indices}
|
|
76
|
-
* decides against a DDS sibling with, and the one whose bytes have to come from somewhere.
|
|
77
|
-
*
|
|
78
|
-
* @param {string} buffer_uri
|
|
79
|
-
* @param {string} image_uri
|
|
80
|
-
* @returns {object}
|
|
81
|
-
*/
|
|
82
|
-
export function build_textured_triangle_gltf_json(buffer_uri, image_uri) {
|
|
83
|
-
const json = build_triangle_gltf_json(buffer_uri);
|
|
84
|
-
|
|
85
|
-
json.meshes[0].primitives[0].material = 0;
|
|
86
|
-
|
|
87
|
-
json.materials = [{
|
|
88
|
-
name: 'unit_skin',
|
|
89
|
-
pbrMetallicRoughness: { baseColorTexture: { index: 0 } }
|
|
90
|
-
}];
|
|
91
|
-
|
|
92
|
-
json.textures = [{ source: 0, sampler: 0 }];
|
|
93
|
-
json.samplers = [{}];
|
|
94
|
-
json.images = [{ uri: image_uri, mimeType: 'image/png' }];
|
|
95
|
-
|
|
96
|
-
return json;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* The same model as a .glb — the JSON chunk followed by the binary one.
|
|
101
|
-
*
|
|
102
|
-
* @returns {ArrayBuffer}
|
|
103
|
-
*/
|
|
104
|
-
export function build_triangle_glb() {
|
|
105
|
-
const json_bytes = new TextEncoder().encode(JSON.stringify(build_triangle_gltf_json(undefined)));
|
|
106
|
-
|
|
107
|
-
// both chunks are padded to a four byte boundary, per the container's own rule
|
|
108
|
-
const json_length = align_4(json_bytes.byteLength);
|
|
109
|
-
|
|
110
|
-
const bin = new Uint8Array(build_triangle_bin());
|
|
111
|
-
const bin_length = align_4(bin.byteLength);
|
|
112
|
-
|
|
113
|
-
const total = 12 + 8 + json_length + 8 + bin_length;
|
|
114
|
-
|
|
115
|
-
const glb = new ArrayBuffer(total);
|
|
116
|
-
const view = new DataView(glb);
|
|
117
|
-
const bytes = new Uint8Array(glb);
|
|
118
|
-
|
|
119
|
-
view.setUint32(0, 0x46546C67, true);
|
|
120
|
-
view.setUint32(4, 2, true);
|
|
121
|
-
view.setUint32(8, total, true);
|
|
122
|
-
|
|
123
|
-
view.setUint32(12, json_length, true);
|
|
124
|
-
view.setUint32(16, 0x4E4F534A, true);
|
|
125
|
-
bytes.set(json_bytes, 20);
|
|
126
|
-
bytes.fill(0x20, 20 + json_bytes.byteLength, 20 + json_length);
|
|
127
|
-
|
|
128
|
-
const bin_header = 20 + json_length;
|
|
129
|
-
|
|
130
|
-
view.setUint32(bin_header, bin_length, true);
|
|
131
|
-
view.setUint32(bin_header + 4, 0x004E4942, true);
|
|
132
|
-
bytes.set(bin, bin_header + 8);
|
|
133
|
-
|
|
134
|
-
return glb;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/*
|
|
138
|
-
The same triangle, compressed. Both meshopt extensions are bufferView extensions, so the model is
|
|
139
|
-
unchanged above the bufferViews: same nodes, same mesh, same accessors, same uncompressed layout
|
|
140
|
-
declared on the parent views. What differs is where the bytes come from.
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Byte length of the placeholder the compressed views point at. It has to be big enough to hold
|
|
145
|
-
* every uncompressed view referencing it, which is the same 102 bytes {@link build_triangle_bin}
|
|
146
|
-
* lays out.
|
|
147
|
-
* @type {number}
|
|
148
|
-
*/
|
|
149
|
-
export const GLTF_FIXTURE_FALLBACK_BYTE_LENGTH = GLTF_FIXTURE_BIN_BYTE_LENGTH;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* YCoCg colour for the three vertices, as the `COLOR` filter takes it: luma, the two chroma
|
|
153
|
-
* differences (signed), and an alpha whose most significant set bit declares the precision.
|
|
154
|
-
* @type {number[]}
|
|
155
|
-
*/
|
|
156
|
-
const GLTF_FIXTURE_YCOCG = [
|
|
157
|
-
100, 50, -20 & 0xff, 0xff,
|
|
158
|
-
200, 0, 0, 0xff,
|
|
159
|
-
60, -30 & 0xff, 10, 0xc0
|
|
160
|
-
];
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* What those decode to: R = Y + Co - Cg, G = Y + Cg, B = Y - Co - Cg, with alpha widened by the bit
|
|
164
|
-
* its marker cost it.
|
|
165
|
-
* @type {number[]}
|
|
166
|
-
*/
|
|
167
|
-
export const GLTF_FIXTURE_COLOURS = [
|
|
168
|
-
170, 80, 70, 255,
|
|
169
|
-
200, 200, 200, 255,
|
|
170
|
-
20, 70, 80, 128
|
|
171
|
-
];
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* The compressed streams, laid out back to back.
|
|
175
|
-
*
|
|
176
|
-
* Positions, normals and texture coordinates go through the attribute codec; the indices are a
|
|
177
|
-
* hand-written triangle stream, because writing a triangle encoder to test a triangle decoder with
|
|
178
|
-
* would prove nothing. `0xf0` reads entry 0 of the lookup table, which is `0x00` - three fresh
|
|
179
|
-
* vertices, which is exactly (0, 1, 2).
|
|
180
|
-
*
|
|
181
|
-
* At `codec_version` 1 the attribute streams carry a channel mode each - a rotated exclusive-or for
|
|
182
|
-
* the positions, plain byte deltas for the normals, 16-bit deltas for the texture coordinates - and
|
|
183
|
-
* with `colour` there is a `COLOR`-filtered stream too. Either makes a file that only
|
|
184
|
-
* `KHR_meshopt_compression` defines, and that the vendor extension refuses.
|
|
185
|
-
*
|
|
186
|
-
* @param {Object} [options]
|
|
187
|
-
* @param {number} [options.codec_version] 0 or 1
|
|
188
|
-
* @param {boolean} [options.colour] append a `COLOR_0` stream carrying the `COLOR` filter
|
|
189
|
-
* @returns {{buffer: ArrayBuffer, ranges: {byteOffset:number, byteLength:number}[]}}
|
|
190
|
-
*/
|
|
191
|
-
export function build_meshopt_triangle_bin({ codec_version = 0, colour = false } = {}) {
|
|
192
|
-
const bin = build_triangle_bin();
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @param {number[]} modes
|
|
196
|
-
* @returns {Object}
|
|
197
|
-
*/
|
|
198
|
-
const attributes = (modes) => codec_version === 1
|
|
199
|
-
? { version: 1, channel_modes: modes }
|
|
200
|
-
: { version: 0 };
|
|
201
|
-
|
|
202
|
-
const streams = [
|
|
203
|
-
encode_meshopt_attributes(new Uint8Array(bin, 0, 36), 3, 12, attributes([
|
|
204
|
-
2 | (5 << 4), 2 | (5 << 4), 2 | (5 << 4)
|
|
205
|
-
])),
|
|
206
|
-
encode_meshopt_attributes(new Uint8Array(bin, 36, 36), 3, 12, attributes([0, 0, 0])),
|
|
207
|
-
encode_meshopt_attributes(new Uint8Array(bin, 72, 24), 3, 8, attributes([1, 1])),
|
|
208
|
-
new Uint8Array([0xe1, 0xf0, ...new Array(16).fill(0)])
|
|
209
|
-
];
|
|
210
|
-
|
|
211
|
-
if (colour) {
|
|
212
|
-
streams.push(encode_meshopt_attributes(new Uint8Array(GLTF_FIXTURE_YCOCG), 3, 4, attributes([0])));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const total = streams.reduce((sum, stream) => sum + stream.length, 0);
|
|
216
|
-
|
|
217
|
-
const bytes = new Uint8Array(total);
|
|
218
|
-
|
|
219
|
-
const ranges = [];
|
|
220
|
-
|
|
221
|
-
let byteOffset = 0;
|
|
222
|
-
|
|
223
|
-
for (const stream of streams) {
|
|
224
|
-
bytes.set(stream, byteOffset);
|
|
225
|
-
|
|
226
|
-
ranges.push({ byteOffset, byteLength: stream.length });
|
|
227
|
-
|
|
228
|
-
byteOffset += stream.length;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return { buffer: bytes.buffer, ranges };
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* @param {string} extension_name `EXT_meshopt_compression` or `KHR_meshopt_compression`
|
|
236
|
-
* @param {string|undefined} buffer_uri `undefined` for a .glb, whose compressed data is the binary chunk
|
|
237
|
-
* @param {Object} [options] see {@link build_meshopt_triangle_bin}
|
|
238
|
-
* @param {number} [options.codec_version]
|
|
239
|
-
* @param {boolean} [options.colour]
|
|
240
|
-
* @returns {object}
|
|
241
|
-
*/
|
|
242
|
-
export function build_meshopt_triangle_gltf_json(extension_name, buffer_uri, options = {}) {
|
|
243
|
-
const { buffer, ranges } = build_meshopt_triangle_bin(options);
|
|
244
|
-
|
|
245
|
-
const json = build_triangle_gltf_json(undefined);
|
|
246
|
-
|
|
247
|
-
json.extensionsUsed = [extension_name];
|
|
248
|
-
json.extensionsRequired = [extension_name];
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* @param {number} view the parent view's index
|
|
252
|
-
* @param {number} byteStride
|
|
253
|
-
* @param {number} count
|
|
254
|
-
* @param {string} mode
|
|
255
|
-
* @returns {object}
|
|
256
|
-
*/
|
|
257
|
-
function compressed(view, byteStride, count, mode) {
|
|
258
|
-
return {
|
|
259
|
-
buffer: 0,
|
|
260
|
-
byteOffset: ranges[view].byteOffset,
|
|
261
|
-
byteLength: ranges[view].byteLength,
|
|
262
|
-
byteStride,
|
|
263
|
-
count,
|
|
264
|
-
mode
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
const shapes = [
|
|
269
|
-
[12, 3, 'ATTRIBUTES', undefined],
|
|
270
|
-
[12, 3, 'ATTRIBUTES', undefined],
|
|
271
|
-
[8, 3, 'ATTRIBUTES', undefined],
|
|
272
|
-
[2, 3, 'TRIANGLES', undefined]
|
|
273
|
-
];
|
|
274
|
-
|
|
275
|
-
if (options.colour === true) {
|
|
276
|
-
// an unsigned normalised VEC4, which is what the COLOR filter decodes to
|
|
277
|
-
json.bufferViews.push({ buffer: 0, byteOffset: 102, byteLength: 12 });
|
|
278
|
-
|
|
279
|
-
json.accessors.push({
|
|
280
|
-
bufferView: 4, componentType: 5121, count: 3, type: 'VEC4', normalized: true
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
json.meshes[0].primitives[0].attributes.COLOR_0 = 4;
|
|
284
|
-
|
|
285
|
-
shapes.push([4, 3, 'ATTRIBUTES', 'COLOR']);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
json.bufferViews = json.bufferViews.map((view, i) => {
|
|
289
|
-
const [byteStride, count, mode, filter] = shapes[i];
|
|
290
|
-
|
|
291
|
-
return {
|
|
292
|
-
...view,
|
|
293
|
-
// the placeholder, which nothing reads once the views below are decoded
|
|
294
|
-
buffer: 1,
|
|
295
|
-
// index views are forbidden a stride by the base format, whatever the extension needs
|
|
296
|
-
...(mode === 'ATTRIBUTES' ? { byteStride } : {}),
|
|
297
|
-
extensions: {
|
|
298
|
-
[extension_name]: {
|
|
299
|
-
...compressed(i, byteStride, count, mode),
|
|
300
|
-
...(filter === undefined ? {} : { filter })
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
json.buffers = [
|
|
307
|
-
buffer_uri === undefined
|
|
308
|
-
? { byteLength: buffer.byteLength }
|
|
309
|
-
: { uri: buffer_uri, byteLength: buffer.byteLength },
|
|
310
|
-
{
|
|
311
|
-
// big enough for every uncompressed view over it, which is what both specs require
|
|
312
|
-
byteLength: GLTF_FIXTURE_FALLBACK_BYTE_LENGTH + (options.colour === true ? 12 : 0),
|
|
313
|
-
extensions: { [extension_name]: { fallback: true } }
|
|
314
|
-
}
|
|
315
|
-
];
|
|
316
|
-
|
|
317
|
-
return json;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* The compressed model as a .glb: the JSON chunk, then the compressed data as the binary one.
|
|
322
|
-
*
|
|
323
|
-
* @param {string} extension_name
|
|
324
|
-
* @param {Object} [options] see {@link build_meshopt_triangle_bin}
|
|
325
|
-
* @returns {ArrayBuffer}
|
|
326
|
-
*/
|
|
327
|
-
export function build_meshopt_triangle_glb(extension_name, options = {}) {
|
|
328
|
-
const json_bytes = new TextEncoder().encode(
|
|
329
|
-
JSON.stringify(build_meshopt_triangle_gltf_json(extension_name, undefined, options))
|
|
330
|
-
);
|
|
331
|
-
|
|
332
|
-
const json_length = align_4(json_bytes.byteLength);
|
|
333
|
-
|
|
334
|
-
const bin = new Uint8Array(build_meshopt_triangle_bin(options).buffer);
|
|
335
|
-
const bin_length = align_4(bin.byteLength);
|
|
336
|
-
|
|
337
|
-
const total = 12 + 8 + json_length + 8 + bin_length;
|
|
338
|
-
|
|
339
|
-
const glb = new ArrayBuffer(total);
|
|
340
|
-
const view = new DataView(glb);
|
|
341
|
-
const bytes = new Uint8Array(glb);
|
|
342
|
-
|
|
343
|
-
view.setUint32(0, 0x46546C67, true);
|
|
344
|
-
view.setUint32(4, 2, true);
|
|
345
|
-
view.setUint32(8, total, true);
|
|
346
|
-
|
|
347
|
-
view.setUint32(12, json_length, true);
|
|
348
|
-
view.setUint32(16, 0x4E4F534A, true);
|
|
349
|
-
bytes.set(json_bytes, 20);
|
|
350
|
-
bytes.fill(0x20, 20 + json_bytes.byteLength, 20 + json_length);
|
|
351
|
-
|
|
352
|
-
const bin_header = 20 + json_length;
|
|
353
|
-
|
|
354
|
-
view.setUint32(bin_header, bin_length, true);
|
|
355
|
-
view.setUint32(bin_header + 4, 0x004E4942, true);
|
|
356
|
-
bytes.set(bin, bin_header + 8);
|
|
357
|
-
|
|
358
|
-
return glb;
|
|
359
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Computes per-source occlusion + transmission by shooting rays from the listener toward points spread
|
|
3
|
-
* over the source's sphere and counting how many are blocked by the {@link AcousticOccluderIndex}.
|
|
4
|
-
*
|
|
5
|
-
* - Volumetric (not boolean): occlusion is the FRACTION of blocked rays, so partially-hidden sources
|
|
6
|
-
* attenuate smoothly instead of popping on/off.
|
|
7
|
-
* - Transmission: blocked rays accumulate their occluder's per-band transmission; the average is the
|
|
8
|
-
* energy that leaks through.
|
|
9
|
-
* - Temporal: the fibonacci sample set is randomly re-oriented each tick (seeded), and the result is
|
|
10
|
-
* folded into an {@link AcousticSourceState} via EMA — so a low per-tick ray count integrates over
|
|
11
|
-
* frames and the output stays frame-stable.
|
|
12
|
-
*
|
|
13
|
-
* Pure: geometry in, numbers out. No WebAudio, no ECS, no allocation.
|
|
14
|
-
*/
|
|
15
|
-
export class OcclusionSolver {
|
|
16
|
-
/**
|
|
17
|
-
* @param {Vector3} listener listener world position
|
|
18
|
-
* @param {Vector3} source source world position
|
|
19
|
-
* @param {number} sourceRadius apparent radius of the source (0 = point source → boolean occlusion)
|
|
20
|
-
* @param {AcousticOccluderIndex} index
|
|
21
|
-
* @param {number} rayCount rays shot this tick (≥ 1)
|
|
22
|
-
* @param {number} smoothing EMA factor in (0, 1] — 1 = no smoothing
|
|
23
|
-
* @param {function():number} random seeded RNG; decorrelates the sample set per call
|
|
24
|
-
* @param {AcousticSourceState} state per-source temporal accumulation (mutated)
|
|
25
|
-
* @param {AcousticSolution} out occlusion + transmission written here (medium untouched)
|
|
26
|
-
*/
|
|
27
|
-
solve(listener: Vector3, source: Vector3, sourceRadius: number, index: AcousticOccluderIndex, rayCount: number, smoothing: number, random: () => number, state: AcousticSourceState, out: AcousticSolution): void;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=OcclusionSolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OcclusionSolver.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/simulation/core/OcclusionSolver.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;GAaG;AACH;IACI;;;;;;;;;;OAUG;IACH,wDARW,MAAM,0CAEN,MAAM,aACN,MAAM,gBACK,MAAM,2DA4F3B;CACJ"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A rigged character in one of the two shapes.
|
|
3
|
-
*
|
|
4
|
-
* The rest pose **is** the bind pose, which is what a well-formed file has. The bind matrices are
|
|
5
|
-
* taken off the skeleton itself rather than composed by hand: the fixture walks the hierarchy once
|
|
6
|
-
* with the root's conversion in place and once without, and the two snapshots *are* the two bind
|
|
7
|
-
* spaces. Nothing here can drift from the hierarchy it describes, because it is read from it.
|
|
8
|
-
*
|
|
9
|
-
* The placement node goes on last, after the bind matrices are settled — which is what happens for
|
|
10
|
-
* real, and is what makes "the correction does not depend on where the character stands" a fact this
|
|
11
|
-
* fixture can be asked about rather than an assumption.
|
|
12
|
-
*
|
|
13
|
-
* @param {object} options
|
|
14
|
-
* @param {BindSpace} options.bind_space
|
|
15
|
-
* @param {number} [options.scale] the root's uniform conversion
|
|
16
|
-
* @param {boolean} [options.up_axis_rotation] whether the root also carries the −90° about x that an
|
|
17
|
-
* FBX-derived file pairs with its conversion. On by default: a correction that handles only
|
|
18
|
-
* the scale passes without it.
|
|
19
|
-
* @param {number[]} [options.placement] a translation applied above the whole character
|
|
20
|
-
* @returns {{
|
|
21
|
-
* placement: Node3D,
|
|
22
|
-
* root: Node3D,
|
|
23
|
-
* mesh: SkinnedMesh,
|
|
24
|
-
* skin: Skin,
|
|
25
|
-
* joints: Node3D[],
|
|
26
|
-
* }}
|
|
27
|
-
*/
|
|
28
|
-
export function make_character({ bind_space, scale, up_axis_rotation, placement, }: {
|
|
29
|
-
bind_space: BindSpace;
|
|
30
|
-
scale?: number;
|
|
31
|
-
up_axis_rotation?: boolean;
|
|
32
|
-
placement?: number[];
|
|
33
|
-
}): {
|
|
34
|
-
placement: Node3D;
|
|
35
|
-
root: Node3D;
|
|
36
|
-
mesh: SkinnedMesh;
|
|
37
|
-
skin: Skin;
|
|
38
|
-
joints: Node3D[];
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* The two shapes a glTF character actually arrives in, built as scene graphs.
|
|
42
|
-
*
|
|
43
|
-
* Both are legal glTF and both are in the wild; the difference is only the space the file's author
|
|
44
|
-
* wrote the inverse-bind matrices in, and it decides whether `inverse(mesh.global) × joint.global ×
|
|
45
|
-
* inverse_bind` — the matrix the skinning pass converts to a dual quaternion — comes out rigid. See
|
|
46
|
-
* `SKINNING_FRAME_PLAN.md`.
|
|
47
|
-
*
|
|
48
|
-
* One hierarchy serves both, because the difference is not in the hierarchy:
|
|
49
|
-
*
|
|
50
|
-
* ```
|
|
51
|
-
* "placement" added at runtime, above the file's own roots
|
|
52
|
-
* └── "Character" the file's unit conversion and up-axis rotation
|
|
53
|
-
* ├── "Mesh" the skinned mesh, no local transform of its own
|
|
54
|
-
* └── "Joint0" the joint root — the mesh node's *sibling*, as every rigged glTF has it
|
|
55
|
-
* └── "Joint1"
|
|
56
|
-
* └── "Joint2"
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* @author Alex Goldring
|
|
60
|
-
* @copyright Company Named Limited (c) 2026
|
|
61
|
-
*/
|
|
62
|
-
/**
|
|
63
|
-
* What every one of this game's creature models puts on its glTF root node — an FBX unit
|
|
64
|
-
* conversion, uniform, and inherited by the joints and the mesh node alike.
|
|
65
|
-
*
|
|
66
|
-
* @type {number}
|
|
67
|
-
*/
|
|
68
|
-
export const EXPORT_SCALE: number;
|
|
69
|
-
/**
|
|
70
|
-
* The centimetre→metre conversion `Michelle.glb` carries on hers.
|
|
71
|
-
*
|
|
72
|
-
* @type {number}
|
|
73
|
-
*/
|
|
74
|
-
export const MICHELLE_SCALE: number;
|
|
75
|
-
/**
|
|
76
|
-
* Where the file's author wrote the inverse-bind matrices.
|
|
77
|
-
*/
|
|
78
|
-
export type BindSpace = string;
|
|
79
|
-
export namespace BindSpace {
|
|
80
|
-
let PreScale: string;
|
|
81
|
-
let World: string;
|
|
82
|
-
}
|
|
83
|
-
import { Node3D } from "../scene/Node3D.js";
|
|
84
|
-
import { SkinnedMesh } from "../scene/SkinnedMesh.js";
|
|
85
|
-
import { Skin } from "./Skin.js";
|
|
86
|
-
//# sourceMappingURL=skin_test_fixtures.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skin_test_fixtures.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/skin_test_fixtures.js"],"names":[],"mappings":"AAsFA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IAd8B,UAAU,EAA7B,SAAS;IACQ,KAAK,GAAtB,MAAM;IACY,gBAAgB,GAAlC,OAAO;IAGY,SAAS,GAA5B,MAAM,EAAE;;eAED,MAAM;UACX,MAAM;UACN,WAAW;UACX,IAAI;YACF,MAAM,EAAE;EAgFtB;AAjLD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;GAKG;AACH,2BAFU,MAAM,CAEiB;AAEjC;;;;GAIG;AACH,6BAFU,MAAM,CAEmB;;;;wBAKzB,MAAM;;;;;uBA7CO,oBAAoB;4BACf,yBAAyB;qBAChC,WAAW"}
|