@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,194 +0,0 @@
|
|
|
1
|
-
import { SGMesh } from "../graphics/ecs/mesh-v2/aggregate/SGMesh.js";
|
|
2
|
-
import { SerializationMetadata } from "../ecs/components/SerializationMetadata.js";
|
|
3
|
-
import { removeComponentsExcept } from "../ecs/util/removeComponentsExcept.js";
|
|
4
|
-
import { ParticleEmitter } from "../graphics/particles/particular/engine/emitter/ParticleEmitter.js";
|
|
5
|
-
import Trail2D from "../graphics/ecs/trail2d/Trail2D.js";
|
|
6
|
-
import { Transform64 } from "../ecs/transform/Transform64.js";
|
|
7
|
-
import Entity from "../ecs/Entity.js";
|
|
8
|
-
import { stopEntityAndNotifyWhenStopped } from "./AnimatedActions.js";
|
|
9
|
-
|
|
10
|
-
const lib = {
|
|
11
|
-
'mesh-cloud-puff-0': {
|
|
12
|
-
"position": {
|
|
13
|
-
"x": 9.17416,
|
|
14
|
-
"y": -1.90031,
|
|
15
|
-
"z": 12.06082
|
|
16
|
-
},
|
|
17
|
-
"scale": {
|
|
18
|
-
"x": 1,
|
|
19
|
-
"y": 1,
|
|
20
|
-
"z": 1
|
|
21
|
-
},
|
|
22
|
-
"rotation": {
|
|
23
|
-
"x": 0,
|
|
24
|
-
"y": 0,
|
|
25
|
-
"z": 0,
|
|
26
|
-
"w": 1
|
|
27
|
-
},
|
|
28
|
-
"parameters": [
|
|
29
|
-
{
|
|
30
|
-
"name": "scale",
|
|
31
|
-
"itemSize": 1,
|
|
32
|
-
"defaultTrackValue": {
|
|
33
|
-
"itemSize": 1,
|
|
34
|
-
"data": [
|
|
35
|
-
1
|
|
36
|
-
],
|
|
37
|
-
"positions": [
|
|
38
|
-
0
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "color",
|
|
44
|
-
"itemSize": 4,
|
|
45
|
-
"defaultTrackValue": {
|
|
46
|
-
"itemSize": 4,
|
|
47
|
-
"data": [
|
|
48
|
-
1,
|
|
49
|
-
1,
|
|
50
|
-
1,
|
|
51
|
-
1
|
|
52
|
-
],
|
|
53
|
-
"positions": [
|
|
54
|
-
0
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"preWarm": false,
|
|
60
|
-
"readDepth": true,
|
|
61
|
-
"softDepth": true,
|
|
62
|
-
"blendingMode": 0,
|
|
63
|
-
"layers": [
|
|
64
|
-
{
|
|
65
|
-
"imageURL": "data/textures/particle/smokeparticle.png",
|
|
66
|
-
"particleLife": {
|
|
67
|
-
"min": 0.6,
|
|
68
|
-
"max": 1.2
|
|
69
|
-
},
|
|
70
|
-
"particleSize": {
|
|
71
|
-
"min": 0.2,
|
|
72
|
-
"max": 0.3
|
|
73
|
-
},
|
|
74
|
-
"particleRotation": {
|
|
75
|
-
"min": 0,
|
|
76
|
-
"max": 0
|
|
77
|
-
},
|
|
78
|
-
"particleRotationSpeed": {
|
|
79
|
-
"min": 0,
|
|
80
|
-
"max": 0
|
|
81
|
-
},
|
|
82
|
-
"emissionShape": 1,
|
|
83
|
-
"emissionFrom": 1,
|
|
84
|
-
"emissionRate": 0,
|
|
85
|
-
"emissionImmediate": 1200,
|
|
86
|
-
"parameterTracks": [
|
|
87
|
-
{
|
|
88
|
-
"name": "color",
|
|
89
|
-
"track": {
|
|
90
|
-
"itemSize": 4,
|
|
91
|
-
"data": [
|
|
92
|
-
0.9803921568627451,
|
|
93
|
-
0.9803921568627451,
|
|
94
|
-
0.9803921568627451,
|
|
95
|
-
0.3,
|
|
96
|
-
0.9882352941176471,
|
|
97
|
-
0.9882352941176471,
|
|
98
|
-
0.9882352941176471,
|
|
99
|
-
0.265,
|
|
100
|
-
0.9882352941176471,
|
|
101
|
-
0.9882352941176471,
|
|
102
|
-
0.9882352941176471,
|
|
103
|
-
0
|
|
104
|
-
],
|
|
105
|
-
"positions": [
|
|
106
|
-
0,
|
|
107
|
-
0.7957639171068672,
|
|
108
|
-
1
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"position": {
|
|
114
|
-
"x": 0,
|
|
115
|
-
"y": 0.6,
|
|
116
|
-
"z": 0
|
|
117
|
-
},
|
|
118
|
-
"scale": {
|
|
119
|
-
"x": 0.9,
|
|
120
|
-
"y": 0.5,
|
|
121
|
-
"z": 0.65
|
|
122
|
-
},
|
|
123
|
-
"particleVelocityDirection": {
|
|
124
|
-
"direction": {
|
|
125
|
-
"x": 0,
|
|
126
|
-
"y": 1,
|
|
127
|
-
"z": 0
|
|
128
|
-
},
|
|
129
|
-
"angle": 0
|
|
130
|
-
},
|
|
131
|
-
"particleSpeed": {
|
|
132
|
-
"min": 0.6,
|
|
133
|
-
"max": 1.1
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
*
|
|
142
|
-
* @param {Object} options
|
|
143
|
-
* @param {EntityManager} options.entityManager
|
|
144
|
-
* @param {EntityComponentDataset} options.ecd
|
|
145
|
-
* @param {number} options.entity
|
|
146
|
-
* @param {string} options.particles
|
|
147
|
-
* @returns {Promise<any>}
|
|
148
|
-
*/
|
|
149
|
-
export function removeEntityWithMeshParticlesEffect(
|
|
150
|
-
{
|
|
151
|
-
entityManager,
|
|
152
|
-
ecd,
|
|
153
|
-
entity,
|
|
154
|
-
particles = 'mesh-cloud-puff-0'
|
|
155
|
-
}
|
|
156
|
-
) {
|
|
157
|
-
|
|
158
|
-
const emitter = ParticleEmitter.fromJSON(lib[particles]);
|
|
159
|
-
|
|
160
|
-
//prevent further interactions
|
|
161
|
-
removeComponentsExcept(ecd, entity, [SGMesh, ParticleEmitter, Trail2D, Transform64]);
|
|
162
|
-
|
|
163
|
-
//make entity volatile so it does not end up in game saves. The entity is mid-death here;
|
|
164
|
-
//without this a save taken during the effect would restore a corpse that never finishes dying.
|
|
165
|
-
ecd.addComponentToEntity(entity, SerializationMetadata.Transient);
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
* @type {Transform64}
|
|
170
|
-
*/
|
|
171
|
-
const originalTransform = ecd.getComponent(entity, Transform64);
|
|
172
|
-
|
|
173
|
-
if (originalTransform === undefined) {
|
|
174
|
-
throw new Error(`entity ${entity} doesn't have Transform`);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
//create particle emitter
|
|
178
|
-
const effectBuilder = new Entity();
|
|
179
|
-
const effectEntity = effectBuilder
|
|
180
|
-
.add(emitter)
|
|
181
|
-
.add(originalTransform.clone())
|
|
182
|
-
.build(ecd);
|
|
183
|
-
|
|
184
|
-
Promise.all([
|
|
185
|
-
stopEntityAndNotifyWhenStopped(effectEntity, ecd)
|
|
186
|
-
])
|
|
187
|
-
.then(() => effectBuilder.destroy());
|
|
188
|
-
|
|
189
|
-
return stopEntityAndNotifyWhenStopped(entity, ecd)
|
|
190
|
-
.then(() => {
|
|
191
|
-
ecd.removeEntity(entity);
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated
|
|
3
|
-
*/
|
|
4
|
-
export class Sprite {
|
|
5
|
-
size: number;
|
|
6
|
-
url: string;
|
|
7
|
-
opacity: Vector1;
|
|
8
|
-
color: Color;
|
|
9
|
-
}
|
|
10
|
-
export namespace Sprite {
|
|
11
|
-
let typeName: string;
|
|
12
|
-
}
|
|
13
|
-
import Vector1 from "../../../../core/geom/Vector1.js";
|
|
14
|
-
import { Color } from "../../../../core/color/Color.js";
|
|
15
|
-
//# sourceMappingURL=Sprite.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sprite.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/sprite/Sprite.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACI,aAAS;IACT,YAAS;IACT,iBAAyB;IACzB,aAA2B;CAC9B;;;;oBAXmB,kCAAkC;sBAChC,iCAAiC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import Vector1 from "../../../../core/geom/Vector1.js";
|
|
2
|
-
import { Color } from "../../../../core/color/Color.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated
|
|
6
|
-
*/
|
|
7
|
-
export class Sprite {
|
|
8
|
-
size = 1;
|
|
9
|
-
url = "";
|
|
10
|
-
opacity = new Vector1(1);
|
|
11
|
-
color = new Color(1, 1, 1);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
Sprite.typeName = "Sprite";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated
|
|
3
|
-
*/
|
|
4
|
-
export class SpriteSystemPE extends AbstractContextSystem<any> {
|
|
5
|
-
constructor();
|
|
6
|
-
dependencies: (typeof Transform64 | typeof Sprite)[];
|
|
7
|
-
}
|
|
8
|
-
import { AbstractContextSystem } from "../../../ecs/system/AbstractContextSystem.js";
|
|
9
|
-
import { Transform64 } from "../../../ecs/transform/Transform64.js";
|
|
10
|
-
import { Sprite } from "./Sprite.js";
|
|
11
|
-
//# sourceMappingURL=SpriteSystemPE.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SpriteSystemPE.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/sprite/SpriteSystemPE.js"],"names":[],"mappings":"AAsIA;;GAEG;AACH;IAGI,cAEC;IAJD,qDAAqC;CAKxC;sCA5IqC,8CAA8C;4BAGxD,uCAAuC;uBAQ5C,aAAa"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { float_to_uint8 } from "../../../../core/binary/float_to_uint8.js";
|
|
2
|
-
import { SerializationMetadata } from "../../../ecs/components/SerializationMetadata.js";
|
|
3
|
-
import Entity from "../../../ecs/Entity.js";
|
|
4
|
-
import { AbstractContextSystem } from "../../../ecs/system/AbstractContextSystem.js";
|
|
5
|
-
import { SystemEntityContext } from "../../../ecs/system/SystemEntityContext.js";
|
|
6
|
-
import { TRANSFORM64_EVENT_CHANGE } from "../../../ecs/transform/TRANSFORM64_EVENT_CHANGE.js";
|
|
7
|
-
import { Transform64 } from "../../../ecs/transform/Transform64.js";
|
|
8
|
-
import {
|
|
9
|
-
PARTICLE_ATTRIBUTE_COLOR,
|
|
10
|
-
PARTICLE_ATTRIBUTE_POSITION
|
|
11
|
-
} from "../../particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js";
|
|
12
|
-
import { ParticleEmitter } from "../../particles/particular/engine/emitter/ParticleEmitter.js";
|
|
13
|
-
import { ParticleEmitterFlag } from "../../particles/particular/engine/emitter/ParticleEmitterFlag.js";
|
|
14
|
-
import { ParticleLayer } from "../../particles/particular/engine/emitter/ParticleLayer.js";
|
|
15
|
-
import { Sprite } from "./Sprite.js";
|
|
16
|
-
|
|
17
|
-
class Context extends SystemEntityContext {
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
|
|
21
|
-
this.__emitter = new ParticleEmitter();
|
|
22
|
-
this.__layer = new ParticleLayer();
|
|
23
|
-
|
|
24
|
-
this.__layer.emissionRate = 0;
|
|
25
|
-
this.__layer.emissionImmediate = 1;
|
|
26
|
-
this.__layer.steps.reset();
|
|
27
|
-
this.__layer.particleLife.set(999999999, 999999999);
|
|
28
|
-
|
|
29
|
-
this.__emitter.addLayer(this.__layer);
|
|
30
|
-
|
|
31
|
-
this.__emitter_entity = new Entity()
|
|
32
|
-
.add(this.__emitter)
|
|
33
|
-
.add(new Transform64())
|
|
34
|
-
.add(SerializationMetadata.Transient);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
__copy_transform() {
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* @type {Transform64}
|
|
42
|
-
*/
|
|
43
|
-
const transform = this.components[1];
|
|
44
|
-
|
|
45
|
-
this.__emitter_entity.getComponent(Transform64).copy(transform);
|
|
46
|
-
|
|
47
|
-
const emitter = this.__emitter;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
emitter.particles?.writeAttributeVector3(0, PARTICLE_ATTRIBUTE_POSITION, transform.translation_x, transform.translation_y, transform.translation_z);
|
|
51
|
-
|
|
52
|
-
emitter.setFlag(ParticleEmitterFlag.ParticleBoundsNeedUpdate);
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
link() {
|
|
57
|
-
if (this.__is_linked) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
super.link();
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @type {Transform64}
|
|
67
|
-
*/
|
|
68
|
-
const transform = this.components[1];
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @type {Sprite}
|
|
73
|
-
*/
|
|
74
|
-
const sprite = this.components[0];
|
|
75
|
-
|
|
76
|
-
this.__layer.imageURL = sprite.url;
|
|
77
|
-
this.__layer.particleSize.set(sprite.size, sprite.size);
|
|
78
|
-
|
|
79
|
-
const emitter = this.__emitter;
|
|
80
|
-
|
|
81
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
|
|
82
|
-
//particle pool needs to be set up first
|
|
83
|
-
emitter.build();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Initialized)) {
|
|
87
|
-
//particles are not initialized, do that
|
|
88
|
-
emitter.initialize();
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
emitter.particles?.writeAttributeVector4(
|
|
92
|
-
0, PARTICLE_ATTRIBUTE_COLOR,
|
|
93
|
-
float_to_uint8(sprite.color.r), float_to_uint8(sprite.color.g), float_to_uint8(sprite.color.b), float_to_uint8(sprite.opacity.getValue())
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.__copy_transform();
|
|
98
|
-
|
|
99
|
-
// Subscribed only once the emitter is built and seeded: a throw above this point would
|
|
100
|
-
// otherwise leave the callback wired to a live entity whose every move re-throws, and
|
|
101
|
-
// Signal swallows handler errors, so it would never surface as anything but log noise.
|
|
102
|
-
//
|
|
103
|
-
// One listener where there were two, because a Transform64 announces itself whole rather
|
|
104
|
-
// than through a sub-object per component.
|
|
105
|
-
this.__on_transform_changed = () => this.__copy_transform();
|
|
106
|
-
|
|
107
|
-
this.getDataset().addEntityEventListener(
|
|
108
|
-
this.entity, TRANSFORM64_EVENT_CHANGE, this.__on_transform_changed
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
emitter.computeBoundingBox();
|
|
112
|
-
|
|
113
|
-
this.__emitter_entity.build(this.getDataset());
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
unlink() {
|
|
117
|
-
if (!this.__is_linked) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (this.__on_transform_changed !== undefined) {
|
|
122
|
-
this.getDataset().removeEntityEventListener(
|
|
123
|
-
this.entity, TRANSFORM64_EVENT_CHANGE, this.__on_transform_changed
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
this.__on_transform_changed = undefined;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
super.unlink();
|
|
130
|
-
|
|
131
|
-
this.__emitter_entity.destroy();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* @deprecated
|
|
137
|
-
*/
|
|
138
|
-
export class SpriteSystemPE extends AbstractContextSystem {
|
|
139
|
-
dependencies = [Sprite, Transform64];
|
|
140
|
-
|
|
141
|
-
constructor() {
|
|
142
|
-
super(Context);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MovingBoundingBox.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/particles/particular/engine/MovingBoundingBox.js"],"names":[],"mappings":"AAcA;;GAEG;AACH;IACI;;;OAGG;IACH,QAFU,MAAM,CAEL;IAEX;;;OAGG;IACH,cAFU,KAAK,CAE4B;IAE3C;;;OAGG;IACH,aAFU,KAAK,CAE2B;IAE1C;;;OAGG;IACH,kBAFU,aAAa,CAEoC;IAE3D;;;OAGG;IACH,UAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,kBAFW,MAAM,QAKhB;IAED,uBAwBC;IAED,2BAgCC;IAED;;;;;OAKG;IACH,QAJW,MAAM,KACN,MAAM,KACN,MAAM,QAyBhB;CACJ;sBAtJqB,2CAA2C;8BAFnC,uDAAuD;oBAGjE,qCAAqC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export class ParticularEngine {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {AssetManager} assetManager
|
|
5
|
-
* @constructor
|
|
6
|
-
*/
|
|
7
|
-
constructor(assetManager: AssetManager);
|
|
8
|
-
/**
|
|
9
|
-
* Managed emitters
|
|
10
|
-
* @type {List.<ParticleEmitter>}
|
|
11
|
-
*/
|
|
12
|
-
emitters: List<ParticleEmitter>;
|
|
13
|
-
/**
|
|
14
|
-
* @readonly
|
|
15
|
-
* @type {BVH}
|
|
16
|
-
*/
|
|
17
|
-
readonly bvh: BVH;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {AbstractSimulationStep[]}
|
|
21
|
-
*/
|
|
22
|
-
steps: AbstractSimulationStep[];
|
|
23
|
-
shaderManager: ShaderManager;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {ParticleEmitter} emitter
|
|
27
|
-
*/
|
|
28
|
-
add(emitter: ParticleEmitter): void;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @param {ParticleEmitter} emitter
|
|
32
|
-
* @returns {boolean}
|
|
33
|
-
*/
|
|
34
|
-
remove(emitter: ParticleEmitter): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Hand back the resources held on behalf of the managed emitters. Emitters themselves are owned by
|
|
37
|
-
* their components and are disposed by {@link ParticleEmitter#dispose} as they are removed.
|
|
38
|
-
*/
|
|
39
|
-
dispose(): void;
|
|
40
|
-
/**
|
|
41
|
-
* @private
|
|
42
|
-
* @param {ParticleEmitter} emitter
|
|
43
|
-
* @param {number} timeDelta
|
|
44
|
-
*/
|
|
45
|
-
private advanceEmitter;
|
|
46
|
-
/**
|
|
47
|
-
* @private
|
|
48
|
-
* @param {ParticleEmitter} emitter
|
|
49
|
-
* @param {number} timeDelta
|
|
50
|
-
*/
|
|
51
|
-
private updateEmitter;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @param {number} timeDelta
|
|
55
|
-
*/
|
|
56
|
-
advance(timeDelta: number): void;
|
|
57
|
-
}
|
|
58
|
-
import List from "../../../../../core/collection/list/List.js";
|
|
59
|
-
import { BVH } from "../../../../../core/bvh2/bvh3/BVH.js";
|
|
60
|
-
import { ShaderManager } from "./shader/ShaderManager.js";
|
|
61
|
-
//# sourceMappingURL=ParticularEngine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParticularEngine.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/particles/particular/engine/ParticularEngine.js"],"names":[],"mappings":"AAUA;IAyBI;;;;OAIG;IACH,wCAEC;IA/BD;;;OAGG;IACH,UAFU,qBAAsB,CAEV;IAEtB;;;OAGG;IACH,cAFU,GAAG,CAEG;IAGhB;;;OAGG;IACH,OAFU,wBAAwB,CAOhC;IAQE,6BAAoD;IAGxD;;;OAGG;IACH,oCAaC;IAED;;;;OAIG;IACH,kCAFa,OAAO,CAenB;IAED;;;OAGG;IACH,gBAEC;IAED;;;;OAIG;IACH,uBAsEC;IAED;;;;OAIG;IACH,sBAuCC;IAED;;;OAGG;IACH,mBAFW,MAAM,QAWhB;CACJ;iBAnOgB,6CAA6C;oBAD1C,sCAAsC;8BAG5B,2BAA2B"}
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { BVH } from "../../../../../core/bvh2/bvh3/BVH.js";
|
|
2
|
-
import List from "../../../../../core/collection/list/List.js";
|
|
3
|
-
import { ParticleEmitterFlag } from "./emitter/ParticleEmitterFlag.js";
|
|
4
|
-
import { ShaderManager } from "./shader/ShaderManager.js";
|
|
5
|
-
import { SimulationStepApplyForce } from "./simulator/SimulationStepApplyForce.js";
|
|
6
|
-
import { SimulationStepCurlNoiseAcceleration } from "./simulator/SimulationStepCurlNoiseAcceleration.js";
|
|
7
|
-
import { SimulationStepCurlNoiseVelocity } from "./simulator/SimulationStepCurlNoiseVelocity.js";
|
|
8
|
-
import { SimulationStepFixedPhysics } from "./simulator/SimulationStepFixedPhysics.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export class ParticularEngine {
|
|
12
|
-
/**
|
|
13
|
-
* Managed emitters
|
|
14
|
-
* @type {List.<ParticleEmitter>}
|
|
15
|
-
*/
|
|
16
|
-
emitters = new List();
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @readonly
|
|
20
|
-
* @type {BVH}
|
|
21
|
-
*/
|
|
22
|
-
bvh = new BVH();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {AbstractSimulationStep[]}
|
|
28
|
-
*/
|
|
29
|
-
steps = [
|
|
30
|
-
new SimulationStepFixedPhysics(),
|
|
31
|
-
new SimulationStepCurlNoiseAcceleration(),
|
|
32
|
-
new SimulationStepCurlNoiseVelocity(),
|
|
33
|
-
new SimulationStepApplyForce()
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @param {AssetManager} assetManager
|
|
39
|
-
* @constructor
|
|
40
|
-
*/
|
|
41
|
-
constructor(assetManager) {
|
|
42
|
-
this.shaderManager = new ShaderManager(assetManager);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @param {ParticleEmitter} emitter
|
|
48
|
-
*/
|
|
49
|
-
add(emitter) {
|
|
50
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
|
|
51
|
-
emitter.build();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
//mark sprites for update as their UVs might have changed since last usage
|
|
55
|
-
emitter.setFlag(ParticleEmitterFlag.SpritesNeedUpdate);
|
|
56
|
-
|
|
57
|
-
this.emitters.add(emitter);
|
|
58
|
-
|
|
59
|
-
this.shaderManager.register(emitter);
|
|
60
|
-
|
|
61
|
-
emitter.bvh_leaf.link(this.bvh, emitter.id);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @param {ParticleEmitter} emitter
|
|
67
|
-
* @returns {boolean}
|
|
68
|
-
*/
|
|
69
|
-
remove(emitter) {
|
|
70
|
-
|
|
71
|
-
const removed = this.emitters.removeOneOf(emitter);
|
|
72
|
-
|
|
73
|
-
if (!removed) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
this.shaderManager.deregister(emitter);
|
|
78
|
-
|
|
79
|
-
emitter.bvh_leaf.unlink();
|
|
80
|
-
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Hand back the resources held on behalf of the managed emitters. Emitters themselves are owned by
|
|
86
|
-
* their components and are disposed by {@link ParticleEmitter#dispose} as they are removed.
|
|
87
|
-
*/
|
|
88
|
-
dispose() {
|
|
89
|
-
this.shaderManager.dispose();
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* @private
|
|
94
|
-
* @param {ParticleEmitter} emitter
|
|
95
|
-
* @param {number} timeDelta
|
|
96
|
-
*/
|
|
97
|
-
advanceEmitter(emitter, timeDelta) {
|
|
98
|
-
let i, j;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @type {List<ParticleLayer>}
|
|
104
|
-
*/
|
|
105
|
-
const layers = emitter.layers;
|
|
106
|
-
|
|
107
|
-
const layer_count = layers.length;
|
|
108
|
-
|
|
109
|
-
let step_mask = 0;
|
|
110
|
-
|
|
111
|
-
const steps = this.steps;
|
|
112
|
-
|
|
113
|
-
for (j = 0; j < layer_count; j++) {
|
|
114
|
-
const particleLayer = layers.get(j);
|
|
115
|
-
|
|
116
|
-
const simulationStepDefinitions = particleLayer.steps;
|
|
117
|
-
|
|
118
|
-
const n = simulationStepDefinitions.length;
|
|
119
|
-
|
|
120
|
-
for (i = 0; i < n; i++) {
|
|
121
|
-
/**
|
|
122
|
-
*
|
|
123
|
-
* @type {SimulationStepDefinition}
|
|
124
|
-
*/
|
|
125
|
-
const stepDefinition = simulationStepDefinitions.get(i);
|
|
126
|
-
|
|
127
|
-
const type = stepDefinition.type;
|
|
128
|
-
|
|
129
|
-
step_mask |= 1 << type;
|
|
130
|
-
|
|
131
|
-
const step = steps[type];
|
|
132
|
-
|
|
133
|
-
if (step === undefined) {
|
|
134
|
-
// no step definition
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
step.emitter = emitter;
|
|
139
|
-
step.timeDelta = timeDelta;
|
|
140
|
-
step.particles = emitter.particles;
|
|
141
|
-
step.layer_parameters[j] = stepDefinition.parameters;
|
|
142
|
-
step.includeLayer(j);
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// apply simulation steps
|
|
148
|
-
const step_index_limit = steps.length;
|
|
149
|
-
|
|
150
|
-
for (i = 0; i < step_index_limit; i++) {
|
|
151
|
-
const m = 1 << i;
|
|
152
|
-
const is_used = (step_mask & m) !== 0;
|
|
153
|
-
|
|
154
|
-
if (is_used) {
|
|
155
|
-
const step = steps[i];
|
|
156
|
-
|
|
157
|
-
step.layer_count = layer_count;
|
|
158
|
-
|
|
159
|
-
step.execute();
|
|
160
|
-
|
|
161
|
-
step.clear();
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
emitter.advance(timeDelta);
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @private
|
|
171
|
-
* @param {ParticleEmitter} emitter
|
|
172
|
-
* @param {number} timeDelta
|
|
173
|
-
*/
|
|
174
|
-
updateEmitter(emitter, timeDelta) {
|
|
175
|
-
if (emitter.getFlag(ParticleEmitterFlag.Sleeping)) {
|
|
176
|
-
emitter.sleepTime += timeDelta;
|
|
177
|
-
} else {
|
|
178
|
-
|
|
179
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Initialized)) {
|
|
180
|
-
emitter.initialize();
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (emitter.sleepTime > 0) {
|
|
184
|
-
//emitter was sleeping, need to catch up the simulation
|
|
185
|
-
const maxParticleLife = emitter.computeMaxEmittingParticleLife();
|
|
186
|
-
|
|
187
|
-
let wakingTime = Math.min(emitter.sleepTime, maxParticleLife - timeDelta);
|
|
188
|
-
|
|
189
|
-
const minWakingIncrement = 0.15;
|
|
190
|
-
|
|
191
|
-
const maxWakingSteps = 10;
|
|
192
|
-
|
|
193
|
-
const wakingIncrement = Math.max(wakingTime / maxWakingSteps, minWakingIncrement);
|
|
194
|
-
|
|
195
|
-
while (wakingTime > 0) {
|
|
196
|
-
const wakingStep = Math.min(wakingIncrement, wakingTime);
|
|
197
|
-
|
|
198
|
-
this.advanceEmitter(emitter, wakingStep);
|
|
199
|
-
|
|
200
|
-
wakingTime -= wakingStep;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
//consume the sleep time
|
|
204
|
-
emitter.sleepTime = 0;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
//advance simulation
|
|
208
|
-
this.advanceEmitter(emitter, timeDelta);
|
|
209
|
-
|
|
210
|
-
//update bounding box
|
|
211
|
-
emitter.computeBoundingBox();
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
*
|
|
217
|
-
* @param {number} timeDelta
|
|
218
|
-
*/
|
|
219
|
-
advance(timeDelta) {
|
|
220
|
-
const emitters = this.emitters;
|
|
221
|
-
|
|
222
|
-
const numEmitters = emitters.length;
|
|
223
|
-
|
|
224
|
-
for (let i = 0; i < numEmitters; i++) {
|
|
225
|
-
const emitter = emitters.get(i);
|
|
226
|
-
this.updateEmitter(emitter, timeDelta);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmissionFromType.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.js"],"names":[],"mappings":"+BAEU,MAAM"}
|