@woosh/meep-engine 3.33.0 → 3.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/editor/Editor.d.ts.map +1 -1
- package/editor/Editor.js +0 -3
- package/editor/ecs/component/prototypeObjectEditor.js +1 -165
- package/editor/ecs/component/registerBasicTypeEditors.d.ts.map +1 -1
- package/editor/ecs/component/registerBasicTypeEditors.js +0 -5
- package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -1
- package/editor/ecs/component/registerEngineComponentEditors.js +0 -20
- package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -1
- package/editor/process/SymbolicDisplayProcess.js +100 -106
- package/editor/prototypeEditorShell.d.ts.map +1 -1
- package/editor/prototypeEditorShell.js +190 -186
- package/editor/templates/entity_templates.d.ts.map +1 -1
- package/editor/templates/entity_templates.js +10 -27
- package/editor/view/makeEntityDecorators.js +2 -2
- package/package.json +1 -1
- package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.d.ts +3 -3
- package/src/core/geom/3d/aabb/MovingBoundingBox.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.js +5 -5
- package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts +3 -0
- package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGBA_LUT_HEATMAP_IR.js +1 -1
- package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts +6 -0
- package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_INFERNO.js +1 -1
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.d.ts +1 -1
- package/src/core/math/lookup/RGB_LUT_TURBO.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.js +1 -1
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.d.ts +1 -1
- package/src/core/math/lookup/RGB_LUT_VIRIDIS.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.js +1 -1
- package/src/engine/animation/AnimatedActions.d.ts.map +1 -1
- package/src/engine/animation/AnimatedActions.js +2 -4
- package/src/engine/animation/AnimationUtils.d.ts +1 -17
- package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
- package/src/engine/animation/AnimationUtils.js +138 -246
- package/src/engine/ecs/EntityManager.d.ts +1 -1
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +2 -2
- package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +268 -275
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +0 -10
- package/src/engine/graphics/geometry/distribute_points_on_indexed_triangles.d.ts.map +1 -0
- package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.js +3 -3
- package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/lut_to_sampler.d.ts.map +1 -0
- package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.js +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +0 -3
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +0 -3
- package/src/engine/network/NetworkSession.d.ts +1 -1
- package/src/engine/network/NetworkSession.js +1 -1
- package/src/engine/physics/cloth/MEASUREMENTS.md +115 -0
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +2 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +9 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +30 -7
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +12 -2
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +11 -2
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/LiveEmitterSet.js +14 -7
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts +6 -15
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.js +161 -174
- package/src/shade/device/mock/SoftwareGPUBuffer.d.ts +5 -3
- package/src/shade/device/mock/SoftwareGPUBuffer.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUBuffer.js +32 -3
- package/src/shade/playground/caldera/main.js +73 -60
- package/src/shade/playground/vgeo_runtime/main.js +25 -77
- package/src/shade/playground/vgeo_scene/main.js +2231 -2217
- package/src/shade/renderer/GraphicsContext.d.ts +7 -0
- package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
- package/src/shade/renderer/GraphicsContext.js +11 -2
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +38 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +8 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +21 -0
- package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.js +9 -10
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +5 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +25 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +115 -101
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +282 -140
- package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +30 -0
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +4 -1
- package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +536 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +6 -2
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +68 -19
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts +2 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +17 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts +4 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +42 -12
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +93 -12
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +166 -20
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +30 -7
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +12 -5
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +23 -13
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.js +1 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +1 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +10 -6
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +45 -17
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +61 -19
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +8 -11
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +9 -16
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +25 -10
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +10 -8
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +19 -7
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts +4 -2
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.js +4 -2
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts +4 -0
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.js +7 -0
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +1 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.js +2 -0
- package/src/shade/renderer/particles/DESIGN.md +4 -10
- package/src/shade/renderer/particles/ParticleConstants.d.ts +1 -3
- package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
- package/src/shade/renderer/particles/ParticleConstants.js +1 -3
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts +3 -4
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +3 -4
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +45 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +99 -0
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts +4 -4
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.js +36 -36
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts +15 -0
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.js +103 -0
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts +3 -0
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.js +6 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +26 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +91 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts +22 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.js +102 -0
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts +2 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +28 -24
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +32 -28
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +9 -105
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +5 -0
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +11 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +11 -3
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +93 -21
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +4 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +5 -23
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +63 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts +12 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.js +11 -0
- package/src/shade/renderer/shadow/map/Shadowmap.d.ts +15 -0
- package/src/shade/renderer/shadow/map/Shadowmap.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/Shadowmap.js +17 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts +25 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.js +22 -0
- package/src/shade/renderer/shadow/map/shadowmap_update_score.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shadowmap_update_score.js +5 -2
- package/src/shade/renderer/texture/TextureManager.d.ts +2 -1
- package/src/shade/renderer/texture/TextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/TextureManager.js +4 -1
- package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +1 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts +9 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts.map +1 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.js +55 -5
- package/src/shade/renderer/view/ViewManager.d.ts +7 -1
- package/src/shade/renderer/view/ViewManager.d.ts.map +1 -1
- package/src/shade/renderer/view/ViewManager.js +17 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +1 -0
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +0 -20
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +0 -35
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +0 -12
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +0 -17
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +0 -14
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.js +0 -18
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +0 -52
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +0 -58
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +0 -47
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.js +0 -58
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +0 -16
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.js +0 -21
- package/editor/particles/rebuildParticleEmitter.d.ts +0 -11
- package/editor/particles/rebuildParticleEmitter.d.ts.map +0 -1
- package/editor/particles/rebuildParticleEmitter.js +0 -31
- package/editor/process/ParticleEmitterRebuildProcess.d.ts +0 -66
- package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +0 -1
- package/editor/process/ParticleEmitterRebuildProcess.js +0 -217
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts +0 -18
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts.map +0 -1
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.js +0 -140
- package/src/engine/animation/removeEntityGenericEffect.d.ts +0 -18
- package/src/engine/animation/removeEntityGenericEffect.d.ts.map +0 -1
- package/src/engine/animation/removeEntityGenericEffect.js +0 -160
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts +0 -16
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts.map +0 -1
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +0 -194
- package/src/engine/graphics/ecs/sprite/Sprite.d.ts +0 -15
- package/src/engine/graphics/ecs/sprite/Sprite.d.ts.map +0 -1
- package/src/engine/graphics/ecs/sprite/Sprite.js +0 -14
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts +0 -11
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +0 -1
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +0 -144
- package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +0 -61
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +0 -229
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.js +0 -8
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.js +0 -9
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js +0 -12
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts +0 -3
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.js +0 -84
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +0 -285
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +0 -1201
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js +0 -67
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +0 -197
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +0 -398
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.js +0 -4
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +0 -162
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +0 -472
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +0 -10
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +0 -37
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.js +0 -25
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.js +0 -28
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.js +0 -162
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.js +0 -103
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts +0 -8
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.js +0 -28
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.js +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts +0 -60
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +0 -128
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +0 -47
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.js +0 -77
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +0 -45
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.js +0 -93
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +0 -95
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.js +0 -239
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts +0 -3
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_TURBO.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_VIRIDIS.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.js +0 -28
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.js +0 -24
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.js +0 -27
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts +0 -33
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.js +0 -80
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +0 -49
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +0 -135
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts +0 -7
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.js +0 -14
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts +0 -41
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.js +0 -59
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.js +0 -56
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.js +0 -84
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js +0 -80
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts +0 -29
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js +0 -43
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js +0 -104
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.js +0 -11
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.js +0 -64
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js +0 -172
- package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +0 -20
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +0 -84
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +0 -81
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.js +0 -200
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.js +0 -8
- package/src/engine/graphics/particles/particular/engine/utils/volume/lut_to_sampler.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/Operation.d.ts +0 -20
- package/src/engine/graphics/particles/particular/group/Operation.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/Operation.js +0 -20
- package/src/engine/graphics/particles/particular/group/OperationType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/OperationType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/OperationType.js +0 -9
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts +0 -27
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.js +0 -27
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts +0 -8
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.js +0 -11
- package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleDataType.js +0 -10
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts +0 -24
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +0 -48
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.js +0 -20
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts +0 -6
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +0 -162
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts +0 -8
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.js +0 -19
- package/src/engine/graphics3/ParticleEmitterSystem.d.ts +0 -77
- package/src/engine/graphics3/ParticleEmitterSystem.d.ts.map +0 -1
- package/src/engine/graphics3/ParticleEmitterSystem.js +0 -307
- package/src/engine/graphics3/ParticleEmitterSystem3.d.ts +0 -10
- package/src/engine/graphics3/ParticleEmitterSystem3.d.ts.map +0 -1
- package/src/engine/graphics3/ParticleEmitterSystem3.js +0 -10
- package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts +0 -61
- package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts.map +0 -1
- package/src/engine/graphics3/particles/GPUParticularRenderer.js +0 -627
- package/src/engine/graphics3/particles/particle_gpu_records.d.ts +0 -85
- package/src/engine/graphics3/particles/particle_gpu_records.d.ts.map +0 -1
- package/src/engine/graphics3/particles/particle_gpu_records.js +0 -227
- package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts +0 -35
- package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts.map +0 -1
- package/src/shade/renderer/particles/shaders/shader_particle_render.js +0 -135
- /package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimulationStepCurlNoiseVelocity.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js"],"names":[],"mappings":"AAYA;CAmEC;uCA/EsC,6BAA6B"}
|
package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { AbstractSimulationStep } from "./AbstractSimulationStep.js";
|
|
2
|
-
import {
|
|
3
|
-
PARTICLE_ATTRIBUTE_LAYER_POSITION,
|
|
4
|
-
PARTICLE_ATTRIBUTE_POSITION,
|
|
5
|
-
PARTICLE_ATTRIBUTE_VELOCITY
|
|
6
|
-
} from "../emitter/PARTICLE_ATTRIBUTES.js";
|
|
7
|
-
import { curl_noise_3dt } from "../../../../../../core/math/noise/curl_noise_3dt.js";
|
|
8
|
-
|
|
9
|
-
const position = [];
|
|
10
|
-
const noise = [];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export class SimulationStepCurlNoiseVelocity extends AbstractSimulationStep {
|
|
14
|
-
|
|
15
|
-
execute() {
|
|
16
|
-
// The EMITTER's clock, not one of this step's own. `ParticularEngine`
|
|
17
|
-
// holds one instance of each step and reuses it for every emitter in
|
|
18
|
-
// the scene, so a clock here advanced once per emitter per frame: the
|
|
19
|
-
// noise field tracked wall time multiplied by however many emitters
|
|
20
|
-
// happened to be using this step, and the catch-up loop — up to ten
|
|
21
|
-
// calls for one waking emitter — jumped it for everyone else. Particle
|
|
22
|
-
// motion in one effect changed when an unrelated effect was spawned or
|
|
23
|
-
// despawned somewhere else in the scene, which is nothing the effect's
|
|
24
|
-
// own authoring can account for.
|
|
25
|
-
const time = this.emitter.simulated_time;
|
|
26
|
-
|
|
27
|
-
const particles = this.particles;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {Object[]}
|
|
32
|
-
*/
|
|
33
|
-
const layer_parameters = this.layer_parameters;
|
|
34
|
-
|
|
35
|
-
const liveParticleCount = particles.size();
|
|
36
|
-
|
|
37
|
-
const layerMask = this.layer_mask;
|
|
38
|
-
|
|
39
|
-
for (let i = 0; i < liveParticleCount; i++) {
|
|
40
|
-
|
|
41
|
-
const layer_position = particles.readAttributeScalar(i, PARTICLE_ATTRIBUTE_LAYER_POSITION);
|
|
42
|
-
|
|
43
|
-
if ((layerMask & (1 << layer_position)) === 0) {
|
|
44
|
-
//skip
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
particles.readAttributeVector3(i, PARTICLE_ATTRIBUTE_POSITION, position);
|
|
49
|
-
|
|
50
|
-
const params = layer_parameters[layer_position];
|
|
51
|
-
|
|
52
|
-
const power_x = params[0];
|
|
53
|
-
const power_y = params[1];
|
|
54
|
-
const power_z = params[2];
|
|
55
|
-
|
|
56
|
-
const scale_x = params[3];
|
|
57
|
-
const scale_y = params[4];
|
|
58
|
-
const scale_z = params[5];
|
|
59
|
-
|
|
60
|
-
curl_noise_3dt(noise, position[0] * scale_x, position[1] * scale_y, position[2] * scale_z, time * 0.01);
|
|
61
|
-
|
|
62
|
-
const delta_x = noise[0] * power_x;
|
|
63
|
-
const delta_y = noise[1] * power_y;
|
|
64
|
-
const delta_z = noise[2] * power_z;
|
|
65
|
-
|
|
66
|
-
particles.writeAttributeVector3(i, PARTICLE_ATTRIBUTE_VELOCITY, delta_x, delta_y, delta_z);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
get parameter_schema() {
|
|
71
|
-
return [
|
|
72
|
-
'power_x',
|
|
73
|
-
'power_y',
|
|
74
|
-
'power_z',
|
|
75
|
-
'scale_x',
|
|
76
|
-
'scale_y',
|
|
77
|
-
'scale_z'
|
|
78
|
-
];
|
|
79
|
-
}
|
|
80
|
-
}
|
package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export class SimulationStepDefinition {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {SimulationStepType} type
|
|
5
|
-
* @param {number[]} parameters
|
|
6
|
-
* @return {SimulationStepDefinition}
|
|
7
|
-
*/
|
|
8
|
-
static from(type: SimulationStepType, parameters: number[]): SimulationStepDefinition;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @type {SimulationStepType|number}
|
|
12
|
-
*/
|
|
13
|
-
type: SimulationStepType | number;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @type {number[]}
|
|
17
|
-
*/
|
|
18
|
-
parameters: number[];
|
|
19
|
-
toJSON(): {
|
|
20
|
-
type: string;
|
|
21
|
-
parameters: number[];
|
|
22
|
-
};
|
|
23
|
-
fromJSON({ type, parameters }: {
|
|
24
|
-
type: any;
|
|
25
|
-
parameters?: any[];
|
|
26
|
-
}): void;
|
|
27
|
-
}
|
|
28
|
-
import { SimulationStepType } from "./SimulationStepType.js";
|
|
29
|
-
//# sourceMappingURL=SimulationStepDefinition.d.ts.map
|
package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimulationStepDefinition.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js"],"names":[],"mappings":"AAGA;IAaI;;;;;OAKG;IACH,kBAJW,kBAAkB,cAClB,MAAM,EAAE,GACP,wBAAwB,CASnC;IAzBD;;;OAGG;IACH,MAFU,kBAAkB,GAAC,MAAM,CAED;IAElC;;;OAGG;IACH,YAFU,MAAM,EAAE,CAEF;IAiBhB;;;MAKC;IAED;;;aAGC;CACJ;mCA1CkC,yBAAyB"}
|
package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { SimulationStepType } from "./SimulationStepType.js";
|
|
2
|
-
import { objectKeyByValue } from "../../../../../../core/model/object/objectKeyByValue.js";
|
|
3
|
-
|
|
4
|
-
export class SimulationStepDefinition {
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @type {SimulationStepType|number}
|
|
8
|
-
*/
|
|
9
|
-
type = SimulationStepType.Unknown;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @type {number[]}
|
|
14
|
-
*/
|
|
15
|
-
parameters = [];
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {SimulationStepType} type
|
|
20
|
-
* @param {number[]} parameters
|
|
21
|
-
* @return {SimulationStepDefinition}
|
|
22
|
-
*/
|
|
23
|
-
static from(type, parameters) {
|
|
24
|
-
const r = new SimulationStepDefinition();
|
|
25
|
-
|
|
26
|
-
r.type = type;
|
|
27
|
-
r.parameters = parameters;
|
|
28
|
-
|
|
29
|
-
return r;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
toJSON() {
|
|
33
|
-
return {
|
|
34
|
-
type: objectKeyByValue(SimulationStepType, this.type),
|
|
35
|
-
parameters: this.parameters
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
fromJSON({ type, parameters = [] }) {
|
|
40
|
-
this.type = SimulationStepType[type];
|
|
41
|
-
this.parameters = parameters;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimulationStepFixedPhysics.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js"],"names":[],"mappings":"AA6BA;IAuEI,8BAEC;CACJ;uCAvGsC,6BAA6B"}
|
package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { AbstractSimulationStep } from "./AbstractSimulationStep.js";
|
|
2
|
-
import {
|
|
3
|
-
PARTICLE_ATTRIBUTE_AGE,
|
|
4
|
-
PARTICLE_ATTRIBUTE_DEATH_AGE,
|
|
5
|
-
PARTICLE_ATTRIBUTE_LAYER_POSITION,
|
|
6
|
-
PARTICLE_ATTRIBUTE_POSITION,
|
|
7
|
-
PARTICLE_ATTRIBUTE_ROTATION,
|
|
8
|
-
PARTICLE_ATTRIBUTE_ROTATION_SPEED,
|
|
9
|
-
PARTICLE_ATTRIBUTE_VELOCITY
|
|
10
|
-
} from "../emitter/PARTICLE_ATTRIBUTES.js";
|
|
11
|
-
import { update_parameters } from "./update_parameters.js";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Common buffer for better memory layout
|
|
15
|
-
* @type {ArrayBuffer}
|
|
16
|
-
*/
|
|
17
|
-
const scratch_common_buffer = new ArrayBuffer(4 * 3 * 2);
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {Float32Array|number[]|vec3}
|
|
21
|
-
*/
|
|
22
|
-
const velocity = new Float32Array(scratch_common_buffer, 0, 3);
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {Float32Array|number[]|vec3}
|
|
27
|
-
*/
|
|
28
|
-
const position = new Float32Array(scratch_common_buffer, 3 * 4, 3);
|
|
29
|
-
|
|
30
|
-
export class SimulationStepFixedPhysics extends AbstractSimulationStep {
|
|
31
|
-
execute() {
|
|
32
|
-
let i = 0;
|
|
33
|
-
const particles = this.particles;
|
|
34
|
-
const timeDelta = this.timeDelta;
|
|
35
|
-
|
|
36
|
-
const liveParticleCount = particles.size();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const layerMask = this.layer_mask;
|
|
40
|
-
|
|
41
|
-
const emitter = this.emitter;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @type {ParticleLayer[]}
|
|
46
|
-
*/
|
|
47
|
-
const layers = emitter.layers.asArray();
|
|
48
|
-
|
|
49
|
-
for (; i < liveParticleCount; i++) {
|
|
50
|
-
|
|
51
|
-
const layer_position = particles.readAttributeScalar(i, PARTICLE_ATTRIBUTE_LAYER_POSITION);
|
|
52
|
-
|
|
53
|
-
if ((layerMask & (1 << layer_position)) === 0) {
|
|
54
|
-
//skip
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const age = particles.readAttributeScalar(i, PARTICLE_ATTRIBUTE_AGE);
|
|
59
|
-
|
|
60
|
-
const deathAge = particles.readAttributeScalar(i, PARTICLE_ATTRIBUTE_DEATH_AGE);
|
|
61
|
-
|
|
62
|
-
const newAge = age + timeDelta;
|
|
63
|
-
|
|
64
|
-
const normalized_age = newAge / deathAge;
|
|
65
|
-
|
|
66
|
-
//retire dead particles
|
|
67
|
-
if (normalized_age >= 1) {
|
|
68
|
-
//add to trash
|
|
69
|
-
particles.remove(i);
|
|
70
|
-
//we're done with this particle
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
//make older
|
|
75
|
-
particles.writeAttributeScalar(i, PARTICLE_ATTRIBUTE_AGE, newAge);
|
|
76
|
-
|
|
77
|
-
//update rotation
|
|
78
|
-
const rotationSpeed = particles.readAttributeScalar(i, PARTICLE_ATTRIBUTE_ROTATION_SPEED);
|
|
79
|
-
const oldRotation = particles.readAttributeScalar(i, PARTICLE_ATTRIBUTE_ROTATION);
|
|
80
|
-
|
|
81
|
-
particles.writeAttributeScalar(i, PARTICLE_ATTRIBUTE_ROTATION, oldRotation + rotationSpeed * timeDelta);
|
|
82
|
-
|
|
83
|
-
//advance position based on velocity
|
|
84
|
-
particles.readAttributeVector3(i, PARTICLE_ATTRIBUTE_VELOCITY, velocity);
|
|
85
|
-
|
|
86
|
-
particles.readAttributeVector3(i, PARTICLE_ATTRIBUTE_POSITION, position);
|
|
87
|
-
|
|
88
|
-
// Verlet integration
|
|
89
|
-
const p_x = position[0] + velocity[0] * timeDelta;
|
|
90
|
-
const p_y = position[1] + velocity[1] * timeDelta;
|
|
91
|
-
const p_z = position[2] + velocity[2] * timeDelta;
|
|
92
|
-
|
|
93
|
-
particles.writeAttributeVector3(i, PARTICLE_ATTRIBUTE_POSITION, p_x, p_y, p_z);
|
|
94
|
-
|
|
95
|
-
const layer = layers[layer_position];
|
|
96
|
-
|
|
97
|
-
update_parameters(i, particles, layer, normalized_age);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
get parameter_schema() {
|
|
102
|
-
return [];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type SimulationStepType = number;
|
|
2
|
-
export namespace SimulationStepType {
|
|
3
|
-
let Unknown: number;
|
|
4
|
-
let FixedPhysics: number;
|
|
5
|
-
let CurlNoiseAcceleration: number;
|
|
6
|
-
let CurlNoiseVelocity: number;
|
|
7
|
-
let ApplyForce: number;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=SimulationStepType.d.ts.map
|
package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimulationStepType.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.js"],"names":[],"mappings":"iCAEU,MAAM"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {number} particle_index
|
|
4
|
-
* @param {ParticlePool} particles
|
|
5
|
-
* @param {ParticleLayer} layer
|
|
6
|
-
* @param {number} normalized_age
|
|
7
|
-
*/
|
|
8
|
-
export function update_parameters(particle_index: number, particles: ParticlePool, layer: ParticleLayer, normalized_age: number): void;
|
|
9
|
-
//# sourceMappingURL=update_parameters.d.ts.map
|
package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update_parameters.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/simulator/update_parameters.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,kDALW,MAAM,iEAGN,MAAM,QA0ChB"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ParticleParameters } from "../emitter/ParticleParameters.js";
|
|
2
|
-
import {
|
|
3
|
-
PARTICLE_ATTRIBUTE_COLOR,
|
|
4
|
-
PARTICLE_ATTRIBUTE_SIZE,
|
|
5
|
-
PARTICLE_ATTRIBUTE_SIZE_INITIAL
|
|
6
|
-
} from "../emitter/PARTICLE_ATTRIBUTES.js";
|
|
7
|
-
|
|
8
|
-
const v4 = new Float32Array(4);
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* What a particle is coloured when its layer carries no Color track: opaque white, which is what the
|
|
12
|
-
* emitter parameter set defaults that track to.
|
|
13
|
-
* @type {number}
|
|
14
|
-
*/
|
|
15
|
-
const COLOR_DEFAULT = 255;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {number} particle_index
|
|
20
|
-
* @param {ParticlePool} particles
|
|
21
|
-
* @param {ParticleLayer} layer
|
|
22
|
-
* @param {number} normalized_age
|
|
23
|
-
*/
|
|
24
|
-
export function update_parameters(particle_index, particles, layer, normalized_age) {
|
|
25
|
-
const tracks = layer.parameterTracks;
|
|
26
|
-
|
|
27
|
-
// update color
|
|
28
|
-
const param_color = tracks.getTrackByName(ParticleParameters.Color);
|
|
29
|
-
|
|
30
|
-
if (param_color !== undefined) {
|
|
31
|
-
param_color.track.sample(normalized_age, v4);
|
|
32
|
-
particles.writeAttributeVector4(particle_index, PARTICLE_ATTRIBUTE_COLOR, v4[0] * 255, v4[1] * 255, v4[2] * 255, v4[3] * 255);
|
|
33
|
-
} else {
|
|
34
|
-
/*
|
|
35
|
-
The else the size branch below has always had.
|
|
36
|
-
|
|
37
|
-
This function is the only writer of the colour attribute for this pool, and without this a
|
|
38
|
-
layer authored with no Color track took whatever was already in the slot: on a fresh pool
|
|
39
|
-
the Uint8Array zeros, RGBA (0,0,0,0), so the layer rendered nothing at all, and on a
|
|
40
|
-
recycled slot the previous occupant colour — ParticlePool#create hands back the first
|
|
41
|
-
clear occupancy bit without clearing it — so the same layer flashed a different colour
|
|
42
|
-
depending on where it landed. Colour was the only one of the eleven attributes with no
|
|
43
|
-
unconditional writer.
|
|
44
|
-
*/
|
|
45
|
-
particles.writeAttributeVector4(
|
|
46
|
-
particle_index, PARTICLE_ATTRIBUTE_COLOR,
|
|
47
|
-
COLOR_DEFAULT, COLOR_DEFAULT, COLOR_DEFAULT, COLOR_DEFAULT
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// update size
|
|
52
|
-
const param_scale = tracks.getTrackByName(ParticleParameters.Scale);
|
|
53
|
-
|
|
54
|
-
const initial_size = particles.readAttributeScalar(particle_index, PARTICLE_ATTRIBUTE_SIZE_INITIAL);
|
|
55
|
-
|
|
56
|
-
if (param_scale !== undefined) {
|
|
57
|
-
param_scale.track.sample(normalized_age, v4);
|
|
58
|
-
|
|
59
|
-
const scale = v4[0];
|
|
60
|
-
particles.writeAttributeScalar(particle_index, PARTICLE_ATTRIBUTE_SIZE, scale * initial_size);
|
|
61
|
-
} else {
|
|
62
|
-
particles.writeAttributeScalar(particle_index, PARTICLE_ATTRIBUTE_SIZE, initial_size);
|
|
63
|
-
}
|
|
64
|
-
}
|
package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {ParticleEmitter} emitter
|
|
4
|
-
* @param {number} seed
|
|
5
|
-
* @param {Object3D} object
|
|
6
|
-
*/
|
|
7
|
-
export function distributeParticlesOnObject3D(emitter: ParticleEmitter, seed: number, object: Object3D): void;
|
|
8
|
-
import { ParticleEmitter } from "../emitter/ParticleEmitter.js";
|
|
9
|
-
//# sourceMappingURL=distributeParticlesOnObject3D.d.ts.map
|
package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"distributeParticlesOnObject3D.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js"],"names":[],"mappings":"AA8HA;;;;;GAKG;AACH,uDAJW,eAAe,QACf,MAAM,0BA0ChB;gCA3K+B,+BAA+B"}
|
package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { ParticleEmitter } from "../emitter/ParticleEmitter.js";
|
|
2
|
-
import { ParticleEmitterFlag } from "../emitter/ParticleEmitterFlag.js";
|
|
3
|
-
import { computeSkinnedMeshVertices } from "../../../../geometry/skining/computeSkinnedMeshVertices.js";
|
|
4
|
-
import {
|
|
5
|
-
distribute_points_on_indexed_triangles,
|
|
6
|
-
IDENTITY_TRANSFORM_ELEMENTS
|
|
7
|
-
} from "./distribute_points_on_indexed_triangles.js";
|
|
8
|
-
|
|
9
|
-
let buffer_points = new Float32Array();
|
|
10
|
-
let buffer_indices = new Uint32Array();
|
|
11
|
-
|
|
12
|
-
let cursor_points = 0;
|
|
13
|
-
let cursor_indices = 0;
|
|
14
|
-
|
|
15
|
-
let offset_indices = 0;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {Object3D} object
|
|
20
|
-
*/
|
|
21
|
-
function visitObject(object) {
|
|
22
|
-
|
|
23
|
-
if (object.isMesh || object.isSkinnedMesh) {
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @type {BufferGeometry}
|
|
27
|
-
*/
|
|
28
|
-
const geometry = object.geometry;
|
|
29
|
-
|
|
30
|
-
// copy indices
|
|
31
|
-
const index = geometry.index;
|
|
32
|
-
const index_count = index.count;
|
|
33
|
-
const index_data = index.array;
|
|
34
|
-
|
|
35
|
-
const indices_buffer_size = index_count;
|
|
36
|
-
|
|
37
|
-
const final_buffer_index_size = cursor_indices + indices_buffer_size;
|
|
38
|
-
|
|
39
|
-
if (buffer_indices.length < final_buffer_index_size) {
|
|
40
|
-
const new_index_buffer = new Uint32Array(final_buffer_index_size);
|
|
41
|
-
|
|
42
|
-
new_index_buffer.set(buffer_indices);
|
|
43
|
-
|
|
44
|
-
buffer_indices = new_index_buffer;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
for (let i = 0; i < indices_buffer_size; i++) {
|
|
48
|
-
buffer_indices[cursor_indices + i] = index_data[i] + offset_indices;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
cursor_indices = final_buffer_index_size;
|
|
52
|
-
|
|
53
|
-
const positions = geometry.getAttribute('position');
|
|
54
|
-
const positions_count = positions.count;
|
|
55
|
-
const positions_buffer_size = positions_count * 3;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
offset_indices += positions_count;
|
|
59
|
-
|
|
60
|
-
const final_buffer_positions_size = cursor_points + positions_buffer_size;
|
|
61
|
-
|
|
62
|
-
if (buffer_points.length < final_buffer_positions_size) {
|
|
63
|
-
const new_point_buffer = new Float32Array(final_buffer_positions_size);
|
|
64
|
-
|
|
65
|
-
new_point_buffer.set(buffer_points);
|
|
66
|
-
|
|
67
|
-
buffer_points = new_point_buffer;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (object.isSkinnedMesh) {
|
|
71
|
-
computeSkinnedMeshVertices(buffer_points, object, cursor_points);
|
|
72
|
-
|
|
73
|
-
} else {
|
|
74
|
-
const positions_data = positions.array;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
for (let i = 0; i < positions_buffer_size; i++) {
|
|
78
|
-
buffer_points[cursor_points + i] = positions_data[i];
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// apply matrix transform on points
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* @type {number[]}
|
|
87
|
-
*/
|
|
88
|
-
const m4_tx = object.matrixWorld.elements;
|
|
89
|
-
|
|
90
|
-
//read out relevant transform matrix elements for faster access
|
|
91
|
-
const tx0 = m4_tx[0];
|
|
92
|
-
const tx1 = m4_tx[1];
|
|
93
|
-
const tx2 = m4_tx[2];
|
|
94
|
-
|
|
95
|
-
const tx4 = m4_tx[4];
|
|
96
|
-
const tx5 = m4_tx[5];
|
|
97
|
-
const tx6 = m4_tx[6];
|
|
98
|
-
|
|
99
|
-
const tx8 = m4_tx[8];
|
|
100
|
-
const tx9 = m4_tx[9];
|
|
101
|
-
const tx10 = m4_tx[10];
|
|
102
|
-
|
|
103
|
-
const tx12 = m4_tx[12];
|
|
104
|
-
const tx13 = m4_tx[13];
|
|
105
|
-
const tx14 = m4_tx[14];
|
|
106
|
-
|
|
107
|
-
for (let i = cursor_points; i < final_buffer_positions_size; i += 3) {
|
|
108
|
-
|
|
109
|
-
const x = buffer_points[i];
|
|
110
|
-
const y = buffer_points[i + 1];
|
|
111
|
-
const z = buffer_points[i + 2];
|
|
112
|
-
|
|
113
|
-
const _x = tx0 * x + tx4 * y + tx8 * z + tx12;
|
|
114
|
-
const _y = tx1 * x + tx5 * y + tx9 * z + tx13;
|
|
115
|
-
const _z = tx2 * x + tx6 * y + tx10 * z + tx14;
|
|
116
|
-
|
|
117
|
-
buffer_points[i] = _x;
|
|
118
|
-
buffer_points[i + 1] = _y;
|
|
119
|
-
buffer_points[i + 2] = _z;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
cursor_points = final_buffer_positions_size;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
*
|
|
129
|
-
* @param {ParticleEmitter} emitter
|
|
130
|
-
* @param {number} seed
|
|
131
|
-
* @param {Object3D} object
|
|
132
|
-
*/
|
|
133
|
-
export function distributeParticlesOnObject3D(emitter, seed, object) {
|
|
134
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
|
|
135
|
-
//particle pool needs to be set up first
|
|
136
|
-
emitter.build();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Initialized)) {
|
|
140
|
-
//particles are not initialized, do that
|
|
141
|
-
emitter.initialize();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
cursor_indices = 0;
|
|
145
|
-
cursor_points = 0;
|
|
146
|
-
|
|
147
|
-
offset_indices = 0;
|
|
148
|
-
|
|
149
|
-
object.traverse(visitObject);
|
|
150
|
-
|
|
151
|
-
const polygonCount = cursor_indices / 3;
|
|
152
|
-
|
|
153
|
-
const pool = emitter.particles;
|
|
154
|
-
|
|
155
|
-
const particleCount = pool.size();
|
|
156
|
-
|
|
157
|
-
const PARTICLE_ATTRIBUTE_POSITION = ParticleEmitter.Attributes.PARTICLE_ATTRIBUTE_POSITION;
|
|
158
|
-
|
|
159
|
-
distribute_points_on_indexed_triangles(
|
|
160
|
-
particleCount,
|
|
161
|
-
buffer_points,
|
|
162
|
-
buffer_indices,
|
|
163
|
-
polygonCount,
|
|
164
|
-
// visitObject already baked each mesh's matrixWorld into buffer_points,
|
|
165
|
-
// so the sampled points need no further transform.
|
|
166
|
-
IDENTITY_TRANSFORM_ELEMENTS,
|
|
167
|
-
seed,
|
|
168
|
-
(x, y, z, index) => {
|
|
169
|
-
pool.writeAttributeVector3(index, PARTICLE_ATTRIBUTE_POSITION, x, y, z);
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"distribute_points_on_indexed_triangles.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,8DATW,MAAM,UACN,YAAY,GAAC,MAAM,EAAE,WACrB,UAAU,GAAC,WAAW,GAAC,WAAW,GAAC,MAAM,EAAE,iBAC3C,MAAM,sBACN,MAAM,EAAE,GAAC,YAAY,QACrB,MAAM,YACN,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,gCAqHlJ;AAnKD;;;;;;;;;GASG;AACH,0CAFU,MAAM,EAAE,CAOhB"}
|
package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {ParticleEmitter} emitter
|
|
4
|
-
* @param {Mesh|SkinnedMesh} mesh
|
|
5
|
-
* @param {Matrix4} transform
|
|
6
|
-
* @param {number} randomSeed
|
|
7
|
-
*/
|
|
8
|
-
export function distributeParticlesOnMesh(emitter: ParticleEmitter, mesh: Mesh | SkinnedMesh, transform: Matrix4, randomSeed: number): void;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {number} count
|
|
12
|
-
* @param {Mesh} mesh
|
|
13
|
-
* @param {Matrix4} transform
|
|
14
|
-
* @param {number} randomSeed
|
|
15
|
-
* @param {(x: number, y: number, z: number, index: number) => void} callback
|
|
16
|
-
* @param {*} [callback_context]
|
|
17
|
-
*/
|
|
18
|
-
export function distributePointsOnMesh(count: number, mesh: Mesh, transform: Matrix4, randomSeed: number, callback: (x: number, y: number, z: number, index: number) => void, callback_context?: any): void;
|
|
19
|
-
import { ParticleEmitter } from "../emitter/ParticleEmitter.js";
|
|
20
|
-
//# sourceMappingURL=distrubuteParticlesOnMesh.d.ts.map
|
package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"distrubuteParticlesOnMesh.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,mDALW,eAAe,QACf,kBAAgB,kCAEhB,MAAM,QA0BhB;AAGD;;;;;;;;GAQG;AACH,8CAPW,MAAM,8CAGN,MAAM,YACN,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,gCAsClE;gCAjF+B,+BAA+B"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { computeSkinnedMeshVertices } from "../../../../geometry/skining/computeSkinnedMeshVertices.js";
|
|
2
|
-
import { distribute_points_on_indexed_triangles } from "./distribute_points_on_indexed_triangles.js";
|
|
3
|
-
import { ParticleEmitter } from "../emitter/ParticleEmitter.js";
|
|
4
|
-
import { ParticleEmitterFlag } from "../emitter/ParticleEmitterFlag.js";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {ParticleEmitter} emitter
|
|
9
|
-
* @param {Mesh|SkinnedMesh} mesh
|
|
10
|
-
* @param {Matrix4} transform
|
|
11
|
-
* @param {number} randomSeed
|
|
12
|
-
*/
|
|
13
|
-
export function distributeParticlesOnMesh(emitter, mesh, transform, randomSeed) {
|
|
14
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
|
|
15
|
-
//particle pool needs to be set up first
|
|
16
|
-
emitter.build();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Initialized)) {
|
|
20
|
-
//particles are not initialized, do that
|
|
21
|
-
emitter.initialize();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {ParticlePool}
|
|
27
|
-
*/
|
|
28
|
-
const particles = emitter.particles;
|
|
29
|
-
|
|
30
|
-
const particleCount = particles.size();
|
|
31
|
-
|
|
32
|
-
const PARTICLE_ATTRIBUTE_POSITION = ParticleEmitter.Attributes.PARTICLE_ATTRIBUTE_POSITION;
|
|
33
|
-
|
|
34
|
-
distributePointsOnMesh(particleCount, mesh, transform, randomSeed, (x, y, z, i) => {
|
|
35
|
-
particles.writeAttributeVector3(i, PARTICLE_ATTRIBUTE_POSITION, x, y, z);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @param {number} count
|
|
43
|
-
* @param {Mesh} mesh
|
|
44
|
-
* @param {Matrix4} transform
|
|
45
|
-
* @param {number} randomSeed
|
|
46
|
-
* @param {(x: number, y: number, z: number, index: number) => void} callback
|
|
47
|
-
* @param {*} [callback_context]
|
|
48
|
-
*/
|
|
49
|
-
export function distributePointsOnMesh(count, mesh, transform, randomSeed, callback, callback_context) {
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @type {BufferGeometry}
|
|
54
|
-
*/
|
|
55
|
-
const geometry = mesh.geometry;
|
|
56
|
-
|
|
57
|
-
const attributes = geometry.attributes;
|
|
58
|
-
|
|
59
|
-
const aPosition = attributes.position;
|
|
60
|
-
const aIndex = geometry.index;
|
|
61
|
-
|
|
62
|
-
const polygonCount = aIndex.count / 3;
|
|
63
|
-
|
|
64
|
-
const indices = aIndex.array;
|
|
65
|
-
let points;
|
|
66
|
-
|
|
67
|
-
if (mesh.isSkinnedMesh) {
|
|
68
|
-
points = new Float32Array(aPosition.array.length);
|
|
69
|
-
computeSkinnedMeshVertices(points, mesh);
|
|
70
|
-
} else {
|
|
71
|
-
points = aPosition.array;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
distribute_points_on_indexed_triangles(
|
|
75
|
-
count,
|
|
76
|
-
points,
|
|
77
|
-
indices,
|
|
78
|
-
polygonCount,
|
|
79
|
-
transform.elements,
|
|
80
|
-
randomSeed,
|
|
81
|
-
callback,
|
|
82
|
-
callback_context
|
|
83
|
-
);
|
|
84
|
-
}
|