@woosh/meep-engine 3.33.0 → 3.34.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/Editor.d.ts.map +1 -1
- package/editor/Editor.js +0 -3
- package/editor/ecs/component/prototypeObjectEditor.js +1 -165
- package/editor/ecs/component/registerBasicTypeEditors.d.ts.map +1 -1
- package/editor/ecs/component/registerBasicTypeEditors.js +0 -5
- package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -1
- package/editor/ecs/component/registerEngineComponentEditors.js +0 -20
- package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -1
- package/editor/process/SymbolicDisplayProcess.js +100 -106
- package/editor/prototypeEditorShell.d.ts.map +1 -1
- package/editor/prototypeEditorShell.js +190 -186
- package/editor/templates/entity_templates.d.ts.map +1 -1
- package/editor/templates/entity_templates.js +10 -27
- package/editor/view/makeEntityDecorators.js +2 -2
- package/package.json +1 -1
- package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.d.ts +3 -3
- package/src/core/geom/3d/aabb/MovingBoundingBox.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.js +5 -5
- package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts +3 -0
- package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGBA_LUT_HEATMAP_IR.js +1 -1
- package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts +6 -0
- package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_INFERNO.js +1 -1
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.d.ts +1 -1
- package/src/core/math/lookup/RGB_LUT_TURBO.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.js +1 -1
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.d.ts +1 -1
- package/src/core/math/lookup/RGB_LUT_VIRIDIS.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.js +1 -1
- package/src/engine/animation/AnimatedActions.d.ts.map +1 -1
- package/src/engine/animation/AnimatedActions.js +2 -4
- package/src/engine/animation/AnimationUtils.d.ts +1 -17
- package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
- package/src/engine/animation/AnimationUtils.js +138 -246
- package/src/engine/ecs/EntityManager.d.ts +1 -1
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +2 -2
- package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +268 -275
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +0 -10
- package/src/engine/graphics/geometry/distribute_points_on_indexed_triangles.d.ts.map +1 -0
- package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.js +3 -3
- package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/lut_to_sampler.d.ts.map +1 -0
- package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.js +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +0 -3
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +0 -3
- package/src/engine/network/NetworkSession.d.ts +1 -1
- package/src/engine/network/NetworkSession.js +1 -1
- package/src/engine/physics/cloth/MEASUREMENTS.md +115 -0
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +2 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +9 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +30 -7
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +12 -2
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +11 -2
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/LiveEmitterSet.js +14 -7
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts +6 -15
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.js +161 -174
- package/src/shade/device/mock/SoftwareGPUBuffer.d.ts +5 -3
- package/src/shade/device/mock/SoftwareGPUBuffer.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUBuffer.js +32 -3
- package/src/shade/playground/caldera/main.js +73 -60
- package/src/shade/playground/vgeo_runtime/main.js +25 -77
- package/src/shade/playground/vgeo_scene/main.js +2231 -2217
- package/src/shade/renderer/GraphicsContext.d.ts +7 -0
- package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
- package/src/shade/renderer/GraphicsContext.js +11 -2
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +38 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +8 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +21 -0
- package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.js +9 -10
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +5 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +25 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +115 -101
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +282 -140
- package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +30 -0
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +4 -1
- package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +536 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +6 -2
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +68 -19
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts +2 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +17 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts +4 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +42 -12
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +93 -12
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +166 -20
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +30 -7
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +12 -5
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +23 -13
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.js +1 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +1 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +10 -6
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +45 -17
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +61 -19
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +8 -11
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +9 -16
- 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 +25 -10
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +10 -8
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +19 -7
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts +4 -2
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.js +4 -2
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts +4 -0
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.js +7 -0
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +1 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.js +2 -0
- package/src/shade/renderer/particles/DESIGN.md +4 -10
- package/src/shade/renderer/particles/ParticleConstants.d.ts +1 -3
- package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
- package/src/shade/renderer/particles/ParticleConstants.js +1 -3
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts +3 -4
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +3 -4
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +45 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +99 -0
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts +4 -4
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.js +36 -36
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts +15 -0
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.js +103 -0
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts +3 -0
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.js +6 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +26 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +91 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts +22 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.js +102 -0
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts +2 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +28 -24
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +32 -28
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +9 -105
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +5 -0
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +11 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +11 -3
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +93 -21
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +4 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +5 -23
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +63 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts +12 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.js +11 -0
- package/src/shade/renderer/shadow/map/Shadowmap.d.ts +15 -0
- package/src/shade/renderer/shadow/map/Shadowmap.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/Shadowmap.js +17 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts +25 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.js +22 -0
- package/src/shade/renderer/shadow/map/shadowmap_update_score.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shadowmap_update_score.js +5 -2
- package/src/shade/renderer/texture/TextureManager.d.ts +2 -1
- package/src/shade/renderer/texture/TextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/TextureManager.js +4 -1
- package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +1 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts +9 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts.map +1 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.js +55 -5
- package/src/shade/renderer/view/ViewManager.d.ts +7 -1
- package/src/shade/renderer/view/ViewManager.d.ts.map +1 -1
- package/src/shade/renderer/view/ViewManager.js +17 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +1 -0
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +0 -20
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +0 -35
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +0 -12
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +0 -17
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +0 -14
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.js +0 -18
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +0 -52
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +0 -58
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +0 -47
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.js +0 -58
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +0 -16
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.js +0 -21
- package/editor/particles/rebuildParticleEmitter.d.ts +0 -11
- package/editor/particles/rebuildParticleEmitter.d.ts.map +0 -1
- package/editor/particles/rebuildParticleEmitter.js +0 -31
- package/editor/process/ParticleEmitterRebuildProcess.d.ts +0 -66
- package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +0 -1
- package/editor/process/ParticleEmitterRebuildProcess.js +0 -217
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts +0 -18
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts.map +0 -1
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.js +0 -140
- package/src/engine/animation/removeEntityGenericEffect.d.ts +0 -18
- package/src/engine/animation/removeEntityGenericEffect.d.ts.map +0 -1
- package/src/engine/animation/removeEntityGenericEffect.js +0 -160
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts +0 -16
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts.map +0 -1
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +0 -194
- package/src/engine/graphics/ecs/sprite/Sprite.d.ts +0 -15
- package/src/engine/graphics/ecs/sprite/Sprite.d.ts.map +0 -1
- package/src/engine/graphics/ecs/sprite/Sprite.js +0 -14
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts +0 -11
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +0 -1
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +0 -144
- package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +0 -61
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +0 -229
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.js +0 -8
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.js +0 -9
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js +0 -12
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts +0 -3
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.js +0 -84
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +0 -285
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +0 -1201
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js +0 -67
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +0 -197
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +0 -398
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.js +0 -4
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +0 -162
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +0 -472
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +0 -10
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +0 -37
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.js +0 -25
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.js +0 -28
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.js +0 -162
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.js +0 -103
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts +0 -8
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.js +0 -28
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.js +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts +0 -60
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +0 -128
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +0 -47
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.js +0 -77
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +0 -45
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.js +0 -93
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +0 -95
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.js +0 -239
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts +0 -3
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_TURBO.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_VIRIDIS.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.js +0 -28
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.js +0 -24
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.js +0 -27
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts +0 -33
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.js +0 -80
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +0 -49
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +0 -135
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts +0 -7
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.js +0 -14
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts +0 -41
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.js +0 -59
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.js +0 -56
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.js +0 -84
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js +0 -80
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts +0 -29
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js +0 -43
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js +0 -104
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.js +0 -11
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.js +0 -64
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js +0 -172
- package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +0 -20
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +0 -84
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +0 -81
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.js +0 -200
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.js +0 -8
- package/src/engine/graphics/particles/particular/engine/utils/volume/lut_to_sampler.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/Operation.d.ts +0 -20
- package/src/engine/graphics/particles/particular/group/Operation.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/Operation.js +0 -20
- package/src/engine/graphics/particles/particular/group/OperationType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/OperationType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/OperationType.js +0 -9
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts +0 -27
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.js +0 -27
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts +0 -8
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.js +0 -11
- package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleDataType.js +0 -10
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts +0 -24
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +0 -48
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.js +0 -20
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts +0 -6
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +0 -162
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts +0 -8
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.js +0 -19
- package/src/engine/graphics3/ParticleEmitterSystem.d.ts +0 -77
- package/src/engine/graphics3/ParticleEmitterSystem.d.ts.map +0 -1
- package/src/engine/graphics3/ParticleEmitterSystem.js +0 -307
- package/src/engine/graphics3/ParticleEmitterSystem3.d.ts +0 -10
- package/src/engine/graphics3/ParticleEmitterSystem3.d.ts.map +0 -1
- package/src/engine/graphics3/ParticleEmitterSystem3.js +0 -10
- package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts +0 -61
- package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts.map +0 -1
- package/src/engine/graphics3/particles/GPUParticularRenderer.js +0 -627
- package/src/engine/graphics3/particles/particle_gpu_records.d.ts +0 -85
- package/src/engine/graphics3/particles/particle_gpu_records.d.ts.map +0 -1
- package/src/engine/graphics3/particles/particle_gpu_records.js +0 -227
- package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts +0 -35
- package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts.map +0 -1
- package/src/shade/renderer/particles/shaders/shader_particle_render.js +0 -135
- /package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"particle_gpu_records.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics3/particles/particle_gpu_records.js"],"names":[],"mappings":"AAiDA;;;;;;;;;;;GAWG;AACH,+DAHW,YAAY,GACV,MAAM,CAQlB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IALoC,YAAY,EAArC,UAAU,MAAM,CAAC;IACH,KAAK,EAAnB,MAAM;IACS,UAAU,EAAzB,OAAO;IACL,MAAM,CAwClB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,6CATW,WAAW,YACX,YAAY,cACZ,MAAM,2CAEN,MAAM,EAAE,gBACR,MAAM,EAAE,aACR,MAAM,EAAE,GACN,MAAM,CA4ElB;AA1MD;;;;;;;GAOG;AACH,qCAFU,MAAM,CAEwB;AAExC;;GAEG;AACH,iCAFU,MAAM,CAEoB;AAEpC;;GAEG;AACH,kCAFU,MAAM,CAEqB;AAErC;;GAEG;AACH,qCAFU,MAAM,CAEwB;6BA9CX,gDAAgD"}
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../../core/assert.js";
|
|
2
|
-
import { BlendingType } from "../../graphics/texture/sampler/BlendingType.js";
|
|
3
|
-
import {
|
|
4
|
-
PARTICLE_ATTRIBUTE_COLOR,
|
|
5
|
-
PARTICLE_ATTRIBUTE_LAYER_POSITION,
|
|
6
|
-
PARTICLE_ATTRIBUTE_POSITION,
|
|
7
|
-
PARTICLE_ATTRIBUTE_ROTATION,
|
|
8
|
-
PARTICLE_ATTRIBUTE_SIZE,
|
|
9
|
-
PARTICLE_ATTRIBUTE_VELOCITY
|
|
10
|
-
} from "../../graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js";
|
|
11
|
-
import { ParticleEmitterFlag } from "../../graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js";
|
|
12
|
-
import {
|
|
13
|
-
EMITTER_ATTRIBUTE_ABSENT,
|
|
14
|
-
EMITTER_BLEND,
|
|
15
|
-
EMITTER_PROJECTION,
|
|
16
|
-
make_emitter_flags
|
|
17
|
-
} from "../../../shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js";
|
|
18
|
-
import { PARTICLE_GENERATION_FIRST } from "../../../shade/renderer/particles/data/particle_header.js";
|
|
19
|
-
import { NODE3D_SCENE_ID } from "../../../shade/renderer/scene/NODE3D_STRUCT.js";
|
|
20
|
-
import {
|
|
21
|
-
PARTICLE_RECORD_HEADER_EMITTER,
|
|
22
|
-
PARTICLE_RECORD_WORD_COUNT
|
|
23
|
-
} from "../../../shade/renderer/particles/ParticleConstants.js";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Where each attribute the billboard renderer reads sits inside a particle record, in words.
|
|
27
|
-
*
|
|
28
|
-
* The record is 32 words and the renderer is told where to find what, so these are ours to choose;
|
|
29
|
-
* word 0 is the header the renderer reads the owning emitter from.
|
|
30
|
-
*
|
|
31
|
-
* @type {number}
|
|
32
|
-
*/
|
|
33
|
-
export const PARTICLE_WORD_POSITION = 1;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @type {number}
|
|
37
|
-
*/
|
|
38
|
-
export const PARTICLE_WORD_SIZE = 4;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @type {number}
|
|
42
|
-
*/
|
|
43
|
-
export const PARTICLE_WORD_COLOR = 5;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @type {number}
|
|
47
|
-
*/
|
|
48
|
-
export const PARTICLE_WORD_ROTATION = 9;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* How a meep blending mode is drawn by the billboard renderer, which expresses every mode it has
|
|
52
|
-
* through one premultiplied blend state.
|
|
53
|
-
*
|
|
54
|
-
* **Subtract and Multiply arrive as additive**, which is what the legacy renderer does with them:
|
|
55
|
-
* its shader tests `blending > 0.1` and treats everything above that as additive. Neither renderer
|
|
56
|
-
* can express them in a single pass, the content was authored against what the game shows, and
|
|
57
|
-
* exactly one emitter in the game asks for Multiply.
|
|
58
|
-
*
|
|
59
|
-
* @param {BlendingType} blending_type
|
|
60
|
-
* @returns {number} a member of {@link EMITTER_BLEND}
|
|
61
|
-
*/
|
|
62
|
-
export function blending_type_to_particle_blend(blending_type) {
|
|
63
|
-
if (blending_type === BlendingType.Normal || blending_type === BlendingType.NoBlending) {
|
|
64
|
-
return EMITTER_BLEND.ALPHA;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return EMITTER_BLEND.ADDITIVE;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* One particle layer as a row of the emitter table
|
|
72
|
-
* ({@link ../../../shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js}).
|
|
73
|
-
*
|
|
74
|
-
* **A record per layer, not per emitter.** The renderer reads the sprite's atlas rectangle from the
|
|
75
|
-
* emitter record, and in meep the sprite belongs to the *layer* — one emitter's particles can come
|
|
76
|
-
* from several layers with different sprites. Since every particle names its own record, splitting
|
|
77
|
-
* this way costs nothing and keeps the draw a single one.
|
|
78
|
-
*
|
|
79
|
-
* Every field of the struct is filled, including the ones a CPU-simulated layer has no use for (the
|
|
80
|
-
* VM program offsets, the seed, the spawn rate). A field left out is not written as zero — the
|
|
81
|
-
* serializer skips it and the table's page buffers are recycled, so an omitted field would show
|
|
82
|
-
* whatever the slot's previous tenant left behind.
|
|
83
|
-
*
|
|
84
|
-
* @param {object} layer
|
|
85
|
-
* @param {ArrayLike<number>} layer.atlas_region uv offset x, y and uv scale x, y
|
|
86
|
-
* @param {number} layer.blend a member of {@link EMITTER_BLEND}
|
|
87
|
-
* @param {boolean} layer.soft_depth
|
|
88
|
-
* @returns {object} the value to store in the emitter table
|
|
89
|
-
*/
|
|
90
|
-
export function particle_layer_record({ atlas_region, blend, soft_depth }) {
|
|
91
|
-
return {
|
|
92
|
-
// BILLBOARD: the quad faces the camera and the rotation attribute rolls it in the view
|
|
93
|
-
// plane, which is what the legacy point sprite does. Velocity alignment is folded into that
|
|
94
|
-
// rotation when the particles are written, rather than being a projection mode of its own.
|
|
95
|
-
flags: make_emitter_flags({
|
|
96
|
-
soft_depth,
|
|
97
|
-
blend,
|
|
98
|
-
projection: EMITTER_PROJECTION.BILLBOARD,
|
|
99
|
-
}),
|
|
100
|
-
|
|
101
|
-
atlas_region,
|
|
102
|
-
|
|
103
|
-
render_position: PARTICLE_WORD_POSITION,
|
|
104
|
-
render_size: PARTICLE_WORD_SIZE,
|
|
105
|
-
render_color: PARTICLE_WORD_COLOR,
|
|
106
|
-
render_rotation: PARTICLE_WORD_ROTATION,
|
|
107
|
-
render_frame: EMITTER_ATTRIBUTE_ABSENT,
|
|
108
|
-
render_velocity: EMITTER_ATTRIBUTE_ABSENT,
|
|
109
|
-
|
|
110
|
-
// one cell: the sprite sheet animation the flipbook exists for is a later feature, and a
|
|
111
|
-
// 1x1 grid is the identity of that mapping rather than a disabled branch
|
|
112
|
-
flipbook: [1, 1],
|
|
113
|
-
|
|
114
|
-
// meep simulates these particles on the CPU, so there is no VM program, no seed and no
|
|
115
|
-
// GPU-side spawning behind this record — only the drawing half of it is ever read. The
|
|
116
|
-
// node is the scene root, which is as good as any: the particles carry world positions.
|
|
117
|
-
init_offset: 0,
|
|
118
|
-
init_count: 0,
|
|
119
|
-
update_offset: 0,
|
|
120
|
-
update_count: 0,
|
|
121
|
-
constant_offset: 0,
|
|
122
|
-
program_id: 0,
|
|
123
|
-
seed: 0,
|
|
124
|
-
spawn_rate: 0,
|
|
125
|
-
node: NODE3D_SCENE_ID,
|
|
126
|
-
generation: PARTICLE_GENERATION_FIRST,
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Write one emitter's live particles into the shared pool.
|
|
132
|
-
*
|
|
133
|
-
* The pool is compacted by `ParticleEmitter.update`, so the live particles are `[0, size)` and this
|
|
134
|
-
* runs straight down them.
|
|
135
|
-
*
|
|
136
|
-
* **Size is halved on the way in.** meep's `size` is the sprite's full width; the renderer expands a
|
|
137
|
-
* corner of ±1 by `size`, so what it wants is the half-extent — the same `radius = size * 0.5` the
|
|
138
|
-
* legacy vertex shader computes.
|
|
139
|
-
*
|
|
140
|
-
* **Velocity alignment is resolved here**, into the rotation the renderer reads: the legacy shader
|
|
141
|
-
* turns the sprite to face the screen-space direction of travel, and the camera basis is what says
|
|
142
|
-
* which direction that is.
|
|
143
|
-
*
|
|
144
|
-
* @param {Uint32Array} pool
|
|
145
|
-
* @param {Float32Array} pool_f32 the same buffer, viewed as floats
|
|
146
|
-
* @param {number} first_slot record index to start writing at
|
|
147
|
-
* @param {ParticleEmitter} emitter
|
|
148
|
-
* @param {number[]} layer_records the layer record index for each of the emitter's layers
|
|
149
|
-
* @param {number[]} camera_right world-space camera right
|
|
150
|
-
* @param {number[]} camera_up world-space camera up
|
|
151
|
-
* @returns {number} how many particles were written
|
|
152
|
-
*/
|
|
153
|
-
export function write_particle_records(
|
|
154
|
-
pool, pool_f32, first_slot, emitter, layer_records, camera_right, camera_up
|
|
155
|
-
) {
|
|
156
|
-
const particles = emitter.particles;
|
|
157
|
-
|
|
158
|
-
const count = particles.size();
|
|
159
|
-
|
|
160
|
-
if (count === 0) {
|
|
161
|
-
return 0;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
const positions = particles.attributes[PARTICLE_ATTRIBUTE_POSITION].array;
|
|
165
|
-
const sizes = particles.attributes[PARTICLE_ATTRIBUTE_SIZE].array;
|
|
166
|
-
const colors = particles.attributes[PARTICLE_ATTRIBUTE_COLOR].array;
|
|
167
|
-
const rotations = particles.attributes[PARTICLE_ATTRIBUTE_ROTATION].array;
|
|
168
|
-
const layers = particles.attributes[PARTICLE_ATTRIBUTE_LAYER_POSITION].array;
|
|
169
|
-
const velocities = particles.attributes[PARTICLE_ATTRIBUTE_VELOCITY].array;
|
|
170
|
-
|
|
171
|
-
const align = emitter.getFlag(ParticleEmitterFlag.AlignOnVelocity);
|
|
172
|
-
|
|
173
|
-
let written = 0;
|
|
174
|
-
|
|
175
|
-
for (let i = 0; i < count; i++) {
|
|
176
|
-
const layer = layers[i];
|
|
177
|
-
|
|
178
|
-
const record = layer_records[layer];
|
|
179
|
-
|
|
180
|
-
if (record === undefined) {
|
|
181
|
-
// a layer whose sprite has not been fetched yet has nowhere to draw from
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const base = (first_slot + written) * PARTICLE_RECORD_WORD_COUNT;
|
|
186
|
-
|
|
187
|
-
pool[base + PARTICLE_RECORD_HEADER_EMITTER] = record;
|
|
188
|
-
|
|
189
|
-
const p = i * 3;
|
|
190
|
-
|
|
191
|
-
pool_f32[base + PARTICLE_WORD_POSITION] = positions[p];
|
|
192
|
-
pool_f32[base + PARTICLE_WORD_POSITION + 1] = positions[p + 1];
|
|
193
|
-
pool_f32[base + PARTICLE_WORD_POSITION + 2] = positions[p + 2];
|
|
194
|
-
|
|
195
|
-
pool_f32[base + PARTICLE_WORD_SIZE] = sizes[i] * 0.5;
|
|
196
|
-
|
|
197
|
-
const c = i * 4;
|
|
198
|
-
|
|
199
|
-
pool_f32[base + PARTICLE_WORD_COLOR] = colors[c] / 255;
|
|
200
|
-
pool_f32[base + PARTICLE_WORD_COLOR + 1] = colors[c + 1] / 255;
|
|
201
|
-
pool_f32[base + PARTICLE_WORD_COLOR + 2] = colors[c + 2] / 255;
|
|
202
|
-
pool_f32[base + PARTICLE_WORD_COLOR + 3] = colors[c + 3] / 255;
|
|
203
|
-
|
|
204
|
-
let rotation = rotations[i];
|
|
205
|
-
|
|
206
|
-
if (align) {
|
|
207
|
-
const v_x = velocities[p];
|
|
208
|
-
const v_y = velocities[p + 1];
|
|
209
|
-
const v_z = velocities[p + 2];
|
|
210
|
-
|
|
211
|
-
const screen_x = v_x * camera_right[0] + v_y * camera_right[1] + v_z * camera_right[2];
|
|
212
|
-
const screen_y = v_x * camera_up[0] + v_y * camera_up[1] + v_z * camera_up[2];
|
|
213
|
-
|
|
214
|
-
if (screen_x !== 0 || screen_y !== 0) {
|
|
215
|
-
// the sprite's own up is +Y, so facing the direction of travel is that angle less a
|
|
216
|
-
// quarter turn — the same correction the legacy vertex shader applies
|
|
217
|
-
rotation += Math.atan2(screen_y, screen_x) - Math.PI / 2;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
pool_f32[base + PARTICLE_WORD_ROTATION] = rotation;
|
|
222
|
-
|
|
223
|
-
written++;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
return written;
|
|
227
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build the billboard render pipeline descriptor.
|
|
3
|
-
* @param {object} [options]
|
|
4
|
-
* @param {string} [options.color_format] colour target format
|
|
5
|
-
* @param {string|null} [options.depth_format] scene depth format (test-only, no write); pass null to
|
|
6
|
-
* render without a depth attachment (e.g. an additive-only prototype with no scene geometry)
|
|
7
|
-
* @param {GPUCompareFunction} [options.depth_compare] depth test — "greater"/"greater-equal" for
|
|
8
|
-
* reverse-Z scenes (the engine convention), "less"/"less-equal" for a standard-Z scene
|
|
9
|
-
* @returns {RenderPipelineDescriptor}
|
|
10
|
-
*/
|
|
11
|
-
export function create_particle_billboard_pipeline({ color_format, depth_format, depth_compare }?: {
|
|
12
|
-
color_format?: string;
|
|
13
|
-
depth_format?: string | null;
|
|
14
|
-
depth_compare?: GPUCompareFunction;
|
|
15
|
-
}): RenderPipelineDescriptor;
|
|
16
|
-
export namespace PARTICLE_BILLBOARD_BLEND {
|
|
17
|
-
namespace color {
|
|
18
|
-
let operation: string;
|
|
19
|
-
let srcFactor: string;
|
|
20
|
-
let dstFactor: string;
|
|
21
|
-
}
|
|
22
|
-
namespace alpha {
|
|
23
|
-
let operation_1: string;
|
|
24
|
-
export { operation_1 as operation };
|
|
25
|
-
let srcFactor_1: string;
|
|
26
|
-
export { srcFactor_1 as srcFactor };
|
|
27
|
-
let dstFactor_1: string;
|
|
28
|
-
export { dstFactor_1 as dstFactor };
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/** The billboard shader's resource set (for building bind groups + the draw command). */
|
|
32
|
-
export const PARTICLE_BILLBOARD_RESOURCES: ShaderResourceSetDescriptor;
|
|
33
|
-
import { RenderPipelineDescriptor } from "../../../descriptor/pipeline/render/RenderPipelineDescriptor.js";
|
|
34
|
-
import { ShaderResourceSetDescriptor } from "../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
35
|
-
//# sourceMappingURL=shader_particle_render.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shader_particle_render.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/shaders/shader_particle_render.js"],"names":[],"mappings":"AAgGA;;;;;;;;;GASG;AACH;IAP4B,YAAY,GAA7B,MAAM;IACgB,YAAY,GAAlC,MAAM,GAAC,IAAI;IAEkB,aAAa;IAExC,wBAAwB,CA2BpC;;;;;;;;;;;;;;;;AAED,yFAAyF;AACzF,uEAAsD;yCAtIb,iEAAiE;4CAO9D,sDAAsD"}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { RenderPipelineDescriptor } from "../../../descriptor/pipeline/render/RenderPipelineDescriptor.js";
|
|
2
|
-
import { ColorTargetState } from "../../../descriptor/pipeline/render/ColorTargetState.js";
|
|
3
|
-
import { DepthStencilState } from "../../../descriptor/pipeline/render/DepthStencilState.js";
|
|
4
|
-
import { WebGPUArray } from "../../shader/type/WebGPUArray.js";
|
|
5
|
-
import { CAMERA_UNIFORM_STRUCT } from "../../camera/CAMERA_UNIFORM_STRUCT.js";
|
|
6
|
-
import { ShaderDescriptor } from "../../shader/ShaderDescriptor.js";
|
|
7
|
-
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
8
|
-
import { ShaderResourceSetDescriptor } from "../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
9
|
-
import { EMITTER_FLAG } from "../data/PARTICLE_EMITTER_STRUCT.js";
|
|
10
|
-
import { PARTICLE_SOFT_FADE_RANGE } from "../ParticleConstants.js";
|
|
11
|
-
import { chunk_particle_billboard_vertex } from "./chunk_particle_billboard_vertex.js";
|
|
12
|
-
import { chunk_particle_lighting_unlit } from "./chunk_particle_lighting.js";
|
|
13
|
-
import { chunk_particle_scene_view_depth } from "./chunk_particle_scene_view_depth.js";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Blended billboards drawn straight over a colour target with fixed-function blending, in whatever
|
|
17
|
-
* order the caller's draw list happens to be in.
|
|
18
|
-
*
|
|
19
|
-
* Its one consumer is
|
|
20
|
-
* {@link ../../../../engine/graphics3/particles/GPUParticularRenderer.js GPUParticularRenderer},
|
|
21
|
-
* which draws `particular`'s CPU-simulated particles: it sorts every live particle back to front on
|
|
22
|
-
* the CPU and hands that order in as `draw_list`, which is what makes an order-dependent blend
|
|
23
|
-
* correct here. The GPU particle system does not use this pipeline — its particles go through
|
|
24
|
-
* AVBOIT (`../graph_particles_avboit.js`), where the accumulators are sums and no ordering exists
|
|
25
|
-
* or is needed.
|
|
26
|
-
*
|
|
27
|
-
* One instanced draw covers every particle: `instance_index` indexes `draw_list`, `vertex_index`
|
|
28
|
-
* (0..5) picks a quad corner. The vertex stage is `chunk_particle_billboard_vertex`, shared with the
|
|
29
|
-
* AVBOIT particle passes. The fragment stage samples the atlas sub-rect + flipbook cell, applies an
|
|
30
|
-
* optional soft-depth fade against the scene depth, runs the pluggable lighting hook (unlit by
|
|
31
|
-
* default; a caller swaps in the shading-chunk-backed one when an emitter enables lighting), and
|
|
32
|
-
* emits premultiplied colour.
|
|
33
|
-
*
|
|
34
|
-
* A single blend state — `src*1 + dst*(1-srcAlpha)` on both channels — expresses alpha and additive
|
|
35
|
-
* blending; the shader chooses per particle by how it premultiplies (see `particle_premultiply`), so
|
|
36
|
-
* the whole draw stays GPU-driven with no pipeline switches.
|
|
37
|
-
*
|
|
38
|
-
* The math (billboard expansion, atlas/flipbook UV, soft fade, premultiply) is unit-tested in
|
|
39
|
-
* {@link ./chunk_particle_render_math.spec.js}; this module assembles it into a render pipeline.
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
/** Premultiplied blend: additive when a=0 (dst preserved, colour adds), over-blend when a=srcAlpha. */
|
|
43
|
-
export const PARTICLE_BILLBOARD_BLEND = {
|
|
44
|
-
color: { operation: "add", srcFactor: "one", dstFactor: "one-minus-src-alpha" },
|
|
45
|
-
alpha: { operation: "add", srcFactor: "one", dstFactor: "one-minus-src-alpha" },
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const resources = new ShaderResourceSetDescriptor();
|
|
49
|
-
resources.createGroup()
|
|
50
|
-
.addUniform("camera", CAMERA_UNIFORM_STRUCT)
|
|
51
|
-
.addStorageBuffer("pool", WebGPUArray.u32, false)
|
|
52
|
-
.addStorageBuffer("draw_list", WebGPUArray.u32, false)
|
|
53
|
-
.addStorageBuffer("emitter_database", WebGPUArray.u32, false)
|
|
54
|
-
// Sampled with a filtering sampler, so the atlas must be a filterable float texture.
|
|
55
|
-
.addTexture("atlas", "float")
|
|
56
|
-
.addSampler("atlas_sampler", "filtering")
|
|
57
|
-
// Only textureLoad-ed (soft depth), so it can be unfilterable — matches an r32float scene depth.
|
|
58
|
-
.addTexture("scene_depth", "unfilterable-float");
|
|
59
|
-
|
|
60
|
-
const body = CodeChunk.from(
|
|
61
|
-
/* language=wgsl */ `
|
|
62
|
-
const PARTICLE_FLAG_SOFT_DEPTH : u32 = ${EMITTER_FLAG.SOFT_DEPTH}u;
|
|
63
|
-
const PARTICLE_FLAG_LIGHTING : u32 = ${EMITTER_FLAG.LIGHTING}u;
|
|
64
|
-
const PARTICLE_SOFT_FADE_RANGE : f32 = ${PARTICLE_SOFT_FADE_RANGE};
|
|
65
|
-
|
|
66
|
-
@vertex
|
|
67
|
-
fn vs_main(@builtin(vertex_index) vi : u32, @builtin(instance_index) ii : u32) -> ParticleVertexOut {
|
|
68
|
-
return particle_billboard_vertex(vi, ii);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@fragment
|
|
72
|
-
fn fs_main(in : ParticleVertexOut) -> @location(0) vec4<f32> {
|
|
73
|
-
let sampled = textureSample(atlas, atlas_sampler, in.uv);
|
|
74
|
-
var color = sampled * in.color;
|
|
75
|
-
|
|
76
|
-
if ((in.flags & PARTICLE_FLAG_SOFT_DEPTH) != 0u) {
|
|
77
|
-
let scene_vd = particle_scene_view_depth(textureLoad(scene_depth, vec2<i32>(in.clip.xy), 0).r, camera);
|
|
78
|
-
color = particle_fade_color(color, in.blend, particle_soft_fade(scene_vd, in.view_depth, PARTICLE_SOFT_FADE_RANGE));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if ((in.flags & PARTICLE_FLAG_LIGHTING) != 0u) {
|
|
82
|
-
color = particle_apply_lighting(color, in.world_position, normalize(in.normal));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return particle_premultiply(color, in.blend);
|
|
86
|
-
}
|
|
87
|
-
`, [chunk_particle_billboard_vertex, chunk_particle_lighting_unlit, chunk_particle_scene_view_depth]);
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* The shader itself. One compilation, shared by every pipeline built from it — the options below
|
|
91
|
-
* vary the pipeline state, never the WGSL.
|
|
92
|
-
*
|
|
93
|
-
* @type {ShaderDescriptor}
|
|
94
|
-
*/
|
|
95
|
-
const descriptor = ShaderDescriptor.from({ label: "Particle Billboard", body, resources });
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Build the billboard render pipeline descriptor.
|
|
99
|
-
* @param {object} [options]
|
|
100
|
-
* @param {string} [options.color_format] colour target format
|
|
101
|
-
* @param {string|null} [options.depth_format] scene depth format (test-only, no write); pass null to
|
|
102
|
-
* render without a depth attachment (e.g. an additive-only prototype with no scene geometry)
|
|
103
|
-
* @param {GPUCompareFunction} [options.depth_compare] depth test — "greater"/"greater-equal" for
|
|
104
|
-
* reverse-Z scenes (the engine convention), "less"/"less-equal" for a standard-Z scene
|
|
105
|
-
* @returns {RenderPipelineDescriptor}
|
|
106
|
-
*/
|
|
107
|
-
export function create_particle_billboard_pipeline({
|
|
108
|
-
color_format = "rgba16float",
|
|
109
|
-
depth_format = "depth32float",
|
|
110
|
-
depth_compare = "greater"
|
|
111
|
-
} = {}) {
|
|
112
|
-
|
|
113
|
-
const code = descriptor.source;
|
|
114
|
-
|
|
115
|
-
return RenderPipelineDescriptor.from({
|
|
116
|
-
label: "Particle Billboard",
|
|
117
|
-
layout: resources.generatePipelineLayout(GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT),
|
|
118
|
-
vertex: { module: { code }, entryPoint: "vs_main" },
|
|
119
|
-
fragment: {
|
|
120
|
-
module: { code },
|
|
121
|
-
entryPoint: "fs_main",
|
|
122
|
-
targets: [ColorTargetState.from({ format: color_format, blend: PARTICLE_BILLBOARD_BLEND })],
|
|
123
|
-
},
|
|
124
|
-
// Depth-test against the scene, but never write (transparent). Omitted entirely when no depth
|
|
125
|
-
// attachment is bound.
|
|
126
|
-
depthStencil: depth_format == null
|
|
127
|
-
? undefined
|
|
128
|
-
: DepthStencilState.from({ format: depth_format, depthWriteEnabled: false, depthCompare: depth_compare }),
|
|
129
|
-
primitive: { topology: "triangle-list", cullMode: "none" },
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/** The billboard shader's resource set (for building bind groups + the draw command). */
|
|
135
|
-
export const PARTICLE_BILLBOARD_RESOURCES = resources;
|