@woosh/meep-engine 3.33.0 → 3.35.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/device/timing/profile/GPUProfileSession.d.ts +25 -11
- package/src/shade/device/timing/profile/GPUProfileSession.d.ts.map +1 -1
- package/src/shade/device/timing/profile/GPUProfileSession.js +553 -474
- package/src/shade/playground/avboit/main.d.ts.map +1 -1
- package/src/shade/playground/avboit/main.js +888 -916
- package/src/shade/playground/caldera/main.js +73 -60
- package/src/shade/playground/particle_ecs/README.md +13 -7
- package/src/shade/playground/particle_ecs/bonfire_effects.d.ts +5 -5
- package/src/shade/playground/particle_ecs/bonfire_effects.js +5 -5
- package/src/shade/playground/particle_ecs/effects/smoke.json +1859 -1859
- package/src/shade/playground/particle_ecs/effects/soot.json +1605 -1605
- package/src/shade/playground/particle_system/README.md +1 -2
- package/src/shade/playground/profile_hotkey.d.ts.map +1 -1
- package/src/shade/playground/profile_hotkey.js +4 -40
- package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +4 -39
- package/src/shade/playground/vgeo_runtime/main.js +25 -77
- package/src/shade/playground/vgeo_scene/main.js +2231 -2217
- package/src/shade/playground/volumetrics_froxel/main.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/main.js +4 -39
- package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/measure.js +2 -4
- 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 +1 -1
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +41 -1
- 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/light/GPULightCollection.d.ts +9 -1
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +41 -0
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts +37 -0
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/shader_project_environment_sh.js +105 -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 +69 -18
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts +7 -1
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +1247 -1244
- 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/graph_particles_avboit.d.ts +7 -1
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles_avboit.js +9 -0
- 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 +7 -6
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts +15 -9
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.js +29 -11
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.d.ts +24 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.d.ts.map +1 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.js +45 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts +3 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +38 -0
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +190 -185
- 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/native/avboit/AVBOITSideChannel.d.ts +8 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +5 -0
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +8 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +9 -0
- 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/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +13 -3
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +9 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts +39 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.js +107 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.d.ts +15 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.js +44 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts +19 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.js +48 -0
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts +29 -0
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.js +90 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts +10 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.js +55 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts +10 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.js +47 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts +10 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.js +63 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts +17 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.js +26 -0
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +8 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +50 -2
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +488 -436
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +254 -63
- 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,627 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../../core/assert.js";
|
|
2
|
-
import { round_up } from "../../../core/math/round_up.js";
|
|
3
|
-
import { TextureDescriptor } from "../../../shade/descriptor/texture/TextureDescriptor.js";
|
|
4
|
-
import { TextureViewDescriptor } from "../../../shade/descriptor/texture/TextureViewDescriptor.js";
|
|
5
|
-
import { GPUDatabase } from "../../../shade/renderer/buffer/table/GPUDatabase.js";
|
|
6
|
-
import {
|
|
7
|
-
PARTICLE_DATABASE_INITIAL_SIZE,
|
|
8
|
-
PARTICLE_DATABASE_SPEC,
|
|
9
|
-
PARTICLE_EMITTER_TABLE
|
|
10
|
-
} from "../../../shade/renderer/particles/data/PARTICLE_DATABASE_SPEC.js";
|
|
11
|
-
import { PARTICLE_RECORD_WORD_COUNT } from "../../../shade/renderer/particles/ParticleConstants.js";
|
|
12
|
-
import {
|
|
13
|
-
create_particle_billboard_pipeline,
|
|
14
|
-
PARTICLE_BILLBOARD_RESOURCES
|
|
15
|
-
} from "../../../shade/renderer/particles/shaders/shader_particle_render.js";
|
|
16
|
-
import { DEFAULT_DEPTH_TEXTURE_VIEW } from "../../../shade/renderer/depth/DEFAULT_DEPTH_TEXTURE_VIEW.js";
|
|
17
|
-
import { SAMPLER_LINEAR_UPSCALE } from "../../../shade/renderer/texture/SAMPLER_LINEAR_UPSCALE.js";
|
|
18
|
-
import { ParticleEmitterFlag } from "../../graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js";
|
|
19
|
-
import {
|
|
20
|
-
blending_type_to_particle_blend,
|
|
21
|
-
particle_layer_record,
|
|
22
|
-
write_particle_records
|
|
23
|
-
} from "./particle_gpu_records.js";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Buffers are grown with headroom and never shrunk: an effect's particle count changes every frame
|
|
27
|
-
* by design, and sizing exactly would mean reallocating almost every one.
|
|
28
|
-
*
|
|
29
|
-
* @type {number}
|
|
30
|
-
*/
|
|
31
|
-
const GROWTH_FACTOR = 1.5;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Vertices in one billboard, as the renderer's vertex stage indexes them.
|
|
35
|
-
*
|
|
36
|
-
* @type {number}
|
|
37
|
-
*/
|
|
38
|
-
const QUAD_VERTEX_COUNT = 6;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Draws `particular`'s CPU-simulated particles with **Shade's own billboard renderer**.
|
|
42
|
-
*
|
|
43
|
-
* The simulation stays where it is — emission, ageing, parameter tracks, sorting and bounds are
|
|
44
|
-
* meep's and are unchanged — and what crosses to the GPU each frame is the state it produced, in
|
|
45
|
-
* the layout that renderer already reads: a pool of particle records, a list of the slots to draw,
|
|
46
|
-
* and one emitter record per particle *layer* saying where that layer's sprite is in the atlas and
|
|
47
|
-
* how it blends.
|
|
48
|
-
*
|
|
49
|
-
* Nothing here is a shader. The billboard expansion, the atlas lookup, the soft-depth fade and the
|
|
50
|
-
* premultiplied blend that expresses both alpha and additive in one pipeline are Shade's, already
|
|
51
|
-
* written and already tested; this is the packer and the residency that lets them draw somebody
|
|
52
|
-
* else's particles.
|
|
53
|
-
*/
|
|
54
|
-
export class GPUParticularRenderer {
|
|
55
|
-
/**
|
|
56
|
-
* @type {GPUBuffer|null}
|
|
57
|
-
*/
|
|
58
|
-
#pool = null;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @type {number} capacity in particle records
|
|
62
|
-
*/
|
|
63
|
-
#pool_capacity = 0;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @type {GPUBuffer|null}
|
|
67
|
-
*/
|
|
68
|
-
#slots = null;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @type {number} capacity in slots
|
|
72
|
-
*/
|
|
73
|
-
#slots_capacity = 0;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The emitter table the billboard renderer reads a particle's layer record out of.
|
|
77
|
-
*
|
|
78
|
-
* A `GPUDatabase` rather than a flat buffer because that is the layout the renderer's generated
|
|
79
|
-
* reader indexes — the table owns the addressing, the growth and the per-record staging, so
|
|
80
|
-
* there is nothing here that knows where a record physically lands.
|
|
81
|
-
*
|
|
82
|
-
* Built on first use: the device arrives with the frame graph's execution context, not with the
|
|
83
|
-
* constructor.
|
|
84
|
-
*
|
|
85
|
-
* @type {GPUDatabase|null}
|
|
86
|
-
*/
|
|
87
|
-
#database = null;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* How many layer records the last pack wrote. Rows past it are removed rather than left
|
|
91
|
-
* resident, so a frame with fewer layers than the last does not keep paying for them.
|
|
92
|
-
*
|
|
93
|
-
* @type {number}
|
|
94
|
-
*/
|
|
95
|
-
#record_count = 0;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* @type {GPUTextureContext|null}
|
|
99
|
-
*/
|
|
100
|
-
#atlas = null;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The atlas image the texture was last written from, and its version.
|
|
104
|
-
*
|
|
105
|
-
* @type {*}
|
|
106
|
-
*/
|
|
107
|
-
#atlas_source = null;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* @type {number}
|
|
111
|
-
*/
|
|
112
|
-
#atlas_version = -1;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @type {RenderPipelineDescriptor|null}
|
|
116
|
-
*/
|
|
117
|
-
#pipeline = null;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @type {string}
|
|
121
|
-
*/
|
|
122
|
-
#pipeline_key = "";
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* CPU staging, two views of one buffer: the renderer reads floats out of a `u32` pool with
|
|
126
|
-
* `bitcast`, so the packer writes through whichever view fits the field.
|
|
127
|
-
*
|
|
128
|
-
* @type {Uint32Array}
|
|
129
|
-
*/
|
|
130
|
-
#pool_staging = new Uint32Array(0);
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @type {Float32Array}
|
|
134
|
-
*/
|
|
135
|
-
#pool_staging_f32 = new Float32Array(0);
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Draw order, back to front.
|
|
139
|
-
*
|
|
140
|
-
* @type {Uint32Array}
|
|
141
|
-
*/
|
|
142
|
-
#slot_staging = new Uint32Array(0);
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* View depth per slot, the key the draw order is sorted on.
|
|
146
|
-
*
|
|
147
|
-
* @type {Float32Array}
|
|
148
|
-
*/
|
|
149
|
-
#depth_staging = new Float32Array(0);
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* How many particles the last {@link update} produced.
|
|
153
|
-
*
|
|
154
|
-
* @type {number}
|
|
155
|
-
*/
|
|
156
|
-
#count = 0;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* How many particles are waiting to be drawn. Read-only, and zero until {@link update} has run.
|
|
160
|
-
*
|
|
161
|
-
* @returns {number}
|
|
162
|
-
*/
|
|
163
|
-
get count() {
|
|
164
|
-
return this.#count;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* How many layer records the last pack wrote — the occupied rows of the emitter table.
|
|
169
|
-
*
|
|
170
|
-
* @returns {number}
|
|
171
|
-
*/
|
|
172
|
-
get record_count() {
|
|
173
|
-
return this.#record_count;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Pack this frame's particles and upload them.
|
|
178
|
-
*
|
|
179
|
-
* Runs inside the pass rather than beside it, because a `GraphicsContext` — the device, the
|
|
180
|
-
* texture pool, the samplers — is something the frame graph hands out at execution time and the
|
|
181
|
-
* frame's pass context does not carry. The pool, the draw order and the atlas go up as queue
|
|
182
|
-
* writes; the emitter table's rows go up as the database's own upload dispatch, encoded here
|
|
183
|
-
* ahead of the draw that reads them.
|
|
184
|
-
*
|
|
185
|
-
* @param {GraphicsContext} graphics
|
|
186
|
-
* @param {ShadeGPUCommandContext} encoder the frame's open command context
|
|
187
|
-
* @param {ParticleEmitter[]} emitters
|
|
188
|
-
* @param {Sampler2D} atlas the sprite atlas every layer's patch is cut from
|
|
189
|
-
* @param {number[]|Float32Array} camera_position world space
|
|
190
|
-
* @param {number[]|Float32Array} camera_right world space
|
|
191
|
-
* @param {number[]|Float32Array} camera_up world space
|
|
192
|
-
*/
|
|
193
|
-
#pack(graphics, encoder, emitters, atlas, camera_position, camera_right, camera_up) {
|
|
194
|
-
assert.defined(graphics, 'graphics');
|
|
195
|
-
|
|
196
|
-
this.#count = 0;
|
|
197
|
-
|
|
198
|
-
const drawn = [];
|
|
199
|
-
|
|
200
|
-
let particle_capacity = 0;
|
|
201
|
-
|
|
202
|
-
for (let i = 0; i < emitters.length; i++) {
|
|
203
|
-
const emitter = emitters[i];
|
|
204
|
-
|
|
205
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
|
|
206
|
-
continue;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const particles = emitter.particles.size();
|
|
210
|
-
|
|
211
|
-
if (particles === 0) {
|
|
212
|
-
continue;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
drawn.push(emitter);
|
|
216
|
-
|
|
217
|
-
particle_capacity += particles;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
if (drawn.length === 0) {
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
this.#reserve_staging(particle_capacity);
|
|
225
|
-
|
|
226
|
-
const pool = this.#pool_staging;
|
|
227
|
-
const pool_f32 = this.#pool_staging_f32;
|
|
228
|
-
|
|
229
|
-
const table = this.#obtain_database(graphics.device).get(PARTICLE_EMITTER_TABLE);
|
|
230
|
-
|
|
231
|
-
let record_index = 0;
|
|
232
|
-
let written = 0;
|
|
233
|
-
|
|
234
|
-
const layer_records = [];
|
|
235
|
-
|
|
236
|
-
for (let i = 0; i < drawn.length; i++) {
|
|
237
|
-
const emitter = drawn[i];
|
|
238
|
-
|
|
239
|
-
const blend = blending_type_to_particle_blend(emitter.blendingMode);
|
|
240
|
-
const soft_depth = !emitter.getFlag(ParticleEmitterFlag.DepthSoftDisabled);
|
|
241
|
-
|
|
242
|
-
layer_records.length = 0;
|
|
243
|
-
|
|
244
|
-
const layers = emitter.layers;
|
|
245
|
-
|
|
246
|
-
for (let j = 0; j < layers.length; j++) {
|
|
247
|
-
// the field is how the emitter itself reads it — `ParticleLayer` publishes a
|
|
248
|
-
// setter and no getter, and 2.x is frozen
|
|
249
|
-
const patch = layers.get(j).__atlasPatch;
|
|
250
|
-
|
|
251
|
-
if (patch === null || patch === undefined) {
|
|
252
|
-
// the sprite has not been fetched yet, so this layer has nothing to draw with
|
|
253
|
-
layer_records[j] = undefined;
|
|
254
|
-
|
|
255
|
-
continue;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
const uv = patch.uv;
|
|
259
|
-
|
|
260
|
-
table.set(record_index, particle_layer_record({
|
|
261
|
-
atlas_region: [uv.position.x, uv.position.y, uv.size.x, uv.size.y],
|
|
262
|
-
blend,
|
|
263
|
-
soft_depth
|
|
264
|
-
}));
|
|
265
|
-
|
|
266
|
-
layer_records[j] = record_index;
|
|
267
|
-
|
|
268
|
-
record_index++;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
written += write_particle_records(
|
|
272
|
-
pool, pool_f32, written, emitter, layer_records, camera_right, camera_up
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
if (written === 0) {
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// Layers that were drawn last frame and are not this frame: free their rows, so a busy
|
|
281
|
-
// frame's page count does not become the floor for every quiet frame after it.
|
|
282
|
-
for (let i = record_index; i < this.#record_count; i++) {
|
|
283
|
-
table.remove(i);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
this.#record_count = record_index;
|
|
287
|
-
|
|
288
|
-
this.#count = written;
|
|
289
|
-
|
|
290
|
-
this.#order(written, camera_position);
|
|
291
|
-
|
|
292
|
-
this.#upload(graphics, encoder, written, atlas);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* The emitter table's database, built on first use.
|
|
297
|
-
*
|
|
298
|
-
* @param {GPUDevice} device
|
|
299
|
-
* @returns {GPUDatabase}
|
|
300
|
-
*/
|
|
301
|
-
#obtain_database(device) {
|
|
302
|
-
if (this.#database === null) {
|
|
303
|
-
this.#database = new GPUDatabase({
|
|
304
|
-
device,
|
|
305
|
-
definition: PARTICLE_DATABASE_SPEC,
|
|
306
|
-
label: "particular/emitters",
|
|
307
|
-
initial_data_size_bytes: PARTICLE_DATABASE_INITIAL_SIZE,
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return this.#database;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Sort the draw order back to front.
|
|
316
|
-
*
|
|
317
|
-
* Transparency is order-dependent and particles overlap constantly, so what is drawn last has to
|
|
318
|
-
* be what is nearest. The legacy renderer sorts each emitter's own particles and leaves the
|
|
319
|
-
* emitters to three's object sort; this sorts every particle in the frame against every other,
|
|
320
|
-
* which is the ordering that object sort was approximating.
|
|
321
|
-
*
|
|
322
|
-
* @param {number} count
|
|
323
|
-
* @param {number[]|Float32Array} camera_position
|
|
324
|
-
*/
|
|
325
|
-
#order(count, camera_position) {
|
|
326
|
-
const pool_f32 = this.#pool_staging_f32;
|
|
327
|
-
|
|
328
|
-
const depths = this.#depth_staging;
|
|
329
|
-
const slots = this.#slot_staging;
|
|
330
|
-
|
|
331
|
-
const camera_x = camera_position[0];
|
|
332
|
-
const camera_y = camera_position[1];
|
|
333
|
-
const camera_z = camera_position[2];
|
|
334
|
-
|
|
335
|
-
for (let i = 0; i < count; i++) {
|
|
336
|
-
const base = i * PARTICLE_RECORD_WORD_COUNT + 1;
|
|
337
|
-
|
|
338
|
-
const dx = pool_f32[base] - camera_x;
|
|
339
|
-
const dy = pool_f32[base + 1] - camera_y;
|
|
340
|
-
const dz = pool_f32[base + 2] - camera_z;
|
|
341
|
-
|
|
342
|
-
depths[i] = dx * dx + dy * dy + dz * dz;
|
|
343
|
-
slots[i] = i;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
const order = Array.prototype.slice.call(slots, 0, count);
|
|
347
|
-
|
|
348
|
-
order.sort((a, b) => depths[b] - depths[a]);
|
|
349
|
-
|
|
350
|
-
slots.set(order, 0);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* @param {number} particle_capacity
|
|
355
|
-
*/
|
|
356
|
-
#reserve_staging(particle_capacity) {
|
|
357
|
-
const words = particle_capacity * PARTICLE_RECORD_WORD_COUNT;
|
|
358
|
-
|
|
359
|
-
if (this.#pool_staging.length < words) {
|
|
360
|
-
const buffer = new ArrayBuffer(Math.ceil(words * GROWTH_FACTOR) * 4);
|
|
361
|
-
|
|
362
|
-
this.#pool_staging = new Uint32Array(buffer);
|
|
363
|
-
this.#pool_staging_f32 = new Float32Array(buffer);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
if (this.#slot_staging.length < particle_capacity) {
|
|
367
|
-
const capacity = Math.ceil(particle_capacity * GROWTH_FACTOR);
|
|
368
|
-
|
|
369
|
-
this.#slot_staging = new Uint32Array(capacity);
|
|
370
|
-
this.#depth_staging = new Float32Array(capacity);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* @param {GraphicsContext} graphics
|
|
376
|
-
* @param {ShadeGPUCommandContext} encoder the frame's open command context
|
|
377
|
-
* @param {number} count
|
|
378
|
-
* @param {Sampler2D} atlas
|
|
379
|
-
*/
|
|
380
|
-
#upload(graphics, encoder, count, atlas) {
|
|
381
|
-
const device = graphics.device;
|
|
382
|
-
|
|
383
|
-
this.#pool = this.#obtain_buffer(
|
|
384
|
-
device, this.#pool, count * PARTICLE_RECORD_WORD_COUNT * 4, "particular/pool",
|
|
385
|
-
capacity => this.#pool_capacity = capacity
|
|
386
|
-
);
|
|
387
|
-
|
|
388
|
-
this.#slots = this.#obtain_buffer(
|
|
389
|
-
device, this.#slots, count * 4, "particular/slots",
|
|
390
|
-
capacity => this.#slots_capacity = capacity
|
|
391
|
-
);
|
|
392
|
-
|
|
393
|
-
device.queue.writeBuffer(this.#pool, 0, this.#pool_staging, 0, count * PARTICLE_RECORD_WORD_COUNT);
|
|
394
|
-
device.queue.writeBuffer(this.#slots, 0, this.#slot_staging, 0, count);
|
|
395
|
-
|
|
396
|
-
// Rows staged by #pack reach the buffer here, encoded before the draw that reads them.
|
|
397
|
-
this.#database.update(encoder);
|
|
398
|
-
|
|
399
|
-
this.#obtain_atlas(graphics, atlas);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* @param {GPUDevice} device
|
|
404
|
-
* @param {GPUBuffer|null} existing
|
|
405
|
-
* @param {number} bytes
|
|
406
|
-
* @param {string} label
|
|
407
|
-
* @param {function(number)} remember
|
|
408
|
-
* @returns {GPUBuffer}
|
|
409
|
-
*/
|
|
410
|
-
#obtain_buffer(device, existing, bytes, label, remember) {
|
|
411
|
-
if (existing !== null && existing.size >= bytes) {
|
|
412
|
-
return existing;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
if (existing !== null) {
|
|
416
|
-
existing.destroy();
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
// a storage binding's size must be a multiple of 4, and the growth factor does not respect
|
|
420
|
-
// that on its own
|
|
421
|
-
const capacity = round_up(Math.ceil(bytes * GROWTH_FACTOR), 4);
|
|
422
|
-
|
|
423
|
-
remember(capacity);
|
|
424
|
-
|
|
425
|
-
return device.createBuffer({
|
|
426
|
-
size: capacity,
|
|
427
|
-
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,
|
|
428
|
-
label
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* The sprite atlas as the GPU holds it.
|
|
434
|
-
*
|
|
435
|
-
* **A texture this owns**, for the reason the fog mask is: `TextureManager` keys its cache on an
|
|
436
|
-
* image's identity and never releases, and this one is repainted whenever an effect brings a new
|
|
437
|
-
* sprite in.
|
|
438
|
-
*
|
|
439
|
-
* @param {GraphicsContext} graphics
|
|
440
|
-
* @param {Sampler2D} atlas
|
|
441
|
-
*/
|
|
442
|
-
#obtain_atlas(graphics, atlas) {
|
|
443
|
-
const width = atlas.width;
|
|
444
|
-
const height = atlas.height;
|
|
445
|
-
|
|
446
|
-
const existing = this.#atlas;
|
|
447
|
-
|
|
448
|
-
if (existing === null || existing.descriptor.size[0] !== width || existing.descriptor.size[1] !== height) {
|
|
449
|
-
if (existing !== null) {
|
|
450
|
-
existing.destroy();
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
this.#atlas = graphics.textures.contextFromDescriptor(TextureDescriptor.from({
|
|
454
|
-
label: "particular sprite atlas",
|
|
455
|
-
size: [width, height],
|
|
456
|
-
format: "rgba8unorm",
|
|
457
|
-
mipLevelCount: 1,
|
|
458
|
-
usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST
|
|
459
|
-
}));
|
|
460
|
-
|
|
461
|
-
this.#atlas_source = null;
|
|
462
|
-
this.#atlas_version = -1;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
const data = atlas.data;
|
|
466
|
-
|
|
467
|
-
if (this.#atlas_source !== data || this.#atlas_version !== atlas.version) {
|
|
468
|
-
graphics.device.queue.writeTexture(
|
|
469
|
-
{ texture: this.#atlas.gpu_texture },
|
|
470
|
-
data,
|
|
471
|
-
{ bytesPerRow: width * 4, rowsPerImage: height },
|
|
472
|
-
[width, height]
|
|
473
|
-
);
|
|
474
|
-
|
|
475
|
-
this.#atlas_source = data;
|
|
476
|
-
this.#atlas_version = atlas.version;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Record the billboard draw into `graph`, over the colour it is given.
|
|
482
|
-
*
|
|
483
|
-
* @param {object} args
|
|
484
|
-
* @param {FrameGraph} args.graph
|
|
485
|
-
* @param {number} args.color colour resource handle to draw over
|
|
486
|
-
* @param {number} args.depth scene depth — tested against, and sampled for the soft fade
|
|
487
|
-
* @param {GPUBuffer|GPUTypedBuffer} args.camera
|
|
488
|
-
* @param {ParticleEmitter[]} args.emitters
|
|
489
|
-
* @param {Sampler2D} args.atlas
|
|
490
|
-
* @param {number[]|Float32Array} args.camera_position world space
|
|
491
|
-
* @param {number[]|Float32Array} args.camera_right world space
|
|
492
|
-
* @param {number[]|Float32Array} args.camera_up world space
|
|
493
|
-
* @returns {number} the colour handle after the draw
|
|
494
|
-
*/
|
|
495
|
-
graph_draw({ graph, color, depth, camera, emitters, atlas, camera_position, camera_right, camera_up }) {
|
|
496
|
-
assert.defined(graph, 'graph');
|
|
497
|
-
|
|
498
|
-
const data = {};
|
|
499
|
-
|
|
500
|
-
const pass = graph.add('particles', data, (data, resources, context) => {
|
|
501
|
-
this.#pack(context.graphics, context.encoder, emitters, atlas, camera_position, camera_right, camera_up);
|
|
502
|
-
|
|
503
|
-
this.#execute(data, resources, context, camera);
|
|
504
|
-
});
|
|
505
|
-
|
|
506
|
-
data.depth = pass.read(depth);
|
|
507
|
-
data.color = pass.write(pass.read(color));
|
|
508
|
-
|
|
509
|
-
return data.color;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* @param data
|
|
514
|
-
* @param {FramePassResources} resources
|
|
515
|
-
* @param {GraphicsExecutionContext} context
|
|
516
|
-
* @param {GPUBuffer|GPUTypedBuffer} camera
|
|
517
|
-
*/
|
|
518
|
-
#execute(data, resources, context, camera) {
|
|
519
|
-
const count = this.#count;
|
|
520
|
-
|
|
521
|
-
if (count === 0) {
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
const encoder = context.encoder;
|
|
526
|
-
const graphics = context.graphics;
|
|
527
|
-
|
|
528
|
-
const color_texture = resources.get(data.color);
|
|
529
|
-
const depth_texture = resources.get(data.depth);
|
|
530
|
-
|
|
531
|
-
const depth_view = depth_texture.obtainView(DEFAULT_DEPTH_TEXTURE_VIEW);
|
|
532
|
-
|
|
533
|
-
const pipeline = this.#obtain_pipeline(
|
|
534
|
-
color_texture.descriptor.format,
|
|
535
|
-
depth_texture.descriptor.format
|
|
536
|
-
);
|
|
537
|
-
|
|
538
|
-
const bindings = PARTICLE_BILLBOARD_RESOURCES.generateBindings({
|
|
539
|
-
camera,
|
|
540
|
-
pool: this.#pool,
|
|
541
|
-
draw_list: this.#slots,
|
|
542
|
-
emitter_database: this.#database.buffer,
|
|
543
|
-
atlas: this.#atlas.obtainView(),
|
|
544
|
-
atlas_sampler: graphics.samplers.obtain(SAMPLER_LINEAR_UPSCALE),
|
|
545
|
-
scene_depth: depth_view
|
|
546
|
-
}, encoder);
|
|
547
|
-
|
|
548
|
-
const render_pass = encoder.constructRenderPass({
|
|
549
|
-
label: "Particles",
|
|
550
|
-
pipeline,
|
|
551
|
-
bindings,
|
|
552
|
-
colorAttachments: [{
|
|
553
|
-
loadOp: "load",
|
|
554
|
-
storeOp: "store",
|
|
555
|
-
view: color_texture.obtainView(TextureViewDescriptor.from({
|
|
556
|
-
mipLevelCount: 1,
|
|
557
|
-
baseMipLevel: 0
|
|
558
|
-
}))
|
|
559
|
-
}],
|
|
560
|
-
// tested against the scene and never written, and bound as a texture in the same pass
|
|
561
|
-
// for the soft fade — which is why it is read-only here
|
|
562
|
-
depthStencilAttachment: {
|
|
563
|
-
view: depth_view,
|
|
564
|
-
depthReadOnly: true
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
|
|
568
|
-
render_pass.draw(QUAD_VERTEX_COUNT, count);
|
|
569
|
-
|
|
570
|
-
render_pass.end();
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* @param {string} color_format
|
|
575
|
-
* @param {string} depth_format
|
|
576
|
-
* @returns {RenderPipelineDescriptor}
|
|
577
|
-
*/
|
|
578
|
-
#obtain_pipeline(color_format, depth_format) {
|
|
579
|
-
const key = `${color_format}/${depth_format}`;
|
|
580
|
-
|
|
581
|
-
if (this.#pipeline === null || this.#pipeline_key !== key) {
|
|
582
|
-
this.#pipeline = create_particle_billboard_pipeline({
|
|
583
|
-
color_format,
|
|
584
|
-
depth_format,
|
|
585
|
-
// reverse-Z
|
|
586
|
-
depth_compare: "greater"
|
|
587
|
-
});
|
|
588
|
-
|
|
589
|
-
this.#pipeline_key = key;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
return this.#pipeline;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* Give back everything held on the device. The renderer lives as long as the system that owns
|
|
597
|
-
* it, and a scene reload builds both again.
|
|
598
|
-
*/
|
|
599
|
-
destroy() {
|
|
600
|
-
if (this.#pool !== null) {
|
|
601
|
-
this.#pool.destroy();
|
|
602
|
-
this.#pool = null;
|
|
603
|
-
this.#pool_capacity = 0;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
if (this.#slots !== null) {
|
|
607
|
-
this.#slots.destroy();
|
|
608
|
-
this.#slots = null;
|
|
609
|
-
this.#slots_capacity = 0;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
if (this.#database !== null) {
|
|
613
|
-
this.#database.destroy();
|
|
614
|
-
this.#database = null;
|
|
615
|
-
this.#record_count = 0;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
if (this.#atlas !== null) {
|
|
619
|
-
this.#atlas.destroy();
|
|
620
|
-
this.#atlas = null;
|
|
621
|
-
this.#atlas_source = null;
|
|
622
|
-
this.#atlas_version = -1;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
this.#count = 0;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a meep blending mode is drawn by the billboard renderer, which expresses every mode it has
|
|
3
|
-
* through one premultiplied blend state.
|
|
4
|
-
*
|
|
5
|
-
* **Subtract and Multiply arrive as additive**, which is what the legacy renderer does with them:
|
|
6
|
-
* its shader tests `blending > 0.1` and treats everything above that as additive. Neither renderer
|
|
7
|
-
* can express them in a single pass, the content was authored against what the game shows, and
|
|
8
|
-
* exactly one emitter in the game asks for Multiply.
|
|
9
|
-
*
|
|
10
|
-
* @param {BlendingType} blending_type
|
|
11
|
-
* @returns {number} a member of {@link EMITTER_BLEND}
|
|
12
|
-
*/
|
|
13
|
-
export function blending_type_to_particle_blend(blending_type: BlendingType): number;
|
|
14
|
-
/**
|
|
15
|
-
* One particle layer as a row of the emitter table
|
|
16
|
-
* ({@link ../../../shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js}).
|
|
17
|
-
*
|
|
18
|
-
* **A record per layer, not per emitter.** The renderer reads the sprite's atlas rectangle from the
|
|
19
|
-
* emitter record, and in meep the sprite belongs to the *layer* — one emitter's particles can come
|
|
20
|
-
* from several layers with different sprites. Since every particle names its own record, splitting
|
|
21
|
-
* this way costs nothing and keeps the draw a single one.
|
|
22
|
-
*
|
|
23
|
-
* Every field of the struct is filled, including the ones a CPU-simulated layer has no use for (the
|
|
24
|
-
* VM program offsets, the seed, the spawn rate). A field left out is not written as zero — the
|
|
25
|
-
* serializer skips it and the table's page buffers are recycled, so an omitted field would show
|
|
26
|
-
* whatever the slot's previous tenant left behind.
|
|
27
|
-
*
|
|
28
|
-
* @param {object} layer
|
|
29
|
-
* @param {ArrayLike<number>} layer.atlas_region uv offset x, y and uv scale x, y
|
|
30
|
-
* @param {number} layer.blend a member of {@link EMITTER_BLEND}
|
|
31
|
-
* @param {boolean} layer.soft_depth
|
|
32
|
-
* @returns {object} the value to store in the emitter table
|
|
33
|
-
*/
|
|
34
|
-
export function particle_layer_record({ atlas_region, blend, soft_depth }: {
|
|
35
|
-
atlas_region: ArrayLike<number>;
|
|
36
|
-
blend: number;
|
|
37
|
-
soft_depth: boolean;
|
|
38
|
-
}): object;
|
|
39
|
-
/**
|
|
40
|
-
* Write one emitter's live particles into the shared pool.
|
|
41
|
-
*
|
|
42
|
-
* The pool is compacted by `ParticleEmitter.update`, so the live particles are `[0, size)` and this
|
|
43
|
-
* runs straight down them.
|
|
44
|
-
*
|
|
45
|
-
* **Size is halved on the way in.** meep's `size` is the sprite's full width; the renderer expands a
|
|
46
|
-
* corner of ±1 by `size`, so what it wants is the half-extent — the same `radius = size * 0.5` the
|
|
47
|
-
* legacy vertex shader computes.
|
|
48
|
-
*
|
|
49
|
-
* **Velocity alignment is resolved here**, into the rotation the renderer reads: the legacy shader
|
|
50
|
-
* turns the sprite to face the screen-space direction of travel, and the camera basis is what says
|
|
51
|
-
* which direction that is.
|
|
52
|
-
*
|
|
53
|
-
* @param {Uint32Array} pool
|
|
54
|
-
* @param {Float32Array} pool_f32 the same buffer, viewed as floats
|
|
55
|
-
* @param {number} first_slot record index to start writing at
|
|
56
|
-
* @param {ParticleEmitter} emitter
|
|
57
|
-
* @param {number[]} layer_records the layer record index for each of the emitter's layers
|
|
58
|
-
* @param {number[]} camera_right world-space camera right
|
|
59
|
-
* @param {number[]} camera_up world-space camera up
|
|
60
|
-
* @returns {number} how many particles were written
|
|
61
|
-
*/
|
|
62
|
-
export function write_particle_records(pool: Uint32Array, pool_f32: Float32Array, first_slot: number, emitter: ParticleEmitter, layer_records: number[], camera_right: number[], camera_up: number[]): number;
|
|
63
|
-
/**
|
|
64
|
-
* Where each attribute the billboard renderer reads sits inside a particle record, in words.
|
|
65
|
-
*
|
|
66
|
-
* The record is 32 words and the renderer is told where to find what, so these are ours to choose;
|
|
67
|
-
* word 0 is the header the renderer reads the owning emitter from.
|
|
68
|
-
*
|
|
69
|
-
* @type {number}
|
|
70
|
-
*/
|
|
71
|
-
export const PARTICLE_WORD_POSITION: number;
|
|
72
|
-
/**
|
|
73
|
-
* @type {number}
|
|
74
|
-
*/
|
|
75
|
-
export const PARTICLE_WORD_SIZE: number;
|
|
76
|
-
/**
|
|
77
|
-
* @type {number}
|
|
78
|
-
*/
|
|
79
|
-
export const PARTICLE_WORD_COLOR: number;
|
|
80
|
-
/**
|
|
81
|
-
* @type {number}
|
|
82
|
-
*/
|
|
83
|
-
export const PARTICLE_WORD_ROTATION: number;
|
|
84
|
-
import { BlendingType } from "../../graphics/texture/sampler/BlendingType.js";
|
|
85
|
-
//# sourceMappingURL=particle_gpu_records.d.ts.map
|