@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,162 +0,0 @@
|
|
|
1
|
-
import { OperationType } from "./OperationType.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {Operation[]} queue
|
|
6
|
-
*/
|
|
7
|
-
export function optimizeCommandQueue(queue) {
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* TODO this is pretty slow and should be optimized
|
|
11
|
-
* @param {Array.<Operation>} queue
|
|
12
|
-
*/
|
|
13
|
-
function cutRedundantOperations(queue) {
|
|
14
|
-
const queueLength = queue.length;
|
|
15
|
-
loop_Main: for (let i = queueLength - 1; i >= 0; i--) {
|
|
16
|
-
const opA = queue[i];
|
|
17
|
-
if (opA.operator === OperationType.Add) {
|
|
18
|
-
//nothing to do
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
const operandsA = opA.operands;
|
|
22
|
-
if (opA.operator === OperationType.Remove) {
|
|
23
|
-
//hunt and delete operations before this remove that affect deleted references
|
|
24
|
-
for (let k = 0, kl = operandsA.length; k < kl; k++) {
|
|
25
|
-
const refA = operandsA[k];
|
|
26
|
-
|
|
27
|
-
//walk the queue back and remove all previous operations on these references
|
|
28
|
-
loop_B: for (let j = i - 1; j >= 0; j--) {
|
|
29
|
-
const opB = queue[j];
|
|
30
|
-
const operandsB = opB.operands;
|
|
31
|
-
const operatorB = opB.operator;
|
|
32
|
-
if (operatorB === OperationType.WriteAttribute) {
|
|
33
|
-
const refB = operandsB[0];
|
|
34
|
-
if (refA === refB) {
|
|
35
|
-
//cut operation
|
|
36
|
-
queue.splice(j, 1);
|
|
37
|
-
i--;
|
|
38
|
-
}
|
|
39
|
-
} else if (operatorB === OperationType.Add) {
|
|
40
|
-
for (let m = 0, ml = operandsB.length; m < ml; m++) {
|
|
41
|
-
const refB = operandsB[m];
|
|
42
|
-
if (refA === refB) {
|
|
43
|
-
let jump = 0;
|
|
44
|
-
//delete operation and add operation cancel each other out
|
|
45
|
-
if (kl > 1) {
|
|
46
|
-
operandsA.splice(k, 1);
|
|
47
|
-
kl--;
|
|
48
|
-
k--;
|
|
49
|
-
} else {
|
|
50
|
-
queue.splice(i, 1);
|
|
51
|
-
i--;
|
|
52
|
-
jump |= 2;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (ml > 1) {
|
|
56
|
-
operandsB.splice(m, 1);
|
|
57
|
-
m--;
|
|
58
|
-
ml--;
|
|
59
|
-
} else {
|
|
60
|
-
//cut operation from the queue
|
|
61
|
-
queue.splice(j, 1);
|
|
62
|
-
i--;
|
|
63
|
-
jump |= 1;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if ((jump & 2) !== 0) {
|
|
67
|
-
continue loop_Main;
|
|
68
|
-
} else if (jump !== 0) {
|
|
69
|
-
continue loop_B;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
} else if (opA.operator === OperationType.WriteAttribute) {
|
|
77
|
-
//find other operations that modify the same attribute, any previous operations are redundant at this point
|
|
78
|
-
const refA = operandsA[0];
|
|
79
|
-
const attributeIndexA = operandsA[1];
|
|
80
|
-
//walk the queue back and remove all previous operations on these references
|
|
81
|
-
for (let j = i - 1; j >= 0; j--) {
|
|
82
|
-
const opB = queue[j];
|
|
83
|
-
if (opB.operator !== OperationType.WriteAttribute) {
|
|
84
|
-
//ignore
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const operandsB = opB.operands;
|
|
89
|
-
if (operandsB[0] === refA && operandsB[1] === attributeIndexA) {
|
|
90
|
-
//operation will be overwritten anyway, cut it
|
|
91
|
-
queue.splice(j, 1);
|
|
92
|
-
i--;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
* @param {Array.<Operation>} queue
|
|
102
|
-
*/
|
|
103
|
-
function groupOperations(queue) {
|
|
104
|
-
let l = queue.length;
|
|
105
|
-
for (let i = 0; i < l; i++) {
|
|
106
|
-
const opA = queue[i];
|
|
107
|
-
const operatorA = opA.operator;
|
|
108
|
-
const operandsA = opA.operands;
|
|
109
|
-
if (operatorA === OperationType.Add || operatorA === OperationType.Remove) {
|
|
110
|
-
for (let j = i + 1; j < l; j++) {
|
|
111
|
-
const opB = queue[j];
|
|
112
|
-
if (opB.operator === operatorA) {
|
|
113
|
-
const operandsB = opB.operands;
|
|
114
|
-
const numOperands = operandsB.length;
|
|
115
|
-
|
|
116
|
-
for (let k = 0; k < numOperands; k++) {
|
|
117
|
-
const refB = operandsB[k];
|
|
118
|
-
if (operandsA.indexOf(refB) === -1) {
|
|
119
|
-
operandsA.push(refB);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
queue.splice(j, 1);
|
|
124
|
-
j--;
|
|
125
|
-
l--;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @param {Array.<Operation>} queue
|
|
134
|
-
*/
|
|
135
|
-
function sortOperations(queue) {
|
|
136
|
-
queue.sort(function (a, b) {
|
|
137
|
-
const operatorA = a.operator;
|
|
138
|
-
const operatorB = b.operator;
|
|
139
|
-
|
|
140
|
-
//it's important that Add and Remove operations are sorted to the front of the queue, before Write operations
|
|
141
|
-
if (operatorA < operatorB) {
|
|
142
|
-
return -1;
|
|
143
|
-
} else if (operatorA > operatorB) {
|
|
144
|
-
return 1;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
if (operatorA !== OperationType.WriteAttribute) {
|
|
148
|
-
return 0;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const attributeIndexA = a.operands[1];
|
|
152
|
-
const attributeIndexB = b.operands[1];
|
|
153
|
-
|
|
154
|
-
//sort write operations by buffer index
|
|
155
|
-
return attributeIndexB - attributeIndexA;
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
cutRedundantOperations(queue);
|
|
160
|
-
groupOperations(queue);
|
|
161
|
-
sortOperations(queue);
|
|
162
|
-
}
|
package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {ParticleDataType} type
|
|
4
|
-
* @returns {*}
|
|
5
|
-
*/
|
|
6
|
-
export function typedArrayConstructorFromDataType(type: ParticleDataType): any;
|
|
7
|
-
import { ParticleDataType } from "./ParticleDataType.js";
|
|
8
|
-
//# sourceMappingURL=typedArrayConstructorFromDataType.d.ts.map
|
package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typedArrayConstructorFromDataType.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wDAHW,gBAAgB,OAc1B;iCAlBgC,uBAAuB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ParticleDataType } from "./ParticleDataType.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {ParticleDataType} type
|
|
6
|
-
* @returns {*}
|
|
7
|
-
*/
|
|
8
|
-
export function typedArrayConstructorFromDataType(type) {
|
|
9
|
-
switch (type) {
|
|
10
|
-
case ParticleDataType.Float32:
|
|
11
|
-
return Float32Array;
|
|
12
|
-
case ParticleDataType.Float64:
|
|
13
|
-
return Float64Array;
|
|
14
|
-
case ParticleDataType.Uint8:
|
|
15
|
-
return Uint8Array;
|
|
16
|
-
default:
|
|
17
|
-
throw new Error(`Unsupported type: ${type}`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Draws the game's particle effects under Shade.
|
|
3
|
-
*
|
|
4
|
-
* **The simulation does not move.** `particular` emits, ages, integrates and colours particles on
|
|
5
|
-
* the CPU, and that is where it stays: the plan makes Shade's GPU particle system a later, opt-in
|
|
6
|
-
* upgrade rather than this port. What changes is only what happens to the state it produces each
|
|
7
|
-
* frame — instead of a three `Points` object per emitter, it is packed into the layout Shade's own
|
|
8
|
-
* billboard renderer reads.
|
|
9
|
-
*
|
|
10
|
-
* **No visibility layer comes across.** The legacy system drives a render layer backed by a BVH and
|
|
11
|
-
* puts emitters to sleep when they leave the visible set; §4.5 retires CPU render culling, so every
|
|
12
|
-
* linked emitter simulates and the GPU decides what is on screen. An emitter that should not
|
|
13
|
-
* simulate says so itself, through {@link ParticleEmitterFlag.Emitting}.
|
|
14
|
-
* @deprecated use {@link GPUParticleSystem} instead, it can do everything this can and more.
|
|
15
|
-
*/
|
|
16
|
-
export class ParticleEmitterSystem extends System<any> {
|
|
17
|
-
/**
|
|
18
|
-
* @param {GraphicsEngine} graphics
|
|
19
|
-
* @param {AssetManager} assets
|
|
20
|
-
*/
|
|
21
|
-
constructor(graphics: GraphicsEngine, assets: AssetManager);
|
|
22
|
-
dependencies: (typeof Transform64 | typeof ParticleEmitter)[];
|
|
23
|
-
/**
|
|
24
|
-
* What the pass draws. Read-only — the emitters follow the entities.
|
|
25
|
-
*
|
|
26
|
-
* @returns {ParticleEmitter[]}
|
|
27
|
-
*/
|
|
28
|
-
get emitters(): ParticleEmitter[];
|
|
29
|
-
startup(entityManager: any): Promise<void>;
|
|
30
|
-
shutdown(entityManager: any): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* @param {ParticleEmitter} emitter
|
|
33
|
-
* @param {Transform64} transform
|
|
34
|
-
* @param {number} entity
|
|
35
|
-
*/
|
|
36
|
-
link(emitter: ParticleEmitter, transform: Transform64, entity: number): void;
|
|
37
|
-
/**
|
|
38
|
-
* Rebuild an emitter that has been edited structurally — layers added or removed, a sprite
|
|
39
|
-
* changed, a parameter curve redrawn.
|
|
40
|
-
*
|
|
41
|
-
* The pool, the parameter tracks and the atlas references are all built from the emitter's
|
|
42
|
-
* description, so an edit to that description is only visible once they are built again. Sleep
|
|
43
|
-
* state is preserved because it is the editor's, not the emitter's.
|
|
44
|
-
*
|
|
45
|
-
* @param {ParticleEmitter} emitter one this system has linked
|
|
46
|
-
*/
|
|
47
|
-
rebuild(emitter: ParticleEmitter): void;
|
|
48
|
-
/**
|
|
49
|
-
* @param {ParticleEmitter} emitter
|
|
50
|
-
* @param {Transform64} transform
|
|
51
|
-
* @param {number} entity
|
|
52
|
-
*/
|
|
53
|
-
unlink(emitter: ParticleEmitter, transform: Transform64, entity: number): void;
|
|
54
|
-
update(timeDelta: any): void;
|
|
55
|
-
/**
|
|
56
|
-
* @param {FrameContext} frame
|
|
57
|
-
*/
|
|
58
|
-
record(frame: FrameContext): void;
|
|
59
|
-
#private;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Emitters draw into the scene, so they are subject to the fog of war that conceals it — which is
|
|
63
|
-
* a declaration on the fog rather than a placement here.
|
|
64
|
-
*/
|
|
65
|
-
export class ParticleExtension extends RenderExtension {
|
|
66
|
-
/**
|
|
67
|
-
* @param {ParticleEmitterSystem} system
|
|
68
|
-
*/
|
|
69
|
-
constructor(system: ParticleEmitterSystem);
|
|
70
|
-
record(frame: any): void;
|
|
71
|
-
#private;
|
|
72
|
-
}
|
|
73
|
-
import { System } from "../ecs/System.js";
|
|
74
|
-
import { Transform64 } from "../ecs/transform/Transform64.js";
|
|
75
|
-
import { ParticleEmitter } from "../graphics/particles/particular/engine/emitter/ParticleEmitter.js";
|
|
76
|
-
import { RenderExtension } from "../../shade/renderer/extension/RenderExtension.js";
|
|
77
|
-
//# sourceMappingURL=ParticleEmitterSystem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParticleEmitterSystem.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/ParticleEmitterSystem.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;GAcG;AACH;IAiDI;;;OAGG;IACH,4DAUC;IA9DD,8DAA8C;IAuC9C;;;;OAIG;IACH,kCAEC;IAkBD,2CAUC;IAED,4CAeC;IAED;;;;OAIG;IACH,cAJW,eAAe,aACf,WAAW,UACX,MAAM,QAsChB;IAED;;;;;;;;;OASG;IACH,iBAFW,eAAe,QAqBzB;IAED;;;;OAIG;IACH,gBAJW,eAAe,aACf,WAAW,UACX,MAAM,QA0BhB;IAED,6BAaC;IAED;;OAEG;IACH,kCA+BC;;CACJ;AAED;;;GAGG;AACH;IAUI;;OAEG;IACH,oBAFW,qBAAqB,EAM/B;IAED,yBAEC;;CACJ;uBA5SsB,kBAAkB;4BACb,iCAAiC;gCAC7B,oEAAoE;gCANpE,mDAAmD"}
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../core/assert.js";
|
|
2
|
-
import { FramePhase } from "../../shade/renderer/extension/FramePhase.js";
|
|
3
|
-
import { RenderExtension } from "../../shade/renderer/extension/RenderExtension.js";
|
|
4
|
-
import { SceneColor } from "../../shade/renderer/extension/SceneColor.js";
|
|
5
|
-
import { ViewTextures } from "../../shade/renderer/extension/ViewTextures.js";
|
|
6
|
-
import { ImageRGBADataLoader } from "../asset/loaders/image/ImageRGBADataLoader.js";
|
|
7
|
-
import { System } from "../ecs/System.js";
|
|
8
|
-
import { Transform64 } from "../ecs/transform/Transform64.js";
|
|
9
|
-
import { ParticleEmitter } from "../graphics/particles/particular/engine/emitter/ParticleEmitter.js";
|
|
10
|
-
import { ParticleEmitterFlag } from "../graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js";
|
|
11
|
-
import { ParticularEngine } from "../graphics/particles/particular/engine/ParticularEngine.js";
|
|
12
|
-
import { GPUParticularRenderer } from "./particles/GPUParticularRenderer.js";
|
|
13
|
-
import { TRANSFORM64_EVENT_CHANGE } from "../ecs/transform/TRANSFORM64_EVENT_CHANGE.js";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Draws the game's particle effects under Shade.
|
|
17
|
-
*
|
|
18
|
-
* **The simulation does not move.** `particular` emits, ages, integrates and colours particles on
|
|
19
|
-
* the CPU, and that is where it stays: the plan makes Shade's GPU particle system a later, opt-in
|
|
20
|
-
* upgrade rather than this port. What changes is only what happens to the state it produces each
|
|
21
|
-
* frame — instead of a three `Points` object per emitter, it is packed into the layout Shade's own
|
|
22
|
-
* billboard renderer reads.
|
|
23
|
-
*
|
|
24
|
-
* **No visibility layer comes across.** The legacy system drives a render layer backed by a BVH and
|
|
25
|
-
* puts emitters to sleep when they leave the visible set; §4.5 retires CPU render culling, so every
|
|
26
|
-
* linked emitter simulates and the GPU decides what is on screen. An emitter that should not
|
|
27
|
-
* simulate says so itself, through {@link ParticleEmitterFlag.Emitting}.
|
|
28
|
-
* @deprecated use {@link GPUParticleSystem} instead, it can do everything this can and more.
|
|
29
|
-
*/
|
|
30
|
-
export class ParticleEmitterSystem extends System {
|
|
31
|
-
dependencies = [ParticleEmitter, Transform64];
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @type {GraphicsEngine}
|
|
35
|
-
*/
|
|
36
|
-
#graphics;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @type {AssetManager}
|
|
40
|
-
*/
|
|
41
|
-
#assets;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @type {ParticularEngine}
|
|
45
|
-
*/
|
|
46
|
-
#engine;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @type {GPUParticularRenderer}
|
|
50
|
-
*/
|
|
51
|
-
#renderer = new GPUParticularRenderer();
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* The emitters to simulate and draw, in link order.
|
|
55
|
-
*
|
|
56
|
-
* @type {ParticleEmitter[]}
|
|
57
|
-
*/
|
|
58
|
-
#emitters = [];
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @type {Map<number, {emitter: ParticleEmitter, position: Function, rotation: Function, scale: Function}>}
|
|
62
|
-
*/
|
|
63
|
-
#entries = new Map();
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @type {RenderExtension|null}
|
|
67
|
-
*/
|
|
68
|
-
#extension = null;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* What the pass draws. Read-only — the emitters follow the entities.
|
|
72
|
-
*
|
|
73
|
-
* @returns {ParticleEmitter[]}
|
|
74
|
-
*/
|
|
75
|
-
get emitters() {
|
|
76
|
-
return this.#emitters;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @param {GraphicsEngine} graphics
|
|
81
|
-
* @param {AssetManager} assets
|
|
82
|
-
*/
|
|
83
|
-
constructor(graphics, assets) {
|
|
84
|
-
super();
|
|
85
|
-
|
|
86
|
-
assert.defined(graphics, 'graphics');
|
|
87
|
-
assert.defined(assets, 'assets');
|
|
88
|
-
|
|
89
|
-
this.#graphics = graphics;
|
|
90
|
-
this.#assets = assets;
|
|
91
|
-
|
|
92
|
-
this.#engine = new ParticularEngine(assets);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
async startup(entityManager) {
|
|
96
|
-
this.entityManager = entityManager;
|
|
97
|
-
|
|
98
|
-
this.#extension = this.#graphics.add_extension(new ParticleExtension(this));
|
|
99
|
-
|
|
100
|
-
const assets = this.#assets;
|
|
101
|
-
|
|
102
|
-
if (!assets.hasLoaderForType('image')) {
|
|
103
|
-
await assets.registerLoader('image', new ImageRGBADataLoader());
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
async shutdown(entityManager) {
|
|
108
|
-
if (this.#extension !== null) {
|
|
109
|
-
this.#graphics.remove_extension(this.#extension);
|
|
110
|
-
|
|
111
|
-
this.#extension = null;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
this.#renderer.destroy();
|
|
115
|
-
|
|
116
|
-
// every emitter has been unlinked by this point — both teardown paths detach the dataset or
|
|
117
|
-
// remove the system observer first — so what is left is the shared sprite atlas
|
|
118
|
-
this.#engine.dispose();
|
|
119
|
-
|
|
120
|
-
this.#emitters.length = 0;
|
|
121
|
-
this.#entries.clear();
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @param {ParticleEmitter} emitter
|
|
126
|
-
* @param {Transform64} transform
|
|
127
|
-
* @param {number} entity
|
|
128
|
-
*/
|
|
129
|
-
link(emitter, transform, entity) {
|
|
130
|
-
const position = (x, y, z) => emitter.position.set(x, y, z);
|
|
131
|
-
const rotation = (x, y, z, w) => emitter.rotation.set(x, y, z, w);
|
|
132
|
-
const scale = (x, y, z) => emitter.scale.set(x, y, z);
|
|
133
|
-
|
|
134
|
-
// `process` was Vector3's "call me with the components" helper; the transform hands
|
|
135
|
-
// them over directly
|
|
136
|
-
position(transform.translation_x, transform.translation_y, transform.translation_z);
|
|
137
|
-
rotation(transform.rotation_x, transform.rotation_y, transform.rotation_z, transform.rotation_w);
|
|
138
|
-
scale(transform.scale_x, transform.scale_y, transform.scale_z);
|
|
139
|
-
|
|
140
|
-
// Vector3.process called the callback AND subscribed. The transform has no signals, so
|
|
141
|
-
// the subscription half becomes one dataset listener that re-pushes the whole pose.
|
|
142
|
-
const on_transform_changed = () => {
|
|
143
|
-
position(transform.translation_x, transform.translation_y, transform.translation_z);
|
|
144
|
-
rotation(transform.rotation_x, transform.rotation_y, transform.rotation_z, transform.rotation_w);
|
|
145
|
-
scale(transform.scale_x, transform.scale_y, transform.scale_z);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
this.entityManager.dataset.addEntityEventListener(
|
|
149
|
-
entity, TRANSFORM64_EVENT_CHANGE, on_transform_changed
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
this.#entries.set(entity, { emitter, position, rotation, scale, on_transform_changed });
|
|
153
|
-
|
|
154
|
-
emitter.id = entity;
|
|
155
|
-
|
|
156
|
-
/*
|
|
157
|
-
Awake from the start. The legacy system links emitters asleep and lets its visibility layer
|
|
158
|
-
wake them; there is no such layer here, and an emitter that never wakes never emits.
|
|
159
|
-
*/
|
|
160
|
-
emitter.clearFlag(ParticleEmitterFlag.Sleeping);
|
|
161
|
-
|
|
162
|
-
this.#engine.add(emitter);
|
|
163
|
-
|
|
164
|
-
this.#emitters.push(emitter);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Rebuild an emitter that has been edited structurally — layers added or removed, a sprite
|
|
169
|
-
* changed, a parameter curve redrawn.
|
|
170
|
-
*
|
|
171
|
-
* The pool, the parameter tracks and the atlas references are all built from the emitter's
|
|
172
|
-
* description, so an edit to that description is only visible once they are built again. Sleep
|
|
173
|
-
* state is preserved because it is the editor's, not the emitter's.
|
|
174
|
-
*
|
|
175
|
-
* @param {ParticleEmitter} emitter one this system has linked
|
|
176
|
-
*/
|
|
177
|
-
rebuild(emitter) {
|
|
178
|
-
assert.ok(this.#emitters.includes(emitter), 'emitter is not linked to this system');
|
|
179
|
-
|
|
180
|
-
const engine = this.#engine;
|
|
181
|
-
|
|
182
|
-
const sleeping = emitter.getFlag(ParticleEmitterFlag.Sleeping);
|
|
183
|
-
|
|
184
|
-
engine.remove(emitter);
|
|
185
|
-
|
|
186
|
-
emitter.clearFlag(ParticleEmitterFlag.Built | ParticleEmitterFlag.Initialized);
|
|
187
|
-
|
|
188
|
-
emitter.registerLayerParameters();
|
|
189
|
-
emitter.build();
|
|
190
|
-
emitter.initialize();
|
|
191
|
-
emitter.computeBoundingBox();
|
|
192
|
-
|
|
193
|
-
engine.add(emitter);
|
|
194
|
-
|
|
195
|
-
emitter.writeFlag(ParticleEmitterFlag.Sleeping, sleeping);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* @param {ParticleEmitter} emitter
|
|
200
|
-
* @param {Transform64} transform
|
|
201
|
-
* @param {number} entity
|
|
202
|
-
*/
|
|
203
|
-
unlink(emitter, transform, entity) {
|
|
204
|
-
const entry = this.#entries.get(entity);
|
|
205
|
-
|
|
206
|
-
if (entry === undefined) {
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (entry.on_transform_changed !== undefined) {
|
|
211
|
-
this.entityManager.dataset.removeEntityEventListener(
|
|
212
|
-
entity, TRANSFORM64_EVENT_CHANGE, entry.on_transform_changed
|
|
213
|
-
);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
this.#entries.delete(entity);
|
|
217
|
-
|
|
218
|
-
const index = this.#emitters.indexOf(emitter);
|
|
219
|
-
|
|
220
|
-
if (index !== -1) {
|
|
221
|
-
this.#emitters.splice(index, 1);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
this.#engine.remove(emitter);
|
|
225
|
-
|
|
226
|
-
emitter.dispose();
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
update(timeDelta) {
|
|
230
|
-
this.#engine.advance(timeDelta);
|
|
231
|
-
|
|
232
|
-
const emitters = this.#emitters;
|
|
233
|
-
|
|
234
|
-
for (let i = 0; i < emitters.length; i++) {
|
|
235
|
-
// retires dead particles and compacts the pool, which is what makes the live ones a
|
|
236
|
-
// contiguous run for the packer
|
|
237
|
-
emitters[i].update();
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// repacks the sprite atlas when an effect has brought a new sprite in
|
|
241
|
-
this.#engine.shaderManager.spriteAtlas.atlas.update();
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* @param {FrameContext} frame
|
|
246
|
-
*/
|
|
247
|
-
record(frame) {
|
|
248
|
-
const emitters = this.#emitters;
|
|
249
|
-
|
|
250
|
-
if (emitters.length === 0) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
const camera_context = frame.view.camera;
|
|
255
|
-
|
|
256
|
-
// the camera's world transform, whose first two columns are the axes a billboard is built on
|
|
257
|
-
const m = camera_context.camera.transform;
|
|
258
|
-
|
|
259
|
-
/*
|
|
260
|
-
The particles are packed and uploaded inside the pass rather than here: that needs a
|
|
261
|
-
`GraphicsContext`, which the frame graph hands out at execution time and the frame does not
|
|
262
|
-
carry. So the pass is recorded whether or not anything is alive, and draws nothing when
|
|
263
|
-
nothing is — which leaves the frame's colour exactly as it was either way.
|
|
264
|
-
*/
|
|
265
|
-
const scene = frame.get(SceneColor);
|
|
266
|
-
|
|
267
|
-
scene.color = this.#renderer.graph_draw({
|
|
268
|
-
graph: frame.graph,
|
|
269
|
-
color: scene.color,
|
|
270
|
-
depth: frame.get(ViewTextures).depth,
|
|
271
|
-
camera: camera_context.buffer,
|
|
272
|
-
emitters,
|
|
273
|
-
atlas: this.#engine.shaderManager.spriteAtlas.atlas.sampler,
|
|
274
|
-
camera_position: [m[12], m[13], m[14]],
|
|
275
|
-
camera_right: [m[0], m[1], m[2]],
|
|
276
|
-
camera_up: [m[4], m[5], m[6]]
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Emitters draw into the scene, so they are subject to the fog of war that conceals it — which is
|
|
283
|
-
* a declaration on the fog rather than a placement here.
|
|
284
|
-
*/
|
|
285
|
-
export class ParticleExtension extends RenderExtension {
|
|
286
|
-
name = "particles";
|
|
287
|
-
|
|
288
|
-
phase = FramePhase.AfterTransparency;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* @type {ParticleEmitterSystem}
|
|
292
|
-
*/
|
|
293
|
-
#system;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* @param {ParticleEmitterSystem} system
|
|
297
|
-
*/
|
|
298
|
-
constructor(system) {
|
|
299
|
-
super();
|
|
300
|
-
|
|
301
|
-
this.#system = system;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
record(frame) {
|
|
305
|
-
this.#system.record(frame);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Renamed to {@link ParticleEmitterSystem}. The trailing `3` marked the 2.x → 3.x renderer transition;
|
|
3
|
-
* the 2.x name it disambiguated against is gone, so the suffix no longer distinguishes anything.
|
|
4
|
-
*
|
|
5
|
-
* Kept as a re-export rather than removed: this is a library, and an import path is as much a
|
|
6
|
-
* published interface as a class name.
|
|
7
|
-
*/
|
|
8
|
-
export const ParticleEmitterSystem3: typeof ParticleEmitterSystem;
|
|
9
|
-
import { ParticleEmitterSystem } from "./ParticleEmitterSystem.js";
|
|
10
|
-
//# sourceMappingURL=ParticleEmitterSystem3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParticleEmitterSystem3.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/ParticleEmitterSystem3.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,kEAA4D;sCATtB,4BAA4B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ParticleEmitterSystem } from "./ParticleEmitterSystem.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Renamed to {@link ParticleEmitterSystem}. The trailing `3` marked the 2.x → 3.x renderer transition;
|
|
5
|
-
* the 2.x name it disambiguated against is gone, so the suffix no longer distinguishes anything.
|
|
6
|
-
*
|
|
7
|
-
* Kept as a re-export rather than removed: this is a library, and an import path is as much a
|
|
8
|
-
* published interface as a class name.
|
|
9
|
-
*/
|
|
10
|
-
export const ParticleEmitterSystem3 = ParticleEmitterSystem;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Draws `particular`'s CPU-simulated particles with **Shade's own billboard renderer**.
|
|
3
|
-
*
|
|
4
|
-
* The simulation stays where it is — emission, ageing, parameter tracks, sorting and bounds are
|
|
5
|
-
* meep's and are unchanged — and what crosses to the GPU each frame is the state it produced, in
|
|
6
|
-
* the layout that renderer already reads: a pool of particle records, a list of the slots to draw,
|
|
7
|
-
* and one emitter record per particle *layer* saying where that layer's sprite is in the atlas and
|
|
8
|
-
* how it blends.
|
|
9
|
-
*
|
|
10
|
-
* Nothing here is a shader. The billboard expansion, the atlas lookup, the soft-depth fade and the
|
|
11
|
-
* premultiplied blend that expresses both alpha and additive in one pipeline are Shade's, already
|
|
12
|
-
* written and already tested; this is the packer and the residency that lets them draw somebody
|
|
13
|
-
* else's particles.
|
|
14
|
-
*/
|
|
15
|
-
export class GPUParticularRenderer {
|
|
16
|
-
/**
|
|
17
|
-
* How many particles are waiting to be drawn. Read-only, and zero until {@link update} has run.
|
|
18
|
-
*
|
|
19
|
-
* @returns {number}
|
|
20
|
-
*/
|
|
21
|
-
get count(): number;
|
|
22
|
-
/**
|
|
23
|
-
* How many layer records the last pack wrote — the occupied rows of the emitter table.
|
|
24
|
-
*
|
|
25
|
-
* @returns {number}
|
|
26
|
-
*/
|
|
27
|
-
get record_count(): number;
|
|
28
|
-
/**
|
|
29
|
-
* Record the billboard draw into `graph`, over the colour it is given.
|
|
30
|
-
*
|
|
31
|
-
* @param {object} args
|
|
32
|
-
* @param {FrameGraph} args.graph
|
|
33
|
-
* @param {number} args.color colour resource handle to draw over
|
|
34
|
-
* @param {number} args.depth scene depth — tested against, and sampled for the soft fade
|
|
35
|
-
* @param {GPUBuffer|GPUTypedBuffer} args.camera
|
|
36
|
-
* @param {ParticleEmitter[]} args.emitters
|
|
37
|
-
* @param {Sampler2D} args.atlas
|
|
38
|
-
* @param {number[]|Float32Array} args.camera_position world space
|
|
39
|
-
* @param {number[]|Float32Array} args.camera_right world space
|
|
40
|
-
* @param {number[]|Float32Array} args.camera_up world space
|
|
41
|
-
* @returns {number} the colour handle after the draw
|
|
42
|
-
*/
|
|
43
|
-
graph_draw({ graph, color, depth, camera, emitters, atlas, camera_position, camera_right, camera_up }: {
|
|
44
|
-
graph: FrameGraph;
|
|
45
|
-
color: number;
|
|
46
|
-
depth: number;
|
|
47
|
-
camera: GPUBuffer | GPUTypedBuffer;
|
|
48
|
-
emitters: ParticleEmitter[];
|
|
49
|
-
atlas: Sampler2D;
|
|
50
|
-
camera_position: number[] | Float32Array;
|
|
51
|
-
camera_right: number[] | Float32Array;
|
|
52
|
-
camera_up: number[] | Float32Array;
|
|
53
|
-
}): number;
|
|
54
|
-
/**
|
|
55
|
-
* Give back everything held on the device. The renderer lives as long as the system that owns
|
|
56
|
-
* it, and a scene reload builds both again.
|
|
57
|
-
*/
|
|
58
|
-
destroy(): void;
|
|
59
|
-
#private;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=GPUParticularRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GPUParticularRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics3/particles/GPUParticularRenderer.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;GAaG;AACH;IAwGI;;;;OAIG;IACH,oBAEC;IAED;;;;OAIG;IACH,2BAEC;IAkTD;;;;;;;;;;;;;;OAcG;IACH;QAX4B,KAAK;QACT,KAAK,EAAlB,MAAM;QACO,KAAK,EAAlB,MAAM;QACyB,MAAM,EAArC,0BAAwB;QACA,QAAQ,EAAhC,iBAAiB;QACD,KAAK;QACO,eAAe,EAA3C,MAAM,EAAE,GAAC,YAAY;QACO,YAAY,EAAxC,MAAM,EAAE,GAAC,YAAY;QACO,SAAS,EAArC,MAAM,EAAE,GAAC,YAAY;QACnB,MAAM,CAiBlB;IAqFD;;;OAGG;IACH,gBA2BC;;CACJ"}
|