@aura3d/engine 4.6.2 → 4.7.1
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/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.d.ts +12 -0
- package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.d.ts.map +1 -1
- package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.js +26 -1
- package/dist/assets/asset-corpus/ProductionGLTFRenderPipeline.js.map +1 -1
- package/dist/assets/vfx/LICENSE.md +1 -0
- package/dist/assets/vfx/aura-vfx-1k.png +0 -0
- package/dist/assets/vfx/aura-vfx-2k.png +0 -0
- package/dist/aura3d-cli/admission/cubeLut.d.ts +18 -0
- package/dist/aura3d-cli/admission/cubeLut.d.ts.map +1 -0
- package/dist/aura3d-cli/admission/cubeLut.js +53 -0
- package/dist/aura3d-cli/admission/cubeLut.js.map +1 -0
- package/dist/aura3d-cli/asset-core-types.d.ts +7 -4
- package/dist/aura3d-cli/asset-core-types.d.ts.map +1 -1
- package/dist/aura3d-cli/cli-help.d.ts.map +1 -1
- package/dist/aura3d-cli/cli-help.js +7 -4
- package/dist/aura3d-cli/cli-help.js.map +1 -1
- package/dist/aura3d-cli/cli-options.d.ts +1 -1
- package/dist/aura3d-cli/cli-options.d.ts.map +1 -1
- package/dist/aura3d-cli/cli-options.js +2 -2
- package/dist/aura3d-cli/cli-options.js.map +1 -1
- package/dist/aura3d-cli/cli.js +3 -2
- package/dist/aura3d-cli/cli.js.map +1 -1
- package/dist/aura3d-cli/commands/assets/certifyCategories.d.ts +26 -0
- package/dist/aura3d-cli/commands/assets/certifyCategories.d.ts.map +1 -0
- package/dist/aura3d-cli/commands/assets/certifyCategories.js +31 -0
- package/dist/aura3d-cli/commands/assets/certifyCategories.js.map +1 -0
- package/dist/aura3d-cli/commands/assets/optimize.d.ts +66 -0
- package/dist/aura3d-cli/commands/assets/optimize.d.ts.map +1 -1
- package/dist/aura3d-cli/commands/assets/optimize.js +270 -1
- package/dist/aura3d-cli/commands/assets/optimize.js.map +1 -1
- package/dist/aura3d-cli/commands/assets/optimizeVerb.d.ts.map +1 -1
- package/dist/aura3d-cli/commands/assets/optimizeVerb.js +26 -1
- package/dist/aura3d-cli/commands/assets/optimizeVerb.js.map +1 -1
- package/dist/aura3d-cli/commands/evidence/judge.d.ts +50 -1
- package/dist/aura3d-cli/commands/evidence/judge.d.ts.map +1 -1
- package/dist/aura3d-cli/commands/evidence/judge.js +154 -6
- package/dist/aura3d-cli/commands/evidence/judge.js.map +1 -1
- package/dist/aura3d-cli/commands/prd05/index.js +1 -1
- package/dist/aura3d-cli/commands/prd05/index.js.map +1 -1
- package/dist/aura3d-cli/index.d.ts.map +1 -1
- package/dist/aura3d-cli/index.js +25 -9
- package/dist/aura3d-cli/index.js.map +1 -1
- package/dist/aura3d-cli/look/judge.d.ts +53 -5
- package/dist/aura3d-cli/look/judge.d.ts.map +1 -1
- package/dist/aura3d-cli/look/judge.js +226 -50
- package/dist/aura3d-cli/look/judge.js.map +1 -1
- package/dist/create-aura3d/index.js +1 -1
- package/dist/engine/agent-api/RootRuntimeSupport.d.ts +7 -0
- package/dist/engine/agent-api/RootRuntimeSupport.d.ts.map +1 -1
- package/dist/engine/agent-api/RootRuntimeSupport.js +7 -0
- package/dist/engine/agent-api/RootRuntimeSupport.js.map +1 -1
- package/dist/engine/agent-api/app/actorAnimationHandle.d.ts +2 -0
- package/dist/engine/agent-api/app/actorAnimationHandle.d.ts.map +1 -1
- package/dist/engine/agent-api/app/actorAnimationHandle.js +149 -2
- package/dist/engine/agent-api/app/actorAnimationHandle.js.map +1 -1
- package/dist/engine/agent-api/app/createAuraApp.d.ts.map +1 -1
- package/dist/engine/agent-api/app/createAuraApp.js +13 -1
- package/dist/engine/agent-api/app/createAuraApp.js.map +1 -1
- package/dist/engine/agent-api/app/frameLoop.d.ts.map +1 -1
- package/dist/engine/agent-api/app/frameLoop.js +4 -2
- package/dist/engine/agent-api/app/frameLoop.js.map +1 -1
- package/dist/engine/agent-api/camera/layers/cinematicBars.d.ts +2 -0
- package/dist/engine/agent-api/camera/layers/cinematicBars.d.ts.map +1 -1
- package/dist/engine/agent-api/camera/layers/cinematicBars.js +4 -0
- package/dist/engine/agent-api/camera/layers/cinematicBars.js.map +1 -1
- package/dist/engine/agent-api/compiler/compileScene.d.ts +11 -1
- package/dist/engine/agent-api/compiler/compileScene.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/compileScene.js +27 -1
- package/dist/engine/agent-api/compiler/compileScene.js.map +1 -1
- package/dist/engine/agent-api/compiler/customMaterial.d.ts +16 -5
- package/dist/engine/agent-api/compiler/customMaterial.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/customMaterial.js +149 -20
- package/dist/engine/agent-api/compiler/customMaterial.js.map +1 -1
- package/dist/engine/agent-api/compiler/environment.d.ts +57 -1
- package/dist/engine/agent-api/compiler/environment.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/environment.js +170 -5
- package/dist/engine/agent-api/compiler/environment.js.map +1 -1
- package/dist/engine/agent-api/compiler/fog.js +1 -1
- package/dist/engine/agent-api/compiler/fog.js.map +1 -1
- package/dist/engine/agent-api/compiler/lights.d.ts +92 -0
- package/dist/engine/agent-api/compiler/lights.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/lights.js +358 -1
- package/dist/engine/agent-api/compiler/lights.js.map +1 -1
- package/dist/engine/agent-api/compiler/observations.d.ts +34 -0
- package/dist/engine/agent-api/compiler/observations.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/observations.js +77 -5
- package/dist/engine/agent-api/compiler/observations.js.map +1 -1
- package/dist/engine/agent-api/compiler/postprocess.d.ts +10 -0
- package/dist/engine/agent-api/compiler/postprocess.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/postprocess.js +28 -7
- package/dist/engine/agent-api/compiler/postprocess.js.map +1 -1
- package/dist/engine/agent-api/compiler/renderInput.d.ts +2 -0
- package/dist/engine/agent-api/compiler/renderInput.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/renderInput.js +15 -2
- package/dist/engine/agent-api/compiler/renderInput.js.map +1 -1
- package/dist/engine/agent-api/compiler/renderer.d.ts +6 -0
- package/dist/engine/agent-api/compiler/renderer.d.ts.map +1 -1
- package/dist/engine/agent-api/compiler/renderer.js +14 -3
- package/dist/engine/agent-api/compiler/renderer.js.map +1 -1
- package/dist/engine/agent-api/diagnostics.d.ts +16 -0
- package/dist/engine/agent-api/diagnostics.d.ts.map +1 -1
- package/dist/engine/agent-api/diagnostics.js +45 -2
- package/dist/engine/agent-api/diagnostics.js.map +1 -1
- package/dist/engine/agent-api/index.d.ts +2 -0
- package/dist/engine/agent-api/index.d.ts.map +1 -1
- package/dist/engine/agent-api/index.js +3 -0
- package/dist/engine/agent-api/index.js.map +1 -1
- package/dist/engine/agent-api/looks/lookPresets.d.ts +2 -0
- package/dist/engine/agent-api/looks/lookPresets.d.ts.map +1 -1
- package/dist/engine/agent-api/looks/lookPresets.js.map +1 -1
- package/dist/engine/agent-api/looks/looks.d.ts +12 -2
- package/dist/engine/agent-api/looks/looks.d.ts.map +1 -1
- package/dist/engine/agent-api/looks/looks.js +365 -65
- package/dist/engine/agent-api/looks/looks.js.map +1 -1
- package/dist/engine/agent-api/nodes/builder.d.ts +8 -0
- package/dist/engine/agent-api/nodes/builder.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/builder.js +15 -0
- package/dist/engine/agent-api/nodes/builder.js.map +1 -1
- package/dist/engine/agent-api/nodes/effects.composite.d.ts +13 -9
- package/dist/engine/agent-api/nodes/effects.composite.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/effects.d.ts +65 -14
- package/dist/engine/agent-api/nodes/effects.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/effects.js +49 -16
- package/dist/engine/agent-api/nodes/effects.js.map +1 -1
- package/dist/engine/agent-api/nodes/effects.post.d.ts +62 -5
- package/dist/engine/agent-api/nodes/effects.post.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/effects.post.js +30 -17
- package/dist/engine/agent-api/nodes/effects.post.js.map +1 -1
- package/dist/engine/agent-api/nodes/effects.toon.d.ts +65 -1
- package/dist/engine/agent-api/nodes/effects.toon.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/effects.toon.js +186 -23
- package/dist/engine/agent-api/nodes/effects.toon.js.map +1 -1
- package/dist/engine/agent-api/nodes/groups.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/groups.js +2 -2
- package/dist/engine/agent-api/nodes/groups.js.map +1 -1
- package/dist/engine/agent-api/nodes/instances.d.ts +130 -90
- package/dist/engine/agent-api/nodes/instances.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/instances.js +192 -48
- package/dist/engine/agent-api/nodes/instances.js.map +1 -1
- package/dist/engine/agent-api/nodes/material.d.ts +8 -1
- package/dist/engine/agent-api/nodes/material.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/material.js +82 -0
- package/dist/engine/agent-api/nodes/material.js.map +1 -1
- package/dist/engine/agent-api/nodes/outlineTargets.d.ts +16 -0
- package/dist/engine/agent-api/nodes/outlineTargets.d.ts.map +1 -0
- package/dist/engine/agent-api/nodes/outlineTargets.js +46 -0
- package/dist/engine/agent-api/nodes/outlineTargets.js.map +1 -0
- package/dist/engine/agent-api/nodes/scene.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/scene.js +2 -2
- package/dist/engine/agent-api/nodes/scene.js.map +1 -1
- package/dist/engine/agent-api/nodes/sky.d.ts +23 -6
- package/dist/engine/agent-api/nodes/sky.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/sky.js +2 -0
- package/dist/engine/agent-api/nodes/sky.js.map +1 -1
- package/dist/engine/agent-api/nodes/types/runtime.d.ts +28 -1
- package/dist/engine/agent-api/nodes/types/runtime.d.ts.map +1 -1
- package/dist/engine/agent-api/nodes/types.d.ts +71 -3
- package/dist/engine/agent-api/nodes/types.d.ts.map +1 -1
- package/dist/engine/agent-api/performanceEvidence.js +7 -2
- package/dist/engine/agent-api/performanceEvidence.js.map +1 -1
- package/dist/engine/agent-api/postBridge.d.ts +75 -3
- package/dist/engine/agent-api/postBridge.d.ts.map +1 -1
- package/dist/engine/agent-api/postBridge.js +436 -33
- package/dist/engine/agent-api/postBridge.js.map +1 -1
- package/dist/engine/agent-api/postPresets.d.ts +8 -4
- package/dist/engine/agent-api/postPresets.d.ts.map +1 -1
- package/dist/engine/agent-api/postPresets.js +12 -11
- package/dist/engine/agent-api/postPresets.js.map +1 -1
- package/dist/engine/agent-api/publishedUnion.d.ts +7 -4
- package/dist/engine/agent-api/publishedUnion.d.ts.map +1 -1
- package/dist/engine/agent-api/publishedUnion.js +1 -1
- package/dist/engine/agent-api/publishedUnion.js.map +1 -1
- package/dist/engine/agent-api/rendererDiagnostics.js +4 -6
- package/dist/engine/agent-api/rendererDiagnostics.js.map +1 -1
- package/dist/engine/agent-api/vfx/atmosphere-api.d.ts +2 -4
- package/dist/engine/agent-api/vfx/atmosphere-api.d.ts.map +1 -1
- package/dist/engine/agent-api/vfx/atmosphere-api.js +2 -1
- package/dist/engine/agent-api/vfx/atmosphere-api.js.map +1 -1
- package/dist/engine/agent-api/vfx/effects-api.d.ts +3 -0
- package/dist/engine/agent-api/vfx/effects-api.d.ts.map +1 -1
- package/dist/engine/agent-api/vfx/effects-api.js +337 -74
- package/dist/engine/agent-api/vfx/effects-api.js.map +1 -1
- package/dist/engine/agent-api/world/flags.d.ts +33 -3
- package/dist/engine/agent-api/world/flags.d.ts.map +1 -1
- package/dist/engine/agent-api/world/flags.js +44 -12
- package/dist/engine/agent-api/world/flags.js.map +1 -1
- package/dist/engine/agent-api/world/index.d.ts +10 -1
- package/dist/engine/agent-api/world/index.d.ts.map +1 -1
- package/dist/engine/agent-api/world/index.js +11 -2
- package/dist/engine/agent-api/world/index.js.map +1 -1
- package/dist/engine/agent-api/world/scatter.d.ts +50 -3
- package/dist/engine/agent-api/world/scatter.d.ts.map +1 -1
- package/dist/engine/agent-api/world/scatter.js +93 -7
- package/dist/engine/agent-api/world/scatter.js.map +1 -1
- package/dist/engine/agent-api/world/terrain.d.ts +8 -0
- package/dist/engine/agent-api/world/terrain.d.ts.map +1 -1
- package/dist/engine/agent-api/world/terrain.js +6 -1
- package/dist/engine/agent-api/world/terrain.js.map +1 -1
- package/dist/engine/contracts/animation.d.ts +30 -12
- package/dist/engine/contracts/animation.d.ts.map +1 -1
- package/dist/engine/contracts/animation.js +2 -0
- package/dist/engine/contracts/animation.js.map +1 -1
- package/dist/engine/contracts/art.d.ts +1 -1
- package/dist/engine/contracts/art.d.ts.map +1 -1
- package/dist/engine/contracts/atmosphere.d.ts +43 -9
- package/dist/engine/contracts/atmosphere.d.ts.map +1 -1
- package/dist/engine/contracts/atmosphere.js.map +1 -1
- package/dist/engine/contracts/camera.d.ts +8 -2
- package/dist/engine/contracts/camera.d.ts.map +1 -1
- package/dist/engine/contracts/camera.js +14 -3
- package/dist/engine/contracts/camera.js.map +1 -1
- package/dist/engine/contracts/effects.d.ts +83 -37
- package/dist/engine/contracts/effects.d.ts.map +1 -1
- package/dist/engine/contracts/effects.js +2 -1
- package/dist/engine/contracts/effects.js.map +1 -1
- package/dist/engine/contracts/flags.d.ts.map +1 -1
- package/dist/engine/contracts/flags.js +29 -4
- package/dist/engine/contracts/flags.js.map +1 -1
- package/dist/engine/contracts/lighting.d.ts +33 -1
- package/dist/engine/contracts/lighting.d.ts.map +1 -1
- package/dist/engine/contracts/lighting.js +13 -1
- package/dist/engine/contracts/lighting.js.map +1 -1
- package/dist/engine/contracts/looks.d.ts +57 -1
- package/dist/engine/contracts/looks.d.ts.map +1 -1
- package/dist/engine/contracts/looks.js.map +1 -1
- package/dist/engine/contracts/materials.d.ts +25 -0
- package/dist/engine/contracts/materials.d.ts.map +1 -1
- package/dist/engine/contracts/materials.js +4 -1
- package/dist/engine/contracts/materials.js.map +1 -1
- package/dist/engine/contracts/post.d.ts +14 -0
- package/dist/engine/contracts/post.d.ts.map +1 -1
- package/dist/engine/contracts/post.js +2 -0
- package/dist/engine/contracts/post.js.map +1 -1
- package/dist/engine/instances-model/CrowdKit.d.ts +231 -0
- package/dist/engine/instances-model/CrowdKit.d.ts.map +1 -0
- package/dist/engine/instances-model/CrowdKit.js +496 -0
- package/dist/engine/instances-model/CrowdKit.js.map +1 -0
- package/dist/engine/lanes/prd02.d.ts +36 -2
- package/dist/engine/lanes/prd02.d.ts.map +1 -1
- package/dist/engine/lanes/prd02.js +120 -7
- package/dist/engine/lanes/prd02.js.map +1 -1
- package/dist/engine/lanes/prd03.d.ts.map +1 -1
- package/dist/engine/lanes/prd03.js +9 -1
- package/dist/engine/lanes/prd03.js.map +1 -1
- package/dist/engine/lanes/prd07.d.ts.map +1 -1
- package/dist/engine/lanes/prd07.js +12 -7
- package/dist/engine/lanes/prd07.js.map +1 -1
- package/dist/engine/production-runtime/GlbResourceCache.d.ts +140 -0
- package/dist/engine/production-runtime/GlbResourceCache.d.ts.map +1 -0
- package/dist/engine/production-runtime/GlbResourceCache.js +237 -0
- package/dist/engine/production-runtime/GlbResourceCache.js.map +1 -0
- package/dist/engine/production-runtime/ModelMaterialOverrides.d.ts +53 -2
- package/dist/engine/production-runtime/ModelMaterialOverrides.d.ts.map +1 -1
- package/dist/engine/production-runtime/ModelMaterialOverrides.js +142 -1
- package/dist/engine/production-runtime/ModelMaterialOverrides.js.map +1 -1
- package/dist/engine/production-runtime/TypedGLBActor.d.ts +55 -0
- package/dist/engine/production-runtime/TypedGLBActor.d.ts.map +1 -1
- package/dist/engine/production-runtime/TypedGLBActor.js +205 -3
- package/dist/engine/production-runtime/TypedGLBActor.js.map +1 -1
- package/dist/engine/production-runtime/actor/ModelTextureShare.d.ts.map +1 -1
- package/dist/engine/production-runtime/actor/ModelTextureShare.js +5 -2
- package/dist/engine/production-runtime/actor/ModelTextureShare.js.map +1 -1
- package/dist/engine/production-runtime/actor/TypedGLBActorMaterials.d.ts.map +1 -1
- package/dist/engine/production-runtime/actor/TypedGLBActorMaterials.js +10 -1
- package/dist/engine/production-runtime/actor/TypedGLBActorMaterials.js.map +1 -1
- package/dist/engine/production-runtime/effects/EffectNodeLowering.d.ts +55 -0
- package/dist/engine/production-runtime/effects/EffectNodeLowering.d.ts.map +1 -1
- package/dist/engine/production-runtime/effects/EffectNodeLowering.js +71 -7
- package/dist/engine/production-runtime/effects/EffectNodeLowering.js.map +1 -1
- package/dist/engine/production-runtime/effects/FlipbookAtlas.d.ts +85 -0
- package/dist/engine/production-runtime/effects/FlipbookAtlas.d.ts.map +1 -1
- package/dist/engine/production-runtime/effects/FlipbookAtlas.js +164 -0
- package/dist/engine/production-runtime/effects/FlipbookAtlas.js.map +1 -1
- package/dist/engine/production-runtime/effects/LiveAtmosphere.d.ts +39 -6
- package/dist/engine/production-runtime/effects/LiveAtmosphere.d.ts.map +1 -1
- package/dist/engine/production-runtime/effects/LiveAtmosphere.js +102 -10
- package/dist/engine/production-runtime/effects/LiveAtmosphere.js.map +1 -1
- package/dist/engine/production-runtime/effects/ProductionEffectSystem.d.ts +73 -1
- package/dist/engine/production-runtime/effects/ProductionEffectSystem.d.ts.map +1 -1
- package/dist/engine/production-runtime/effects/ProductionEffectSystem.js +367 -7
- package/dist/engine/production-runtime/effects/ProductionEffectSystem.js.map +1 -1
- package/dist/engine/production-runtime/world/WaterRuntime.d.ts +9 -0
- package/dist/engine/production-runtime/world/WaterRuntime.d.ts.map +1 -1
- package/dist/engine/production-runtime/world/WaterRuntime.js +27 -11
- package/dist/engine/production-runtime/world/WaterRuntime.js.map +1 -1
- package/dist/engine/production-runtime/world/WorldFramePasses.d.ts +11 -1
- package/dist/engine/production-runtime/world/WorldFramePasses.d.ts.map +1 -1
- package/dist/engine/production-runtime/world/WorldFramePasses.js +37 -1
- package/dist/engine/production-runtime/world/WorldFramePasses.js.map +1 -1
- package/dist/engine/public/index.d.ts +22 -0
- package/dist/engine/public/index.d.ts.map +1 -1
- package/dist/engine/public/index.js +14 -0
- package/dist/engine/public/index.js.map +1 -1
- package/dist/game/art/define.d.ts +1 -1
- package/dist/game/art/define.d.ts.map +1 -1
- package/dist/game/art/define.js +1 -1
- package/dist/game/art/define.js.map +1 -1
- package/dist/game/fonts/register.d.ts +16 -1
- package/dist/game/fonts/register.d.ts.map +1 -1
- package/dist/game/fonts/register.js +18 -7
- package/dist/game/fonts/register.js.map +1 -1
- package/dist/game/hud/themes.d.ts +33 -8
- package/dist/game/hud/themes.d.ts.map +1 -1
- package/dist/game/hud/themes.js +125 -22
- package/dist/game/hud/themes.js.map +1 -1
- package/dist/game/index.d.ts +4 -2
- package/dist/game/index.d.ts.map +1 -1
- package/dist/game/index.js +2 -1
- package/dist/game/index.js.map +1 -1
- package/dist/game/juice/audioReactive.d.ts +42 -0
- package/dist/game/juice/audioReactive.d.ts.map +1 -0
- package/dist/game/juice/audioReactive.js +68 -0
- package/dist/game/juice/audioReactive.js.map +1 -0
- package/dist/game/styles/themes/arcade-neon.css +2 -1
- package/dist/game/styles/themes/fighting.css +2 -1
- package/dist/game/styles/themes/ink-scroll.css +15 -0
- package/dist/game/styles/themes/motorsport.css +2 -1
- package/dist/game/styles/themes/plain.css +2 -1
- package/dist/game/styles/themes/sci-fi-telemetry.css +2 -1
- package/dist/game/styles/themes/sky-expedition.css +15 -0
- package/dist/game/styles/themes/sports-broadcast.css +2 -1
- package/dist/game/styles/themes/storybook.css +15 -0
- package/dist/game/styles/themes/tabletop.css +2 -1
- package/dist/game/styles.css +3 -1
- package/dist/rendering/ClusteredForwardLighting.d.ts.map +1 -1
- package/dist/rendering/ClusteredForwardLighting.js +3 -1
- package/dist/rendering/ClusteredForwardLighting.js.map +1 -1
- package/dist/rendering/DepthPass.d.ts +25 -0
- package/dist/rendering/DepthPass.d.ts.map +1 -1
- package/dist/rendering/DepthPass.js +149 -1
- package/dist/rendering/DepthPass.js.map +1 -1
- package/dist/rendering/ForwardPass.d.ts +84 -0
- package/dist/rendering/ForwardPass.d.ts.map +1 -1
- package/dist/rendering/ForwardPass.js +236 -12
- package/dist/rendering/ForwardPass.js.map +1 -1
- package/dist/rendering/LightUniforms.d.ts +12 -0
- package/dist/rendering/LightUniforms.d.ts.map +1 -1
- package/dist/rendering/LightUniforms.js +9 -1
- package/dist/rendering/LightUniforms.js.map +1 -1
- package/dist/rendering/atmosphere/CloudLayer.d.ts +15 -0
- package/dist/rendering/atmosphere/CloudLayer.d.ts.map +1 -1
- package/dist/rendering/atmosphere/CloudLayer.js +27 -5
- package/dist/rendering/atmosphere/CloudLayer.js.map +1 -1
- package/dist/rendering/atmosphere/GradientSky.d.ts +3 -3
- package/dist/rendering/atmosphere/GradientSky.d.ts.map +1 -1
- package/dist/rendering/atmosphere/GradientSky.js +20 -9
- package/dist/rendering/atmosphere/GradientSky.js.map +1 -1
- package/dist/rendering/atmosphere/HeightFog.d.ts.map +1 -1
- package/dist/rendering/atmosphere/HeightFog.js +9 -0
- package/dist/rendering/atmosphere/HeightFog.js.map +1 -1
- package/dist/rendering/atmosphere/SkyBackgroundPass.d.ts +11 -0
- package/dist/rendering/atmosphere/SkyBackgroundPass.d.ts.map +1 -1
- package/dist/rendering/atmosphere/SkyBackgroundPass.js +40 -7
- package/dist/rendering/atmosphere/SkyBackgroundPass.js.map +1 -1
- package/dist/rendering/atmosphere/StarField.d.ts +21 -0
- package/dist/rendering/atmosphere/StarField.d.ts.map +1 -1
- package/dist/rendering/atmosphere/StarField.js +24 -1
- package/dist/rendering/atmosphere/StarField.js.map +1 -1
- package/dist/rendering/atmosphere/sky.glsl.d.ts.map +1 -1
- package/dist/rendering/atmosphere/sky.glsl.js +8 -0
- package/dist/rendering/atmosphere/sky.glsl.js.map +1 -1
- package/dist/rendering/contracts/flags.state.d.ts.map +1 -1
- package/dist/rendering/contracts/flags.state.js +19 -0
- package/dist/rendering/contracts/flags.state.js.map +1 -1
- package/dist/rendering/forward/Lighting.d.ts +7 -1
- package/dist/rendering/forward/Lighting.d.ts.map +1 -1
- package/dist/rendering/forward/Lighting.js +24 -1
- package/dist/rendering/forward/Lighting.js.map +1 -1
- package/dist/rendering/forward/Velocity.d.ts +8 -0
- package/dist/rendering/forward/Velocity.d.ts.map +1 -1
- package/dist/rendering/forward/Velocity.js +10 -0
- package/dist/rendering/forward/Velocity.js.map +1 -1
- package/dist/rendering/lanes/prd03.d.ts +1 -1
- package/dist/rendering/lanes/prd03.d.ts.map +1 -1
- package/dist/rendering/lanes/prd03.js +6 -1
- package/dist/rendering/lanes/prd03.js.map +1 -1
- package/dist/rendering/lanes/prd07.d.ts.map +1 -1
- package/dist/rendering/lanes/prd07.js +5 -2
- package/dist/rendering/lanes/prd07.js.map +1 -1
- package/dist/rendering/post/DisplayLutCache.d.ts +10 -2
- package/dist/rendering/post/DisplayLutCache.d.ts.map +1 -1
- package/dist/rendering/post/DisplayLutCache.js +15 -3
- package/dist/rendering/post/DisplayLutCache.js.map +1 -1
- package/dist/rendering/post/PostGraph.d.ts +23 -0
- package/dist/rendering/post/PostGraph.d.ts.map +1 -1
- package/dist/rendering/post/PostGraph.js.map +1 -1
- package/dist/rendering/post/PostQualityTiers.d.ts +36 -0
- package/dist/rendering/post/PostQualityTiers.d.ts.map +1 -1
- package/dist/rendering/post/PostQualityTiers.js +75 -0
- package/dist/rendering/post/PostQualityTiers.js.map +1 -1
- package/dist/rendering/post/chunks/velocity.glsl.d.ts +7 -0
- package/dist/rendering/post/chunks/velocity.glsl.d.ts.map +1 -1
- package/dist/rendering/post/chunks/velocity.glsl.js +12 -1
- package/dist/rendering/post/chunks/velocity.glsl.js.map +1 -1
- package/dist/rendering/post/shaders/displayGrade.glsl.d.ts +15 -1
- package/dist/rendering/post/shaders/displayGrade.glsl.d.ts.map +1 -1
- package/dist/rendering/post/shaders/displayGrade.glsl.js +26 -2
- package/dist/rendering/post/shaders/displayGrade.glsl.js.map +1 -1
- package/dist/rendering/post/shaders/dof.glsl.d.ts +11 -1
- package/dist/rendering/post/shaders/dof.glsl.d.ts.map +1 -1
- package/dist/rendering/post/shaders/dof.glsl.js +22 -0
- package/dist/rendering/post/shaders/dof.glsl.js.map +1 -1
- package/dist/rendering/post/shaders/finalize.glsl.d.ts +1 -1
- package/dist/rendering/post/shaders/finalize.glsl.d.ts.map +1 -1
- package/dist/rendering/post/shaders/finalize.glsl.js +3 -2
- package/dist/rendering/post/shaders/finalize.glsl.js.map +1 -1
- package/dist/rendering/post/shaders/godrays.glsl.d.ts +24 -1
- package/dist/rendering/post/shaders/godrays.glsl.d.ts.map +1 -1
- package/dist/rendering/post/shaders/godrays.glsl.js +45 -5
- package/dist/rendering/post/shaders/godrays.glsl.js.map +1 -1
- package/dist/rendering/post/shaders/hdrGrade.glsl.d.ts +66 -0
- package/dist/rendering/post/shaders/hdrGrade.glsl.d.ts.map +1 -0
- package/dist/rendering/post/shaders/hdrGrade.glsl.js +159 -0
- package/dist/rendering/post/shaders/hdrGrade.glsl.js.map +1 -0
- package/dist/rendering/post/shaders/ssr.glsl.d.ts +39 -0
- package/dist/rendering/post/shaders/ssr.glsl.d.ts.map +1 -0
- package/dist/rendering/post/shaders/ssr.glsl.js +163 -0
- package/dist/rendering/post/shaders/ssr.glsl.js.map +1 -0
- package/dist/rendering/post/v2Stages.d.ts +53 -0
- package/dist/rendering/post/v2Stages.d.ts.map +1 -1
- package/dist/rendering/post/v2Stages.js +314 -23
- package/dist/rendering/post/v2Stages.js.map +1 -1
- package/dist/rendering/postprocess/NativeBloomPyramid.d.ts +19 -0
- package/dist/rendering/postprocess/NativeBloomPyramid.d.ts.map +1 -1
- package/dist/rendering/postprocess/NativeBloomPyramid.js +37 -0
- package/dist/rendering/postprocess/NativeBloomPyramid.js.map +1 -1
- package/dist/rendering/program/ProgramGenerator.d.ts.map +1 -1
- package/dist/rendering/program/ProgramGenerator.js +12 -1
- package/dist/rendering/program/ProgramGenerator.js.map +1 -1
- package/dist/rendering/program/chunks/shadow_forward.glsl.d.ts +12 -0
- package/dist/rendering/program/chunks/shadow_forward.glsl.d.ts.map +1 -1
- package/dist/rendering/program/chunks/shadow_forward.glsl.js +57 -0
- package/dist/rendering/program/chunks/shadow_forward.glsl.js.map +1 -1
- package/dist/rendering/renderer/Background.d.ts.map +1 -1
- package/dist/rendering/renderer/Background.js +26 -2
- package/dist/rendering/renderer/Background.js.map +1 -1
- package/dist/rendering/renderer/FrameGraph.d.ts +8 -0
- package/dist/rendering/renderer/FrameGraph.d.ts.map +1 -1
- package/dist/rendering/renderer/FrameGraph.js +46 -7
- package/dist/rendering/renderer/FrameGraph.js.map +1 -1
- package/dist/rendering/renderer/OutlineTargets.d.ts +99 -0
- package/dist/rendering/renderer/OutlineTargets.d.ts.map +1 -0
- package/dist/rendering/renderer/OutlineTargets.js +286 -0
- package/dist/rendering/renderer/OutlineTargets.js.map +1 -0
- package/dist/rendering/renderer/PostprocessExecution.d.ts +5 -0
- package/dist/rendering/renderer/PostprocessExecution.d.ts.map +1 -1
- package/dist/rendering/renderer/PostprocessExecution.js +70 -4
- package/dist/rendering/renderer/PostprocessExecution.js.map +1 -1
- package/dist/rendering/renderer/postSkipped.d.ts +6 -0
- package/dist/rendering/renderer/postSkipped.d.ts.map +1 -1
- package/dist/rendering/renderer/postSkipped.js +8 -0
- package/dist/rendering/renderer/postSkipped.js.map +1 -1
- package/dist/rendering/shaders/chunks/author/ibl.glsl.d.ts +20 -0
- package/dist/rendering/shaders/chunks/author/ibl.glsl.d.ts.map +1 -0
- package/dist/rendering/shaders/chunks/author/ibl.glsl.js +84 -0
- package/dist/rendering/shaders/chunks/author/ibl.glsl.js.map +1 -0
- package/dist/rendering/shaders/chunks/author/index.d.ts +3 -1
- package/dist/rendering/shaders/chunks/author/index.d.ts.map +1 -1
- package/dist/rendering/shaders/chunks/author/index.js +38 -3
- package/dist/rendering/shaders/chunks/author/index.js.map +1 -1
- package/dist/rendering/shaders/chunks/author/lights.glsl.d.ts +16 -0
- package/dist/rendering/shaders/chunks/author/lights.glsl.d.ts.map +1 -0
- package/dist/rendering/shaders/chunks/author/lights.glsl.js +112 -0
- package/dist/rendering/shaders/chunks/author/lights.glsl.js.map +1 -0
- package/dist/rendering/shaders/chunks/author/shadow.glsl.d.ts +16 -2
- package/dist/rendering/shaders/chunks/author/shadow.glsl.d.ts.map +1 -1
- package/dist/rendering/shaders/chunks/author/shadow.glsl.js +46 -2
- package/dist/rendering/shaders/chunks/author/shadow.glsl.js.map +1 -1
- package/dist/rendering/shaders/chunks/instance_color_target.glsl.d.ts +34 -0
- package/dist/rendering/shaders/chunks/instance_color_target.glsl.d.ts.map +1 -0
- package/dist/rendering/shaders/chunks/instance_color_target.glsl.js +101 -0
- package/dist/rendering/shaders/chunks/instance_color_target.glsl.js.map +1 -0
- package/dist/rendering/shaders/chunks/rim.glsl.d.ts +37 -0
- package/dist/rendering/shaders/chunks/rim.glsl.d.ts.map +1 -0
- package/dist/rendering/shaders/chunks/rim.glsl.js +50 -0
- package/dist/rendering/shaders/chunks/rim.glsl.js.map +1 -0
- package/dist/rendering/shadows/Prd02ShadowBridge.d.ts +26 -3
- package/dist/rendering/shadows/Prd02ShadowBridge.d.ts.map +1 -1
- package/dist/rendering/shadows/Prd02ShadowBridge.js +134 -8
- package/dist/rendering/shadows/Prd02ShadowBridge.js.map +1 -1
- package/dist/rendering/shadows/Prd02ShadowsContributor.d.ts.map +1 -1
- package/dist/rendering/shadows/Prd02ShadowsContributor.js +4 -16
- package/dist/rendering/shadows/Prd02ShadowsContributor.js.map +1 -1
- package/dist/rendering/vfx/VfxAtlas.d.ts +10 -0
- package/dist/rendering/vfx/VfxAtlas.d.ts.map +1 -1
- package/dist/rendering/vfx/VfxAtlas.js +18 -3
- package/dist/rendering/vfx/VfxAtlas.js.map +1 -1
- package/dist/rendering/webgl2/LegacyPost.d.ts +9 -1
- package/dist/rendering/webgl2/LegacyPost.d.ts.map +1 -1
- package/dist/rendering/webgl2/LegacyPost.js +23 -7
- package/dist/rendering/webgl2/LegacyPost.js.map +1 -1
- package/dist/rendering/webgl2/MultiDraw.d.ts.map +1 -1
- package/dist/rendering/webgl2/MultiDraw.js +51 -1
- package/dist/rendering/webgl2/MultiDraw.js.map +1 -1
- package/dist/rendering/world/vegetation/WindField.d.ts.map +1 -1
- package/dist/rendering/world/vegetation/WindField.js +4 -1
- package/dist/rendering/world/vegetation/WindField.js.map +1 -1
- package/dist/rendering/world/water/ReflectionViewPass.d.ts.map +1 -1
- package/dist/rendering/world/water/ReflectionViewPass.js +12 -2
- package/dist/rendering/world/water/ReflectionViewPass.js.map +1 -1
- package/dist/rendering/world/water/SceneCopyFallback.d.ts.map +1 -1
- package/dist/rendering/world/water/SceneCopyFallback.js +9 -2
- package/dist/rendering/world/water/SceneCopyFallback.js.map +1 -1
- package/dist/rendering/world/water/WaterMaterial.d.ts.map +1 -1
- package/dist/rendering/world/water/WaterMaterial.js +8 -2
- package/dist/rendering/world/water/WaterMaterial.js.map +1 -1
- package/package.json +25 -25
- package/templates/cinematic-scene/package.json +2 -2
- package/templates/mini-game/package.json +2 -2
- package/templates/product-viewer/package.json +2 -2
- package/templates/production-asset-inspector/package.json +1 -1
- package/templates/production-material-studio/package.json +1 -1
- package/templates/production-product-configurator/package.json +1 -1
- package/templates/production-product-viewer/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { Texture } from "../../../rendering/index.js";
|
|
|
7
7
|
import { QUALITY_TIERS } from "../../../rendering/contracts/index.js";
|
|
8
8
|
import { MeshParticleBatch, RibbonBatch, RibbonTrail, DecalBatch, DECAL_TIER_CAP, decalQuadGeometry, ribbonStripToDecalGeometry, PARTICLE_GPU_BUDGET_MS, ProceduralVolumeEmitter } from "../../../rendering/index.js";
|
|
9
9
|
import { createEmitter, stepEmitter, writeEmitterInstances } from "./CpuEmitter.js";
|
|
10
|
-
import { proceduralFireballSheet } from "./FlipbookAtlas.js";
|
|
10
|
+
import { proceduralFireballSheet, VfxSpriteTextures, vfxSpriteFrame, vfxSpritePageSize } from "./FlipbookAtlas.js";
|
|
11
11
|
import { lowerEffectNode, srgbChannelToLinear } from "./EffectNodeLowering.js";
|
|
12
12
|
import { EffectDiagnostics } from "./EffectDiagnostics.js";
|
|
13
13
|
import { LiveAtmosphere } from "./LiveAtmosphere.js";
|
|
@@ -32,6 +32,47 @@ function flipbookTexture(fb) {
|
|
|
32
32
|
}
|
|
33
33
|
return texture;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* GU47 E-F: overwrite the instance `frame` slot (float 13 of the §6.2.1 layout) of every live particle with
|
|
37
|
+
* its sprite frame. `writeEmitterInstances` packs particle i at `i * 16`, so `state.age[i]` / `state.life[i]`
|
|
38
|
+
* line up; rotation and the life fade stay as the emitter wrote them.
|
|
39
|
+
*/
|
|
40
|
+
export function writeSpriteFrames(state, out, live, sprite) {
|
|
41
|
+
const fixed = sprite.kind === "texture" ? { frames: sprite.frames, frame: sprite.frame } : sprite;
|
|
42
|
+
for (let i = 0; i < live; i++)
|
|
43
|
+
out[i * 16 + 13] = vfxSpriteFrame(fixed, state.age[i], state.life[i]);
|
|
44
|
+
}
|
|
45
|
+
/** GU47 E-F: a ribbon that samples its target every frame and drops points older than `life`. */
|
|
46
|
+
/** Linear blend of two RGBA colours (`t` 0: `a`, 1: `b`). */
|
|
47
|
+
function mixColor4(a, b, t) {
|
|
48
|
+
return [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t, a[3] + (b[3] - a[3]) * t];
|
|
49
|
+
}
|
|
50
|
+
/** GU47 E-F: follow state of a scene `effects.trail({ target })` node (ring of maxPoints, optional life fade). */
|
|
51
|
+
function sceneTrailFollow(node, color) {
|
|
52
|
+
const ramp = node.widthOverSpeed;
|
|
53
|
+
return {
|
|
54
|
+
target: node.target,
|
|
55
|
+
life: typeof node.life === "number" && node.life > 0 ? node.life : Number.POSITIVE_INFINITY,
|
|
56
|
+
width: typeof node.width === "number" && node.width > 0 ? node.width : 0.3,
|
|
57
|
+
color,
|
|
58
|
+
...(ramp && ramp.length >= 2 && Number.isFinite(ramp[0]) && Number.isFinite(ramp[1]) ? { widthOverSpeed: [ramp[0], ramp[1]] } : {}),
|
|
59
|
+
maxPoints: Math.max(2, Math.round(node.maxPoints ?? 48)),
|
|
60
|
+
minVertexDistance: typeof node.minVertexDistance === "number" && node.minVertexDistance >= 0 ? node.minVertexDistance : 0.05,
|
|
61
|
+
points: [],
|
|
62
|
+
following: true,
|
|
63
|
+
last: null,
|
|
64
|
+
missingNoted: false
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** Width multiplier for a point sampled at `speed` m/s under `widthOverSpeed` [min, max]. */
|
|
68
|
+
export function trailWidthScale(speed, ramp) {
|
|
69
|
+
if (!ramp)
|
|
70
|
+
return 1;
|
|
71
|
+
const [lo, hi] = ramp;
|
|
72
|
+
if (!(hi > lo))
|
|
73
|
+
return speed >= lo ? 1 : 0;
|
|
74
|
+
return Math.min(1, Math.max(0, (speed - lo) / (hi - lo)));
|
|
75
|
+
}
|
|
35
76
|
function hexToRgb(c) {
|
|
36
77
|
if (c.startsWith("#") && c.length === 7) {
|
|
37
78
|
return [parseInt(c.slice(1, 3), 16) / 255, parseInt(c.slice(3, 5), 16) / 255, parseInt(c.slice(5, 7), 16) / 255];
|
|
@@ -255,11 +296,17 @@ export class ProductionEffectSystem {
|
|
|
255
296
|
renderBridged = false;
|
|
256
297
|
/** A renderer frame pulled the render source since the last endFrame. */
|
|
257
298
|
renderSincePrevFrame = false;
|
|
299
|
+
/** GU47 E-F: atlas-sprite and texture-sheet textures, loaded on first use (1k page on low/medium tiers). */
|
|
300
|
+
sprites;
|
|
301
|
+
/** GU47 E-F: emitters that follow a runtime node (`attachTo`), keyed by emitter id. */
|
|
302
|
+
attachments = new Map();
|
|
303
|
+
socketScratch = new Float32Array(16);
|
|
258
304
|
constructor(app, options = {}) {
|
|
259
305
|
this.app = app;
|
|
260
306
|
// Resolved C-27 tier wins over the explicit option's fallback: callers pass
|
|
261
307
|
// app.quality.tier; "high" remains only as the unresolved default.
|
|
262
308
|
this.tier = options.tier ?? app.quality?.tier ?? "high";
|
|
309
|
+
this.sprites = new VfxSpriteTextures(options.spriteLoader, vfxSpritePageSize(this.tier), (key, message) => this.diagnostics.note("VFX_SPRITE_UNAVAILABLE", key, `sprite texture ${key} failed to load (${message}); the batch keeps the soft-dot`), options.spritePageUrl);
|
|
263
310
|
this.decals = new DecalBatch(DECAL_TIER_CAP[this.tier]);
|
|
264
311
|
this.budgetCap = QUALITY_TIERS[this.tier].particleBudget;
|
|
265
312
|
this.transientLights = new TransientLightPool(this.tier);
|
|
@@ -276,6 +323,9 @@ export class ProductionEffectSystem {
|
|
|
276
323
|
return { id, age: Number((this.time - record.born).toFixed(2)), live: binding?.state.live ?? 0, emissionRate: binding?.state.desc.emissionRate ?? 0 };
|
|
277
324
|
}),
|
|
278
325
|
scene: [...this.emitters.keys()].filter((id) => !this.transients.has(id)),
|
|
326
|
+
// GU47 E-F: sprite texture load state and live trails (receipts vfx-atlas-sprites, vfx-trail).
|
|
327
|
+
sprites: this.spriteStatus(),
|
|
328
|
+
trails: [...this.trails.keys()].map((id) => ({ id, ...(this.trailInfo(id) ?? { length: 0, pointCount: 0 }) })),
|
|
279
329
|
notes: this.diagnostics.report().errors
|
|
280
330
|
});
|
|
281
331
|
}
|
|
@@ -304,16 +354,26 @@ export class ProductionEffectSystem {
|
|
|
304
354
|
setParticleLowRes(on) {
|
|
305
355
|
this.lastHook?.setLowResEnabled?.(on);
|
|
306
356
|
}
|
|
357
|
+
/** The sky spec the current scene's sky node put on LiveAtmosphere (null: the scene has none). */
|
|
358
|
+
sceneSky = null;
|
|
307
359
|
/** P3-T4 — sky nodes land on LiveAtmosphere (consumed by prd07.sky flag-on). */
|
|
308
360
|
rebuildSkyFromScene() {
|
|
361
|
+
let found = null;
|
|
309
362
|
// Grouped-effects walk: sky nodes inside visible groups count too.
|
|
310
363
|
this.walkNodes((node, visible) => {
|
|
311
364
|
if (!visible || node.kind !== "sky")
|
|
312
365
|
return;
|
|
313
366
|
const spec = node.spec;
|
|
314
|
-
if (spec && typeof spec === "object")
|
|
367
|
+
if (spec && typeof spec === "object") {
|
|
368
|
+
found = spec;
|
|
315
369
|
this.atmosphere.setSky(spec);
|
|
370
|
+
}
|
|
316
371
|
});
|
|
372
|
+
// A sky that came from the previous scene's sky node leaves with it (setScene to a scene without one); a sky set
|
|
373
|
+
// at runtime through app.atmosphere.setSky stays. Before this the old sky kept drawing over the next scene.
|
|
374
|
+
if (found === null && this.sceneSky !== null && this.atmosphere.state().sky === this.sceneSky)
|
|
375
|
+
this.atmosphere.clearSky();
|
|
376
|
+
this.sceneSky = found;
|
|
317
377
|
this.applyLegacySkyVisibility();
|
|
318
378
|
}
|
|
319
379
|
/**
|
|
@@ -411,7 +471,7 @@ export class ProductionEffectSystem {
|
|
|
411
471
|
this.walkNodes((node, visible) => {
|
|
412
472
|
if (!visible || node.kind !== "effect")
|
|
413
473
|
return;
|
|
414
|
-
const lowered = lowerEffectNode(node);
|
|
474
|
+
const lowered = lowerEffectNode(this.placeAttached(node));
|
|
415
475
|
this.diagnostics.track({
|
|
416
476
|
nodeId: lowered.nodeId,
|
|
417
477
|
effect: lowered.effect,
|
|
@@ -422,6 +482,7 @@ export class ProductionEffectSystem {
|
|
|
422
482
|
});
|
|
423
483
|
if (lowered.type === "emitter") {
|
|
424
484
|
this.attachEmitter(lowered);
|
|
485
|
+
this.trackAttachment(lowered.nodeId, node);
|
|
425
486
|
}
|
|
426
487
|
else if (lowered.type === "volume") {
|
|
427
488
|
this.attachVolume(lowered);
|
|
@@ -462,7 +523,12 @@ export class ProductionEffectSystem {
|
|
|
462
523
|
const step = points.length > 1 ? 0.02 : 0;
|
|
463
524
|
points.forEach((p, i) => trail.push([p[0] ?? 0, p[1] ?? 0, p[2] ?? 0], i * step));
|
|
464
525
|
}
|
|
465
|
-
|
|
526
|
+
// GU47 E-F: a scene trail with a `target` (and no static `path`) follows that runtime node every frame;
|
|
527
|
+
// `life` fades and drops old points (absent: a ring of maxPoints). Follow state survives scene rebuilds.
|
|
528
|
+
const follow = node.target !== undefined && !Array.isArray(node.path)
|
|
529
|
+
? this.trails.get(lowered.nodeId)?.follow ?? sceneTrailFollow(node, color)
|
|
530
|
+
: undefined;
|
|
531
|
+
this.trails.set(lowered.nodeId, { trail, node, ...(follow ? { follow } : {}) });
|
|
466
532
|
}
|
|
467
533
|
else if (lowered.consumer === "mesh-pass") {
|
|
468
534
|
this.meshBatches.set(lowered.nodeId, seedMeshBatch(node));
|
|
@@ -578,8 +644,152 @@ export class ProductionEffectSystem {
|
|
|
578
644
|
const binding = this.trails.get(nodeId);
|
|
579
645
|
if (!binding)
|
|
580
646
|
return false;
|
|
647
|
+
if (binding.follow) {
|
|
648
|
+
this.sampleTrail(binding.follow, position);
|
|
649
|
+
return true;
|
|
650
|
+
}
|
|
581
651
|
return binding.trail.push(position, this.time, width, color);
|
|
582
652
|
}
|
|
653
|
+
/**
|
|
654
|
+
* GU47 E-F `app.effects.trail`: a camera-facing ribbon on the RibbonBatch that follows `target` (runtime node
|
|
655
|
+
* id, `{ node, socket }` or a node handle; undefined: points come from `trailPush`). Points older than `life`
|
|
656
|
+
* seconds drop off, so the ribbon is as long as the distance the target covered in `life`. The head is
|
|
657
|
+
* opaque and the tail fades; `widthOverSpeed` ramps the width by the target's speed.
|
|
658
|
+
*/
|
|
659
|
+
addTrail(id, target, options) {
|
|
660
|
+
const life = Number.isFinite(options.life) && options.life > 0 ? options.life : 0.5;
|
|
661
|
+
const width = Number.isFinite(options.width) && options.width > 0 ? options.width : 0.3;
|
|
662
|
+
// One point per frame at up to 120 Hz over the life, capped per tier.
|
|
663
|
+
const cap = this.tier === "low" ? 120 : 360;
|
|
664
|
+
const maxPoints = Math.max(8, Math.min(cap, Math.ceil(life * 120) + 2));
|
|
665
|
+
const minVertexDistance = options.minVertexDistance !== undefined && options.minVertexDistance >= 0 ? options.minVertexDistance : 0.05;
|
|
666
|
+
const color = effectColor4({ kind: "effect", color: options.color });
|
|
667
|
+
const trail = this.ribbons.upsertTrail({ id, maxPoints, minVertexDistance, width, color, orientation: "camera" });
|
|
668
|
+
const ramp = options.widthOverSpeed;
|
|
669
|
+
const follow = {
|
|
670
|
+
target,
|
|
671
|
+
life,
|
|
672
|
+
width,
|
|
673
|
+
color,
|
|
674
|
+
...(options.colorTail !== undefined ? { colorTail: effectColor4({ kind: "effect", color: options.colorTail }) } : {}),
|
|
675
|
+
...(ramp && ramp.length >= 2 && Number.isFinite(ramp[0]) && Number.isFinite(ramp[1]) ? { widthOverSpeed: [ramp[0], ramp[1]] } : {}),
|
|
676
|
+
maxPoints,
|
|
677
|
+
minVertexDistance,
|
|
678
|
+
points: [],
|
|
679
|
+
following: true,
|
|
680
|
+
last: null,
|
|
681
|
+
missingNoted: false
|
|
682
|
+
};
|
|
683
|
+
this.trails.set(id, { trail, node: { kind: "effect", effect: "trail", id }, follow, runtime: true });
|
|
684
|
+
if (target !== undefined) {
|
|
685
|
+
const at = this.resolveTarget(target);
|
|
686
|
+
if (at)
|
|
687
|
+
this.sampleTrail(follow, at);
|
|
688
|
+
}
|
|
689
|
+
return id;
|
|
690
|
+
}
|
|
691
|
+
/** GU47 E-F: live length (metres along the points) and point count of a trail, or null once it is gone. */
|
|
692
|
+
trailInfo(id) {
|
|
693
|
+
const binding = this.trails.get(id);
|
|
694
|
+
if (!binding)
|
|
695
|
+
return null;
|
|
696
|
+
const points = binding.follow ? binding.follow.points.map((p) => p.position) : binding.trail.getPoints().map((p) => p.position);
|
|
697
|
+
let length = 0;
|
|
698
|
+
for (let i = 1; i < points.length; i++) {
|
|
699
|
+
length += Math.hypot(points[i][0] - points[i - 1][0], points[i][1] - points[i - 1][1], points[i][2] - points[i - 1][2]);
|
|
700
|
+
}
|
|
701
|
+
return { length, pointCount: points.length };
|
|
702
|
+
}
|
|
703
|
+
/** GU47 pass 4: shift every live point (and the speed reference) of a trail by `offset` metres. */
|
|
704
|
+
translateTrail(id, offset) {
|
|
705
|
+
const follow = this.trails.get(id)?.follow;
|
|
706
|
+
const [dx, dy, dz] = offset;
|
|
707
|
+
if (!follow || !Number.isFinite(dx) || !Number.isFinite(dy) || !Number.isFinite(dz) || (dx === 0 && dy === 0 && dz === 0))
|
|
708
|
+
return;
|
|
709
|
+
const shift = (p) => [p[0] + dx, p[1] + dy, p[2] + dz];
|
|
710
|
+
for (const point of follow.points)
|
|
711
|
+
point.position = shift(point.position);
|
|
712
|
+
if (follow.last)
|
|
713
|
+
follow.last = { position: shift(follow.last.position), time: follow.last.time };
|
|
714
|
+
}
|
|
715
|
+
/** GU47 E-F: drop every point of a trail (it restarts from the target's next position). */
|
|
716
|
+
clearTrail(id) {
|
|
717
|
+
const binding = this.trails.get(id);
|
|
718
|
+
if (!binding)
|
|
719
|
+
return;
|
|
720
|
+
if (binding.follow) {
|
|
721
|
+
binding.follow.points.length = 0;
|
|
722
|
+
binding.follow.last = null;
|
|
723
|
+
}
|
|
724
|
+
binding.trail.clear();
|
|
725
|
+
}
|
|
726
|
+
/** GU47 E-F: stop following; `immediate` removes the ribbon now, otherwise it fades out over `life`. */
|
|
727
|
+
stopTrail(id, immediate = false) {
|
|
728
|
+
const binding = this.trails.get(id);
|
|
729
|
+
if (!binding)
|
|
730
|
+
return;
|
|
731
|
+
if (immediate || !binding.follow || !Number.isFinite(binding.follow.life)) {
|
|
732
|
+
binding.trail.clear();
|
|
733
|
+
this.ribbons.removeTrail(id);
|
|
734
|
+
this.trails.delete(id);
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
binding.follow.following = false;
|
|
738
|
+
}
|
|
739
|
+
/** Append the target's position when it moved at least `minVertexDistance` since the last point. */
|
|
740
|
+
sampleTrail(follow, position) {
|
|
741
|
+
const p = [position[0], position[1], position[2]];
|
|
742
|
+
const last = follow.last;
|
|
743
|
+
const elapsed = last ? this.time - last.time : 0;
|
|
744
|
+
const speed = last && elapsed > 1e-6 ? Math.hypot(p[0] - last.position[0], p[1] - last.position[1], p[2] - last.position[2]) / elapsed : 0;
|
|
745
|
+
if (!last || elapsed > 1e-6 || follow.points.length === 0)
|
|
746
|
+
follow.last = { position: p, time: this.time };
|
|
747
|
+
const head = follow.points[follow.points.length - 1];
|
|
748
|
+
if (!head || Math.hypot(p[0] - head.position[0], p[1] - head.position[1], p[2] - head.position[2]) >= follow.minVertexDistance) {
|
|
749
|
+
follow.points.push({ position: p, time: this.time, speed });
|
|
750
|
+
while (follow.points.length > follow.maxPoints)
|
|
751
|
+
follow.points.shift();
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
/** GU47 E-F: sample every following trail, expire old points and rebuild the ribbon rings (head first). */
|
|
755
|
+
stepTrails() {
|
|
756
|
+
for (const [id, binding] of this.trails) {
|
|
757
|
+
const follow = binding.follow;
|
|
758
|
+
if (!follow)
|
|
759
|
+
continue;
|
|
760
|
+
if (follow.following && follow.target !== undefined) {
|
|
761
|
+
const at = this.resolveTarget(follow.target);
|
|
762
|
+
if (at)
|
|
763
|
+
this.sampleTrail(follow, at);
|
|
764
|
+
else if (!follow.missingNoted) {
|
|
765
|
+
follow.missingNoted = true;
|
|
766
|
+
this.diagnostics.note("VFX_ATTACH_TARGET_MISSING", id, "trail target does not resolve to a runtime node; the ribbon stops growing");
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
if (Number.isFinite(follow.life)) {
|
|
770
|
+
const cutoff = this.time - follow.life;
|
|
771
|
+
let drop = 0;
|
|
772
|
+
while (drop < follow.points.length && follow.points[drop].time < cutoff)
|
|
773
|
+
drop++;
|
|
774
|
+
if (drop > 0)
|
|
775
|
+
follow.points.splice(0, drop);
|
|
776
|
+
}
|
|
777
|
+
if (!follow.following && follow.points.length === 0) {
|
|
778
|
+
binding.trail.clear();
|
|
779
|
+
this.ribbons.removeTrail(id);
|
|
780
|
+
this.trails.delete(id);
|
|
781
|
+
continue;
|
|
782
|
+
}
|
|
783
|
+
binding.trail.clear();
|
|
784
|
+
// Newest first: the batch alpha curve 0.45·(1 − i/maxPoints) then peaks at the target and fades to the tail.
|
|
785
|
+
for (let i = follow.points.length - 1; i >= 0; i--) {
|
|
786
|
+
const point = follow.points[i];
|
|
787
|
+
const fade = Number.isFinite(follow.life) ? Math.max(0, 1 - (this.time - point.time) / follow.life) : 1;
|
|
788
|
+
const c = follow.colorTail ? mixColor4(follow.color, follow.colorTail, 1 - fade) : follow.color;
|
|
789
|
+
binding.trail.push(point.position, point.time, follow.width * trailWidthScale(point.speed, follow.widthOverSpeed), [c[0], c[1], c[2], c[3] * fade]);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
583
793
|
attachEmitter(lowered) {
|
|
584
794
|
const state = createEmitter(lowered.emitter);
|
|
585
795
|
const binding = {
|
|
@@ -603,15 +813,116 @@ export class ProductionEffectSystem {
|
|
|
603
813
|
/** App-level switch for runtime-spawned effects (effects.burst/spawn, game effects, impact presets). The URL's `?vfx=on|off` overrides it. */
|
|
604
814
|
setRuntimeEffects(mode) {
|
|
605
815
|
this.runtimeEffectsApp = mode === "off" ? "off" : "on";
|
|
816
|
+
// GU47 E-F (floating dots): "off" drops the runtime particles that are already running too. Before, only new
|
|
817
|
+
// spawns were refused, so a continuous emitter started before the switch kept emitting at its spot for good.
|
|
818
|
+
if (this.runtimeEffects === "off")
|
|
819
|
+
this.clearRuntimeParticles();
|
|
820
|
+
}
|
|
821
|
+
/** GU47 E-F: remove every runtime-spawned emitter and runtime trail now (scene effects and decals stay). */
|
|
822
|
+
clearRuntimeParticles() {
|
|
823
|
+
for (const id of [...this.transients.keys()])
|
|
824
|
+
this.removeInstance(id);
|
|
825
|
+
for (const [id, binding] of [...this.trails]) {
|
|
826
|
+
if (binding.runtime)
|
|
827
|
+
this.stopTrail(id, true);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
/** GU47 E-F: true while a runtime instance still has an emitter (spent one-shots are retired at once). */
|
|
831
|
+
instanceAlive(id) {
|
|
832
|
+
return this.emitters.has(id) || this.trails.has(id) || this.decalNodes.has(id);
|
|
833
|
+
}
|
|
834
|
+
/** Drop a spent runtime emitter: its batch leaves the particle pass on the next feed. */
|
|
835
|
+
retireEmitter(id) {
|
|
836
|
+
this.emitters.delete(id);
|
|
837
|
+
this.transients.delete(id);
|
|
838
|
+
this.attachments.delete(id);
|
|
839
|
+
this.diagnostics.untrack(id);
|
|
606
840
|
}
|
|
607
841
|
get runtimeEffects() {
|
|
608
842
|
return this.runtimeEffectsUrl ?? this.runtimeEffectsApp;
|
|
609
843
|
}
|
|
844
|
+
/**
|
|
845
|
+
* GU47 E-F: world position of an attach target: a runtime node id, `{ node, socket }` (the actor's bone
|
|
846
|
+
* socket when it resolves, else the node), or a node handle. Null when nothing resolves.
|
|
847
|
+
*/
|
|
848
|
+
resolveTarget(target) {
|
|
849
|
+
let handle;
|
|
850
|
+
let socket;
|
|
851
|
+
if (typeof target === "string") {
|
|
852
|
+
handle = this.app.nodes?.get(target);
|
|
853
|
+
}
|
|
854
|
+
else if (typeof target === "object" && target !== null) {
|
|
855
|
+
const ref = target;
|
|
856
|
+
if (typeof ref.node === "string") {
|
|
857
|
+
handle = this.app.nodes?.get(ref.node);
|
|
858
|
+
socket = typeof ref.socket === "string" ? ref.socket : undefined;
|
|
859
|
+
}
|
|
860
|
+
else {
|
|
861
|
+
handle = target;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
if (!handle)
|
|
865
|
+
return null;
|
|
866
|
+
if (socket !== undefined) {
|
|
867
|
+
const bone = handle.animation?.socket?.(socket);
|
|
868
|
+
if (bone?.valid) {
|
|
869
|
+
const m = bone.worldMatrix(this.socketScratch);
|
|
870
|
+
if (Number.isFinite(m[12]) && Number.isFinite(m[13]) && Number.isFinite(m[14]))
|
|
871
|
+
return [m[12], m[13], m[14]];
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
const p = typeof handle.getWorldPosition === "function" ? handle.getWorldPosition() : handle.position;
|
|
875
|
+
if (!p || p.length < 3 || !Number.isFinite(p[0]) || !Number.isFinite(p[1]) || !Number.isFinite(p[2]))
|
|
876
|
+
return null;
|
|
877
|
+
return [p[0], p[1], p[2]];
|
|
878
|
+
}
|
|
879
|
+
/** GU47 E-F: an `attachTo` node starts at its target (plus its `position` offset); others pass unchanged. */
|
|
880
|
+
placeAttached(node) {
|
|
881
|
+
if (node.attachTo === undefined)
|
|
882
|
+
return node;
|
|
883
|
+
const at = this.resolveTarget(node.attachTo);
|
|
884
|
+
if (!at)
|
|
885
|
+
return node;
|
|
886
|
+
const offset = node.position ?? [0, 0, 0];
|
|
887
|
+
return { ...node, position: [at[0] + offset[0], at[1] + offset[1], at[2] + offset[2]] };
|
|
888
|
+
}
|
|
889
|
+
trackAttachment(emitterId, node) {
|
|
890
|
+
if (node.attachTo === undefined) {
|
|
891
|
+
this.attachments.delete(emitterId);
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
const offset = node.position ?? [0, 0, 0];
|
|
895
|
+
this.attachments.set(emitterId, { target: node.attachTo, offset: [offset[0], offset[1], offset[2]], missingNoted: false });
|
|
896
|
+
}
|
|
897
|
+
/** GU47 E-F: move every attached emitter's origin to its target before the sim step spawns. */
|
|
898
|
+
updateAttachments() {
|
|
899
|
+
for (const [emitterId, attachment] of this.attachments) {
|
|
900
|
+
const binding = this.emitters.get(emitterId);
|
|
901
|
+
if (!binding) {
|
|
902
|
+
this.attachments.delete(emitterId);
|
|
903
|
+
continue;
|
|
904
|
+
}
|
|
905
|
+
const at = this.resolveTarget(attachment.target);
|
|
906
|
+
if (!at) {
|
|
907
|
+
if (!attachment.missingNoted) {
|
|
908
|
+
attachment.missingNoted = true;
|
|
909
|
+
this.diagnostics.note("VFX_ATTACH_TARGET_MISSING", emitterId, "attachTo target does not resolve to a runtime node; the emitter keeps its last position");
|
|
910
|
+
}
|
|
911
|
+
continue;
|
|
912
|
+
}
|
|
913
|
+
const x = at[0] + attachment.offset[0];
|
|
914
|
+
const y = at[1] + attachment.offset[1];
|
|
915
|
+
const z = at[2] + attachment.offset[2];
|
|
916
|
+
const origin = binding.state.desc.origin;
|
|
917
|
+
if (origin[0] !== x || origin[1] !== y || origin[2] !== z)
|
|
918
|
+
binding.state.desc = { ...binding.state.desc, origin: [x, y, z] };
|
|
919
|
+
}
|
|
920
|
+
}
|
|
610
921
|
/** Add a transient effect-instance emitter (effects.burst/spawn). */
|
|
611
922
|
addInstance(nodeId, node) {
|
|
612
923
|
if (this.runtimeEffects === "off")
|
|
613
924
|
return nodeId;
|
|
614
|
-
const lowered = lowerEffectNode(node);
|
|
925
|
+
const lowered = lowerEffectNode(this.placeAttached(node));
|
|
615
926
|
this.diagnostics.track({
|
|
616
927
|
nodeId,
|
|
617
928
|
effect: lowered.effect,
|
|
@@ -622,6 +933,7 @@ export class ProductionEffectSystem {
|
|
|
622
933
|
});
|
|
623
934
|
if (lowered.type === "emitter") {
|
|
624
935
|
this.attachEmitter({ ...lowered, nodeId });
|
|
936
|
+
this.trackAttachment(nodeId, node);
|
|
625
937
|
this.transients.set(nodeId, { born: this.time, warned: false });
|
|
626
938
|
this.lastTransientAt = this.time;
|
|
627
939
|
}
|
|
@@ -636,6 +948,8 @@ export class ProductionEffectSystem {
|
|
|
636
948
|
setInstanceOrigin(nodeId, origin) {
|
|
637
949
|
const binding = this.emitters.get(nodeId);
|
|
638
950
|
if (binding) {
|
|
951
|
+
// An explicit position wins over `attachTo`: the emitter stops following its node.
|
|
952
|
+
this.attachments.delete(nodeId);
|
|
639
953
|
binding.state.desc = { ...binding.state.desc, origin: [origin[0] ?? 0, origin[1] ?? 0, origin[2] ?? 0] };
|
|
640
954
|
return;
|
|
641
955
|
}
|
|
@@ -645,6 +959,7 @@ export class ProductionEffectSystem {
|
|
|
645
959
|
}
|
|
646
960
|
removeInstance(nodeId) {
|
|
647
961
|
this.transients.delete(nodeId);
|
|
962
|
+
this.attachments.delete(nodeId);
|
|
648
963
|
const binding = this.emitters.get(nodeId);
|
|
649
964
|
if (!binding) {
|
|
650
965
|
this.volumes.delete(nodeId);
|
|
@@ -696,6 +1011,10 @@ export class ProductionEffectSystem {
|
|
|
696
1011
|
// capped at 30 s of simulation per frame like createEmitter's prewarm.
|
|
697
1012
|
const substeps = dt > 0 ? Math.min(Math.ceil(dt * 60 - 1e-6), 1800) : 0;
|
|
698
1013
|
const h = substeps > 0 ? dt / substeps : 0;
|
|
1014
|
+
if (this.attachments.size > 0)
|
|
1015
|
+
this.updateAttachments();
|
|
1016
|
+
if (this.trails.size > 0)
|
|
1017
|
+
this.stepTrails();
|
|
699
1018
|
for (const binding of this.emitters.values()) {
|
|
700
1019
|
for (let s = 0; s < substeps; s++)
|
|
701
1020
|
stepEmitter(binding.state, h);
|
|
@@ -759,6 +1078,12 @@ export class ProductionEffectSystem {
|
|
|
759
1078
|
this.transients.delete(id);
|
|
760
1079
|
continue;
|
|
761
1080
|
}
|
|
1081
|
+
// GU47 E-F: a one-shot whose particles are all gone is retired now instead of idling in the system (and in
|
|
1082
|
+
// the frame's batch list) until the 96-slot instance pool recycles it.
|
|
1083
|
+
if (binding.state.live === 0 && binding.state.desc.emissionRate <= 0) {
|
|
1084
|
+
this.retireEmitter(id);
|
|
1085
|
+
continue;
|
|
1086
|
+
}
|
|
762
1087
|
live += binding.state.live;
|
|
763
1088
|
const age = this.time - record.born;
|
|
764
1089
|
if (!record.warned && age > UNSTOPPED_EMITTER_SECONDS && binding.state.desc.emissionRate > 0 && binding.state.live > 0) {
|
|
@@ -812,6 +1137,9 @@ export class ProductionEffectSystem {
|
|
|
812
1137
|
const groups = new Map();
|
|
813
1138
|
for (const binding of this.emitters.values()) {
|
|
814
1139
|
const live = writeEmitterInstances(binding.state, binding.scratch);
|
|
1140
|
+
// Flipbooks keep the frame the emitter wrote (age · frameRate); other sprite emitters get theirs here.
|
|
1141
|
+
if (binding.lowered.sprite && !binding.lowered.emitter.flipbook)
|
|
1142
|
+
writeSpriteFrames(binding.state, binding.scratch, live, binding.lowered.sprite);
|
|
815
1143
|
this.frameLive.set(binding.lowered.nodeId, live);
|
|
816
1144
|
const key = binding.lowered.emitter.key;
|
|
817
1145
|
let group = groups.get(key);
|
|
@@ -824,12 +1152,20 @@ export class ProductionEffectSystem {
|
|
|
824
1152
|
seenKeys.add(key);
|
|
825
1153
|
const totalLive = group.parts.reduce((s, p) => s + p.live, 0);
|
|
826
1154
|
const flipbook = group.first.lowered.emitter.flipbook;
|
|
1155
|
+
const sprite = group.first.lowered.sprite;
|
|
1156
|
+
// GU47 E-F: atlas sprites sample their sequence once it has loaded; until then (or after a failed load)
|
|
1157
|
+
// the batch draws the analytic soft-dot exactly as before.
|
|
1158
|
+
// A flipbook with a `texture` or built-in `sprite` samples that sheet instead of the procedural fireball.
|
|
1159
|
+
const spriteTexture = sprite ? this.spriteTexture(sprite) : null;
|
|
827
1160
|
const desc = {
|
|
828
1161
|
key,
|
|
829
1162
|
capacity: group.parts.reduce((s, p) => s + p.binding.lowered.emitter.capacity, 0),
|
|
830
1163
|
source: "cpu",
|
|
831
|
-
atlas: flipbook ? flipbookTexture(flipbook) : softDotTexture(),
|
|
832
|
-
...(flipbook ? { atlasGrid: [flipbook.columns ?? 1, flipbook.rows ?? 1], atlasStraightAlpha: true } : {}),
|
|
1164
|
+
atlas: flipbook && !sprite ? flipbookTexture(flipbook) : spriteTexture ?? softDotTexture(),
|
|
1165
|
+
...(flipbook && !sprite ? { atlasGrid: [flipbook.columns ?? 1, flipbook.rows ?? 1], atlasStraightAlpha: true } : {}),
|
|
1166
|
+
...(sprite && spriteTexture
|
|
1167
|
+
? { atlasGrid: [sprite.columns, sprite.rows], ...(sprite.kind === "texture" ? { atlasStraightAlpha: true } : {}) }
|
|
1168
|
+
: {}),
|
|
833
1169
|
blend: group.first.lowered.batch.blend,
|
|
834
1170
|
shading: group.first.lowered.batch.shading,
|
|
835
1171
|
softDepth: group.first.lowered.batch.softDepth,
|
|
@@ -899,6 +1235,18 @@ export class ProductionEffectSystem {
|
|
|
899
1235
|
}
|
|
900
1236
|
}
|
|
901
1237
|
}
|
|
1238
|
+
/** GU47 E-F: texture for a lowered sprite, or null while it loads (or after it failed). */
|
|
1239
|
+
spriteTexture(sprite) {
|
|
1240
|
+
return sprite.kind === "builtin" ? this.sprites.builtin(sprite.name) : this.sprites.texture(sprite.url);
|
|
1241
|
+
}
|
|
1242
|
+
/** GU47 E-F: load state of every sprite texture requested so far (`vfx:<name>` / `tex:<url>`). */
|
|
1243
|
+
spriteStatus() {
|
|
1244
|
+
return this.sprites.status();
|
|
1245
|
+
}
|
|
1246
|
+
/** GU47 E-F: resolves once every sprite texture requested so far has loaded or failed. */
|
|
1247
|
+
spritesSettled() {
|
|
1248
|
+
return this.sprites.settled();
|
|
1249
|
+
}
|
|
902
1250
|
concatScratch(key, floats, parts) {
|
|
903
1251
|
let buf = this.groupScratch.get(key);
|
|
904
1252
|
if (!buf || buf.length < floats) {
|
|
@@ -959,8 +1307,20 @@ export class ProductionEffectSystem {
|
|
|
959
1307
|
return;
|
|
960
1308
|
this.disposed = true;
|
|
961
1309
|
this.offFrame();
|
|
1310
|
+
// GU47 E-F: the particle pass is shared per device; leaving this system's batches in it kept the last frame's
|
|
1311
|
+
// particles drawing (frozen dots) for as long as the device rendered.
|
|
1312
|
+
if (this.lastHook)
|
|
1313
|
+
for (const handle of this.batchHandles.values())
|
|
1314
|
+
this.lastHook.removeBatch(handle);
|
|
1315
|
+
this.batchHandles.clear();
|
|
962
1316
|
this.emitters.clear();
|
|
963
1317
|
this.volumes.clear();
|
|
1318
|
+
this.transients.clear();
|
|
1319
|
+
this.attachments.clear();
|
|
1320
|
+
this.trails.clear();
|
|
1321
|
+
this.ribbons.clear();
|
|
1322
|
+
this.beams.clear();
|
|
1323
|
+
this.meshBatches.clear();
|
|
964
1324
|
}
|
|
965
1325
|
}
|
|
966
1326
|
//# sourceMappingURL=ProductionEffectSystem.js.map
|