@haiyue/extensions 0.1.0 → 0.2.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/README.md +25 -0
- package/dist/animation/Animation2DComponent.d.ts +18 -0
- package/dist/animation/Animation2DExtensionRegistry.d.ts +7 -0
- package/dist/animation/Animation2DRenderSystem.d.ts +6 -0
- package/dist/animation/Animation2DRuntime.d.ts +6 -2
- package/dist/animation/AnimationTextRasterizer.d.ts +4 -0
- package/dist/animation/AnimationVisual2D.d.ts +58 -2
- package/dist/animation/interaction/InteractionRuntime.d.ts +83 -0
- package/dist/animation/interaction/runtime-types.d.ts +257 -0
- package/dist/animation.d.ts +3 -1
- package/dist/animation.js +551 -59
- package/dist/animation3d.js +1 -1
- package/dist/canvas-text.js +1 -1
- package/dist/chunks/2d-ui-animation-2d.generated-FpziAeGJ.js +4 -0
- package/dist/chunks/2d-ui-indexed-sprite.generated-DmKR0CC3.js +4 -0
- package/dist/chunks/Animation2DStateMachine-BHcA6Cu3.js +18212 -0
- package/dist/chunks/{AnimationStateMachineController-BIcAh-sT.js → AnimationStateMachineController-4sKaqh9E.js} +2 -2
- package/dist/chunks/AnimationVisual2D-8y3qp0_U.js +230 -0
- package/dist/chunks/{RenderSystem2DBase-DDT61dAu.js → RenderSystem2DBase-CF2s00vg.js} +2 -2
- package/dist/controls/VirtualJoystickControls.d.ts +46 -0
- package/dist/controls/contracts.d.ts +91 -0
- package/dist/controls.d.ts +2 -0
- package/dist/controls.js +358 -0
- package/dist/deformable-animation/runtime/DeformableMesh2DRuntimeExtension.d.ts +11 -0
- package/dist/deformable-animation/runtime/DeformableMesh2DSampler.d.ts +11 -0
- package/dist/deformable-animation.d.ts +5 -0
- package/dist/deformable-animation.js +316 -0
- package/dist/experimental-indexed-sprite.d.ts +5 -0
- package/dist/experimental-indexed-sprite.js +482 -0
- package/dist/gltf-worker-runtime.js +9 -9
- package/dist/hya-state-machine.js +3 -2
- package/dist/index.js +1 -1
- package/dist/indexed-sprite/AtlasLayout.d.ts +2 -0
- package/dist/indexed-sprite/IndexedSpriteRenderer.d.ts +23 -0
- package/dist/indexed-sprite/contracts.d.ts +89 -0
- package/dist/internal/2d-ui-shader-artifact.js +232 -23
- package/dist/ray-tracing/acceleration/bvh.d.ts +37 -0
- package/dist/ray-tracing/acceleration/index.d.ts +6 -0
- package/dist/ray-tracing/acceleration/pack.d.ts +152 -0
- package/dist/ray-tracing/acceleration/query.d.ts +4 -0
- package/dist/ray-tracing/acceleration/runtime.d.ts +30 -0
- package/dist/ray-tracing/acceleration/tlas.d.ts +4 -0
- package/dist/ray-tracing/acceleration/types.d.ts +165 -0
- package/dist/ray-tracing/denoise/index.d.ts +3 -0
- package/dist/ray-tracing/denoise/layout.d.ts +9 -0
- package/dist/ray-tracing/denoise/runtime.d.ts +23 -0
- package/dist/ray-tracing/denoise/types.d.ts +28 -0
- package/dist/ray-tracing/hybrid/contract.d.ts +2 -0
- package/dist/ray-tracing/hybrid/index.d.ts +5 -0
- package/dist/ray-tracing/hybrid/layout.d.ts +17 -0
- package/dist/ray-tracing/hybrid/plan.d.ts +2 -0
- package/dist/ray-tracing/hybrid/runtime.d.ts +31 -0
- package/dist/ray-tracing/hybrid/shaders/hybrid-artifact.generated.d.ts +625 -0
- package/dist/ray-tracing/hybrid/types.d.ts +144 -0
- package/dist/ray-tracing/lifecycle/device-recovery.d.ts +31 -0
- package/dist/ray-tracing/lifecycle/index.d.ts +2 -0
- package/dist/ray-tracing/lifecycle/types.d.ts +37 -0
- package/dist/ray-tracing/material/index.d.ts +2 -0
- package/dist/ray-tracing/material/pack.d.ts +5 -0
- package/dist/ray-tracing/material/types.d.ts +63 -0
- package/dist/ray-tracing/reference/index.d.ts +122 -0
- package/dist/ray-tracing/renderer/index.d.ts +7 -0
- package/dist/ray-tracing/renderer/layout.d.ts +20 -0
- package/dist/ray-tracing/renderer/plan.d.ts +2 -0
- package/dist/ray-tracing/renderer/reference.d.ts +17 -0
- package/dist/ray-tracing/renderer/runtime.d.ts +39 -0
- package/dist/ray-tracing/renderer/scene.d.ts +4 -0
- package/dist/ray-tracing/renderer/types.d.ts +115 -0
- package/dist/ray-tracing/sampling/index.d.ts +8 -0
- package/dist/ray-tracing/sampling/layout.d.ts +12 -0
- package/dist/ray-tracing/sampling/plan.d.ts +5 -0
- package/dist/ray-tracing/sampling/revision.d.ts +15 -0
- package/dist/ray-tracing/sampling/runtime.d.ts +44 -0
- package/dist/ray-tracing/sampling/sequence.d.ts +2 -0
- package/dist/ray-tracing/sampling/types.d.ts +96 -0
- package/dist/ray-tracing/scene/index.d.ts +41 -0
- package/dist/ray-tracing/traversal/index.d.ts +4 -0
- package/dist/ray-tracing/traversal/layout.d.ts +16 -0
- package/dist/ray-tracing/traversal/plan.d.ts +2 -0
- package/dist/ray-tracing/traversal/runtime.d.ts +25 -0
- package/dist/ray-tracing/traversal/types.d.ts +79 -0
- package/dist/ray-tracing/worker/client.d.ts +25 -0
- package/dist/ray-tracing/worker/index.d.ts +5 -0
- package/dist/ray-tracing/worker/runtime.d.ts +11 -0
- package/dist/ray-tracing/worker/serialization.d.ts +16 -0
- package/dist/ray-tracing/worker/source.d.ts +1 -0
- package/dist/ray-tracing/worker/types.d.ts +91 -0
- package/dist/ray-tracing.d.ts +17 -0
- package/dist/ray-tracing.js +7666 -0
- package/dist/spine.js +1 -1
- package/dist/tilemap.js +1 -1
- package/package.json +26 -23
- package/dist/animation/Animation2DStateMachineVisualRuntime.d.ts +0 -27
- package/dist/animation/Particle2DDescriptorAdapter.d.ts +0 -5
- package/dist/animation3d/Animation3DResource.d.ts +0 -28
- package/dist/animation3d/hya/HyaAnimation3DStateMachineRuntime.d.ts +0 -65
- package/dist/animation3d/hya/index.d.ts +0 -4
- package/dist/animation3d/runtime/integration/Animation3DStateMachineMixerAdapter.d.ts +0 -81
- package/dist/animation3d/runtime/integration/Animation3DStateMachineMixerIntegration.d.ts +0 -39
- package/dist/animation3d/runtime/integration/index.d.ts +0 -2
- package/dist/animation3d/runtime/mixer/Action.d.ts +0 -150
- package/dist/animation3d/runtime/mixer/Animation3DMixerRuntimeStore.d.ts +0 -6
- package/dist/animation3d/runtime/mixer/Mixer.d.ts +0 -59
- package/dist/animation3d/runtime/mixer/PoseBuffer.d.ts +0 -1
- package/dist/animation3d/runtime/mixer/TrackSampler.d.ts +0 -24
- package/dist/animation3d/runtime/mixer/index.d.ts +0 -4
- package/dist/animation3d/runtime/state-machine/Animation3DBlendTreeWeights.d.ts +0 -1
- package/dist/animation3d/runtime/state-machine/Animation3DStateMachineCompiler.d.ts +0 -1
- package/dist/animation3d/runtime/state-machine/Animation3DStateMachineController.d.ts +0 -1
- package/dist/animation3d/runtime/state-machine/Animation3DStateMachineMixerPort.d.ts +0 -1
- package/dist/animation3d/runtime/state-machine/index.d.ts +0 -6
- package/dist/benchmark.d.ts +0 -30
- package/dist/chunks/2d-ui-animation-2d.generated-D4aHzFU2.js +0 -4
- package/dist/chunks/Animation2DStateMachine-9IonguNa.js +0 -3245
- package/dist/gltf/GltfAccessorReader.d.ts +0 -7
- package/dist/gltf/GltfDracoDecoder.d.ts +0 -4
- package/dist/gltf/GltfLoaderErrors.d.ts +0 -4
- package/dist/gltf/GltfMaterialDescriptor.d.ts +0 -23
- package/dist/gltf/GltfMaterialLoader.d.ts +0 -6
- package/dist/gltf-worker-runtime.d.ts +0 -7
- package/dist/plugins/pluginUtils.d.ts +0 -20
- package/dist/plugins.d.ts +0 -6
- package/dist/shaders/generated/2d-ui-artifact.generated.d.ts +0 -658
- package/dist/spine/Spine2DGpuRenderer.d.ts +0 -65
- package/dist/spine/Spine2DRuntime.d.ts +0 -103
- package/dist/spine/SpineAnimationBoneTimelines.d.ts +0 -8
- package/dist/spine/SpineFloatBuilder.d.ts +0 -15
- package/dist/spine/SpinePathConstraintSolver.d.ts +0 -32
- package/dist/spine/SpineSkeletonRuntime.d.ts +0 -185
- package/dist/spine/SpineSlotAnimation.d.ts +0 -17
- package/dist/spine/SpineTimelineRuntime.d.ts +0 -25
- package/dist/spine/SpineVertexBuilder.d.ts +0 -61
- package/dist/tilemap/Tilemap2DRenderer.d.ts +0 -24
- package/dist/utils/arrayAccess.d.ts +0 -4
- package/dist/utils/camera2d.d.ts +0 -12
- package/src/animation/Animation2DComponent.ts +0 -135
- package/src/animation/Animation2DExtensionRegistry.ts +0 -52
- package/src/animation/Animation2DRenderSystem.ts +0 -1026
- package/src/animation/Animation2DRuntime.ts +0 -1326
- package/src/animation/Animation2DStateMachine.ts +0 -39
- package/src/animation/Animation2DStateMachineComponent.ts +0 -228
- package/src/animation/Animation2DStateMachineRuntime.ts +0 -141
- package/src/animation/Animation2DStateMachineSystem.ts +0 -60
- package/src/animation/Animation2DStateMachineVisualRuntime.ts +0 -282
- package/src/animation/Animation2DSystem.ts +0 -72
- package/src/animation/AnimationAssetLoader.ts +0 -84
- package/src/animation/AnimationAudioClip.ts +0 -140
- package/src/animation/AnimationPathTessellator.ts +0 -691
- package/src/animation/AnimationTextRasterizer.ts +0 -340
- package/src/animation/AnimationVisual2D.ts +0 -153
- package/src/animation/HyaAnimation2DClipAdapter.ts +0 -845
- package/src/animation/Particle2DDescriptorAdapter.ts +0 -35
- package/src/animation/runtime/mixer/Action.ts +0 -876
- package/src/animation/runtime/mixer/Mixer.ts +0 -505
- package/src/animation/runtime/mixer/PoseBuffer.ts +0 -105
- package/src/animation/runtime/mixer/Sampler.ts +0 -252
- package/src/animation/runtime/mixer/Types.ts +0 -138
- package/src/animation/runtime/mixer/index.ts +0 -31
- package/src/animation-state-machine/AnimationStateMachine.ts +0 -146
- package/src/animation-state-machine/AnimationStateMachineChannels.ts +0 -116
- package/src/animation-state-machine/runtime/Animation2DStateMachineMixerAdapter.ts +0 -197
- package/src/animation-state-machine/runtime/AnimationStateMachineBlendTreeWeights.ts +0 -503
- package/src/animation-state-machine/runtime/AnimationStateMachineCompiler.ts +0 -763
- package/src/animation-state-machine/runtime/AnimationStateMachineController.ts +0 -987
- package/src/animation-state-machine/runtime/AnimationStateMachineMixerPort.ts +0 -54
- package/src/animation-state-machine/runtime/index.ts +0 -47
- package/src/animation.ts +0 -33
- package/src/animation3d/Animation3DAction.ts +0 -73
- package/src/animation3d/Animation3DBinding.ts +0 -116
- package/src/animation3d/Animation3DClip.ts +0 -22
- package/src/animation3d/Animation3DError.ts +0 -34
- package/src/animation3d/Animation3DMixer.ts +0 -82
- package/src/animation3d/Animation3DPose.ts +0 -100
- package/src/animation3d/Animation3DPoseBuffer.ts +0 -85
- package/src/animation3d/Animation3DResource.ts +0 -49
- package/src/animation3d/Animation3DStateMachine.ts +0 -126
- package/src/animation3d/Animation3DStateMachineRuntime.ts +0 -191
- package/src/animation3d/Animation3DTrack.ts +0 -29
- package/src/animation3d/hya/HyaAnimation3DRuntime.ts +0 -756
- package/src/animation3d/hya/HyaAnimation3DStateMachineRuntime.ts +0 -618
- package/src/animation3d/hya/HyaAnimation3DTypes.ts +0 -168
- package/src/animation3d/hya/index.ts +0 -10
- package/src/animation3d/index.ts +0 -76
- package/src/animation3d/runtime/integration/Animation3DStateMachineMixerAdapter.ts +0 -325
- package/src/animation3d/runtime/integration/Animation3DStateMachineMixerIntegration.ts +0 -158
- package/src/animation3d/runtime/integration/index.ts +0 -9
- package/src/animation3d/runtime/mixer/Action.ts +0 -833
- package/src/animation3d/runtime/mixer/Animation3DMixerRuntimeStore.ts +0 -26
- package/src/animation3d/runtime/mixer/Mixer.ts +0 -562
- package/src/animation3d/runtime/mixer/PoseBuffer.ts +0 -1
- package/src/animation3d/runtime/mixer/TrackSampler.ts +0 -399
- package/src/animation3d/runtime/mixer/index.ts +0 -8
- package/src/animation3d/runtime/state-machine/Animation3DBlendTreeWeights.ts +0 -4
- package/src/animation3d/runtime/state-machine/Animation3DStateMachineCompiler.ts +0 -1
- package/src/animation3d/runtime/state-machine/Animation3DStateMachineController.ts +0 -1
- package/src/animation3d/runtime/state-machine/Animation3DStateMachineMixerPort.ts +0 -1
- package/src/animation3d/runtime/state-machine/index.ts +0 -45
- package/src/animation3d.ts +0 -5
- package/src/benchmark.ts +0 -168
- package/src/canvas-text/CanvasText2DRenderSystem.ts +0 -292
- package/src/canvas-text/CanvasTextComponent.ts +0 -47
- package/src/canvas-text.ts +0 -4
- package/src/experimental-gltf-worker.ts +0 -18
- package/src/experimental-spine-worker.ts +0 -9
- package/src/gltf/GltfAccessorReader.ts +0 -271
- package/src/gltf/GltfAnimation3DAdapter.ts +0 -680
- package/src/gltf/GltfAnimationRuntime.ts +0 -392
- package/src/gltf/GltfAssetWorkerClient.ts +0 -136
- package/src/gltf/GltfCompatibilityReport.ts +0 -214
- package/src/gltf/GltfConservativeBounds.ts +0 -219
- package/src/gltf/GltfDracoDecoder.ts +0 -251
- package/src/gltf/GltfExtensionAdapter.ts +0 -340
- package/src/gltf/GltfLoaderContract.ts +0 -333
- package/src/gltf/GltfLoaderErrors.ts +0 -59
- package/src/gltf/GltfMaterialDescriptor.ts +0 -134
- package/src/gltf/GltfMaterialEncoder.ts +0 -173
- package/src/gltf/GltfMaterialLoader.ts +0 -293
- package/src/gltf/GltfModelComponent.ts +0 -115
- package/src/gltf/GltfModelSystem.ts +0 -208
- package/src/gltf/GltfPlugin.ts +0 -84
- package/src/gltf/GltfSchema.ts +0 -229
- package/src/gltf/GltfUvSemanticPlanner.ts +0 -166
- package/src/gltf/gltfLoader.ts +0 -910
- package/src/gltf-animation3d.ts +0 -10
- package/src/gltf-worker-runtime.ts +0 -10
- package/src/gltf.ts +0 -56
- package/src/grid/Grid2DComponent.ts +0 -69
- package/src/grid.ts +0 -2
- package/src/hya-state-machine.ts +0 -19
- package/src/index.ts +0 -2
- package/src/plugins/pluginUtils.ts +0 -50
- package/src/plugins.ts +0 -6
- package/src/shaders/generated/2d-ui-animation-2d.generated.wgsl +0 -242
- package/src/shaders/generated/2d-ui-artifact.generated.ts +0 -867
- package/src/shaders/generated/2d-ui-canvas-text-2d.generated.wgsl +0 -38
- package/src/shaders/generated/2d-ui-spine2d.generated.wgsl +0 -41
- package/src/shaders/generated/2d-ui-tilemap2d.generated.wgsl +0 -36
- package/src/spine/Spine2DComponent.ts +0 -168
- package/src/spine/Spine2DGpuRenderer.ts +0 -449
- package/src/spine/Spine2DRenderSystem.ts +0 -199
- package/src/spine/Spine2DRuntime.ts +0 -1529
- package/src/spine/SpineAnimationBoneTimelines.ts +0 -30
- package/src/spine/SpineAssetParser.ts +0 -20
- package/src/spine/SpineAssetWorkerClient.ts +0 -112
- package/src/spine/SpineAssetWorkerContract.ts +0 -4
- package/src/spine/SpineAtlasParser.ts +0 -127
- package/src/spine/SpineFloatBuilder.ts +0 -66
- package/src/spine/SpinePathConstraintSolver.ts +0 -582
- package/src/spine/SpinePlugin.ts +0 -76
- package/src/spine/SpineSkeletonRuntime.ts +0 -521
- package/src/spine/SpineSlotAnimation.ts +0 -195
- package/src/spine/SpineTimelineRuntime.ts +0 -453
- package/src/spine/SpineVertexBuilder.ts +0 -686
- package/src/spine.ts +0 -7
- package/src/tilemap/Tilemap2DComponent.ts +0 -232
- package/src/tilemap/Tilemap2DRenderSystem.ts +0 -58
- package/src/tilemap/Tilemap2DRenderer.ts +0 -289
- package/src/tilemap/TilemapPlugin.ts +0 -75
- package/src/tilemap.ts +0 -6
- package/src/tween/Tween2DComponent.ts +0 -83
- package/src/tween/Tween2DSystem.ts +0 -78
- package/src/tween.ts +0 -4
- package/src/types/earcut.d.ts +0 -7
- package/src/types/wgsl.d.ts +0 -4
- package/src/utils/RenderSystem2DBase.ts +0 -164
- package/src/utils/arrayAccess.ts +0 -17
- package/src/utils/camera2d.ts +0 -68
- package/src/utils/render2dGpu.ts +0 -132
- package/test/fixtures/gltf/animation-characterization.gltf +0 -344
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { A as Animation2dWgsl } from '../chunks/2d-ui-animation-2d.generated-
|
|
1
|
+
import { A as Animation2dWgsl } from '../chunks/2d-ui-animation-2d.generated-FpziAeGJ.js';
|
|
2
2
|
import { C as CanvasText2dWgsl } from '../chunks/2d-ui-canvas-text-2d.generated-C0Eaej2m.js';
|
|
3
|
+
import { I as IndexedSpriteWgsl } from '../chunks/2d-ui-indexed-sprite.generated-DmKR0CC3.js';
|
|
3
4
|
import { s as spine2dWgsl } from '../chunks/2d-ui-spine2d.generated-CUUi8xjl.js';
|
|
4
5
|
import { t as tilemap2dWgsl } from '../chunks/2d-ui-tilemap2d.generated-gebw4mX7.js';
|
|
5
6
|
|
|
@@ -11,10 +12,10 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
11
12
|
"source": {
|
|
12
13
|
"kind": "module-family",
|
|
13
14
|
"path": "shader-language/builtin-components-2d-ui-family.json",
|
|
14
|
-
"sha256": "
|
|
15
|
+
"sha256": "20df3f065b0d6ad0e8a78c10f8fd3bd1d3e572c33735b7b797d8d2277ca501f4"
|
|
15
16
|
},
|
|
16
|
-
"canonicalHash": "
|
|
17
|
-
"typedModuleHash": "
|
|
17
|
+
"canonicalHash": "635ff69d88d078463d3cd36ae8f2074a711d610b85a51091a584ba250e029ab6",
|
|
18
|
+
"typedModuleHash": "977a9330584c5a96854e3c21a2b0315e5fe8e641cdec43e6e240b3e046a1f888",
|
|
18
19
|
"passes": {
|
|
19
20
|
"animation-2d": {
|
|
20
21
|
"id": "animation-2d",
|
|
@@ -34,7 +35,8 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
34
35
|
"id": "frame.camera",
|
|
35
36
|
"binding": 0,
|
|
36
37
|
"visibility": [
|
|
37
|
-
"vertex"
|
|
38
|
+
"vertex",
|
|
39
|
+
"fragment"
|
|
38
40
|
],
|
|
39
41
|
"layout": {
|
|
40
42
|
"kind": "buffer",
|
|
@@ -62,7 +64,7 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
62
64
|
"kind": "buffer",
|
|
63
65
|
"bufferType": "uniform",
|
|
64
66
|
"hasDynamicOffset": false,
|
|
65
|
-
"minBindingSize":
|
|
67
|
+
"minBindingSize": 1296
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
]
|
|
@@ -241,7 +243,7 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
241
243
|
{
|
|
242
244
|
"id": "object.animation2d",
|
|
243
245
|
"alignment": 16,
|
|
244
|
-
"byteSize":
|
|
246
|
+
"byteSize": 1296,
|
|
245
247
|
"fields": [
|
|
246
248
|
{
|
|
247
249
|
"name": "model",
|
|
@@ -257,81 +259,93 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
257
259
|
"size": 16
|
|
258
260
|
},
|
|
259
261
|
{
|
|
260
|
-
"name": "
|
|
262
|
+
"name": "multiplyColor",
|
|
261
263
|
"type": "vec4<f32>",
|
|
262
264
|
"offset": 80,
|
|
263
265
|
"size": 16
|
|
264
266
|
},
|
|
265
267
|
{
|
|
266
|
-
"name": "
|
|
268
|
+
"name": "screenColor",
|
|
267
269
|
"type": "vec4<f32>",
|
|
268
270
|
"offset": 96,
|
|
269
271
|
"size": 16
|
|
270
272
|
},
|
|
273
|
+
{
|
|
274
|
+
"name": "params",
|
|
275
|
+
"type": "vec4<f32>",
|
|
276
|
+
"offset": 112,
|
|
277
|
+
"size": 16
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "uvRect",
|
|
281
|
+
"type": "vec4<f32>",
|
|
282
|
+
"offset": 128,
|
|
283
|
+
"size": 16
|
|
284
|
+
},
|
|
271
285
|
{
|
|
272
286
|
"name": "compositeParams",
|
|
273
287
|
"type": "array<vec4<f32>, 8>",
|
|
274
|
-
"offset":
|
|
288
|
+
"offset": 144,
|
|
275
289
|
"size": 128
|
|
276
290
|
},
|
|
277
291
|
{
|
|
278
292
|
"name": "compositeExpansion0",
|
|
279
293
|
"type": "vec4<f32>",
|
|
280
|
-
"offset":
|
|
294
|
+
"offset": 272,
|
|
281
295
|
"size": 16
|
|
282
296
|
},
|
|
283
297
|
{
|
|
284
298
|
"name": "compositeExpansion1",
|
|
285
299
|
"type": "vec4<f32>",
|
|
286
|
-
"offset":
|
|
300
|
+
"offset": 288,
|
|
287
301
|
"size": 16
|
|
288
302
|
},
|
|
289
303
|
{
|
|
290
304
|
"name": "gradientParams",
|
|
291
305
|
"type": "vec4<f32>",
|
|
292
|
-
"offset":
|
|
306
|
+
"offset": 304,
|
|
293
307
|
"size": 16
|
|
294
308
|
},
|
|
295
309
|
{
|
|
296
310
|
"name": "gradientGeometry",
|
|
297
311
|
"type": "vec4<f32>",
|
|
298
|
-
"offset":
|
|
312
|
+
"offset": 320,
|
|
299
313
|
"size": 16
|
|
300
314
|
},
|
|
301
315
|
{
|
|
302
316
|
"name": "gradientColors",
|
|
303
317
|
"type": "array<vec4<f32>, 8>",
|
|
304
|
-
"offset":
|
|
318
|
+
"offset": 336,
|
|
305
319
|
"size": 128
|
|
306
320
|
},
|
|
307
321
|
{
|
|
308
322
|
"name": "gradientOffsets0",
|
|
309
323
|
"type": "vec4<f32>",
|
|
310
|
-
"offset":
|
|
324
|
+
"offset": 464,
|
|
311
325
|
"size": 16
|
|
312
326
|
},
|
|
313
327
|
{
|
|
314
328
|
"name": "gradientOffsets1",
|
|
315
329
|
"type": "vec4<f32>",
|
|
316
|
-
"offset":
|
|
330
|
+
"offset": 480,
|
|
317
331
|
"size": 16
|
|
318
332
|
},
|
|
319
333
|
{
|
|
320
334
|
"name": "effectKinds0",
|
|
321
335
|
"type": "vec4<f32>",
|
|
322
|
-
"offset":
|
|
336
|
+
"offset": 496,
|
|
323
337
|
"size": 16
|
|
324
338
|
},
|
|
325
339
|
{
|
|
326
340
|
"name": "effectKinds1",
|
|
327
341
|
"type": "vec4<f32>",
|
|
328
|
-
"offset":
|
|
342
|
+
"offset": 512,
|
|
329
343
|
"size": 16
|
|
330
344
|
},
|
|
331
345
|
{
|
|
332
346
|
"name": "effectData",
|
|
333
347
|
"type": "array<EffectData, 8>",
|
|
334
|
-
"offset":
|
|
348
|
+
"offset": 528,
|
|
335
349
|
"size": 768
|
|
336
350
|
}
|
|
337
351
|
]
|
|
@@ -390,10 +404,10 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
390
404
|
"sourceId": "builtin.animation-2d",
|
|
391
405
|
"sourceName": "shader-language/builtin-components-2d-ui-family.json",
|
|
392
406
|
"generatedStartLine": 1,
|
|
393
|
-
"generatedEndLine":
|
|
407
|
+
"generatedEndLine": 322
|
|
394
408
|
}
|
|
395
409
|
],
|
|
396
|
-
"canonicalHash": "
|
|
410
|
+
"canonicalHash": "352f83931c94e068cd3062ff27498a6d342d27947758c7bb6a578ae43e828fc3"
|
|
397
411
|
},
|
|
398
412
|
"canvas-text-2d": {
|
|
399
413
|
"id": "canvas-text-2d",
|
|
@@ -558,6 +572,201 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
558
572
|
],
|
|
559
573
|
"canonicalHash": "23dac7ae1d4e1bd8b695cb8261402b4b634d1315bf6a42e1ca04367f5e1cc598"
|
|
560
574
|
},
|
|
575
|
+
"indexed-sprite": {
|
|
576
|
+
"id": "indexed-sprite",
|
|
577
|
+
"code": IndexedSpriteWgsl,
|
|
578
|
+
"entryPoints": {
|
|
579
|
+
"vertex": "vs_main",
|
|
580
|
+
"fragment": "fs_main"
|
|
581
|
+
},
|
|
582
|
+
"bindGroups": [
|
|
583
|
+
{
|
|
584
|
+
"logicalSpace": "frame",
|
|
585
|
+
"logicalGroup": 0,
|
|
586
|
+
"physicalGroup": 0,
|
|
587
|
+
"owner": "renderer",
|
|
588
|
+
"bindings": [
|
|
589
|
+
{
|
|
590
|
+
"id": "frame.viewport",
|
|
591
|
+
"binding": 0,
|
|
592
|
+
"visibility": [
|
|
593
|
+
"vertex"
|
|
594
|
+
],
|
|
595
|
+
"layout": {
|
|
596
|
+
"kind": "buffer",
|
|
597
|
+
"bufferType": "uniform",
|
|
598
|
+
"hasDynamicOffset": false,
|
|
599
|
+
"minBindingSize": 16
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"id": "frame.instances",
|
|
604
|
+
"binding": 1,
|
|
605
|
+
"visibility": [
|
|
606
|
+
"vertex"
|
|
607
|
+
],
|
|
608
|
+
"layout": {
|
|
609
|
+
"kind": "buffer",
|
|
610
|
+
"bufferType": "read-only-storage",
|
|
611
|
+
"hasDynamicOffset": false,
|
|
612
|
+
"minBindingSize": 0
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
]
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"logicalSpace": "material",
|
|
619
|
+
"logicalGroup": 2,
|
|
620
|
+
"physicalGroup": 1,
|
|
621
|
+
"owner": "renderer",
|
|
622
|
+
"bindings": [
|
|
623
|
+
{
|
|
624
|
+
"id": "material.indexAtlas",
|
|
625
|
+
"binding": 0,
|
|
626
|
+
"visibility": [
|
|
627
|
+
"fragment"
|
|
628
|
+
],
|
|
629
|
+
"layout": {
|
|
630
|
+
"kind": "texture",
|
|
631
|
+
"sampleType": "uint",
|
|
632
|
+
"viewDimension": "2d",
|
|
633
|
+
"multisampled": false
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"id": "material.colorAtlas",
|
|
638
|
+
"binding": 1,
|
|
639
|
+
"visibility": [
|
|
640
|
+
"fragment"
|
|
641
|
+
],
|
|
642
|
+
"layout": {
|
|
643
|
+
"kind": "texture",
|
|
644
|
+
"sampleType": "float",
|
|
645
|
+
"viewDimension": "2d",
|
|
646
|
+
"multisampled": false
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"id": "material.paletteBank",
|
|
651
|
+
"binding": 2,
|
|
652
|
+
"visibility": [
|
|
653
|
+
"fragment"
|
|
654
|
+
],
|
|
655
|
+
"layout": {
|
|
656
|
+
"kind": "texture",
|
|
657
|
+
"sampleType": "float",
|
|
658
|
+
"viewDimension": "2d",
|
|
659
|
+
"multisampled": false
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"id": "material.colorSampler",
|
|
664
|
+
"binding": 3,
|
|
665
|
+
"visibility": [
|
|
666
|
+
"fragment"
|
|
667
|
+
],
|
|
668
|
+
"layout": {
|
|
669
|
+
"kind": "sampler",
|
|
670
|
+
"samplerType": "filtering"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
]
|
|
674
|
+
}
|
|
675
|
+
],
|
|
676
|
+
"uniformBlocks": [
|
|
677
|
+
{
|
|
678
|
+
"id": "frame.viewport",
|
|
679
|
+
"alignment": 16,
|
|
680
|
+
"byteSize": 16,
|
|
681
|
+
"fields": [
|
|
682
|
+
{
|
|
683
|
+
"name": "size",
|
|
684
|
+
"type": "vec2<f32>",
|
|
685
|
+
"offset": 0,
|
|
686
|
+
"size": 8
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"name": "_pad",
|
|
690
|
+
"type": "vec2<f32>",
|
|
691
|
+
"offset": 8,
|
|
692
|
+
"size": 8
|
|
693
|
+
}
|
|
694
|
+
]
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"vertexBuffers": [],
|
|
698
|
+
"varyings": [
|
|
699
|
+
{
|
|
700
|
+
"semantic": "TEXCOORD_0",
|
|
701
|
+
"location": 0,
|
|
702
|
+
"type": "vec2<f32>",
|
|
703
|
+
"interpolation": "perspective"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"semantic": "UV_RECT",
|
|
707
|
+
"location": 1,
|
|
708
|
+
"type": "vec4<f32>",
|
|
709
|
+
"interpolation": "flat"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"semantic": "SPRITE_META",
|
|
713
|
+
"location": 2,
|
|
714
|
+
"type": "vec4<u32>",
|
|
715
|
+
"interpolation": "flat"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"semantic": "COLOR_0",
|
|
719
|
+
"location": 3,
|
|
720
|
+
"type": "vec4<f32>",
|
|
721
|
+
"interpolation": "flat"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"semantic": "COLOR_MATRIX_0",
|
|
725
|
+
"location": 4,
|
|
726
|
+
"type": "vec4<f32>",
|
|
727
|
+
"interpolation": "flat"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"semantic": "COLOR_MATRIX_1",
|
|
731
|
+
"location": 5,
|
|
732
|
+
"type": "vec4<f32>",
|
|
733
|
+
"interpolation": "flat"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"semantic": "COLOR_MATRIX_2",
|
|
737
|
+
"location": 6,
|
|
738
|
+
"type": "vec4<f32>",
|
|
739
|
+
"interpolation": "flat"
|
|
740
|
+
}
|
|
741
|
+
],
|
|
742
|
+
"renderTargets": [
|
|
743
|
+
{
|
|
744
|
+
"location": 0,
|
|
745
|
+
"formatClass": "color"
|
|
746
|
+
}
|
|
747
|
+
],
|
|
748
|
+
"capabilities": [
|
|
749
|
+
"storage-buffer",
|
|
750
|
+
"texture-load",
|
|
751
|
+
"texture-sample",
|
|
752
|
+
"instancing"
|
|
753
|
+
],
|
|
754
|
+
"passRequirements": [
|
|
755
|
+
"indexed-palette-bank",
|
|
756
|
+
"truecolor-atlas",
|
|
757
|
+
"alpha-blend",
|
|
758
|
+
"rgb-affine-color-matrix"
|
|
759
|
+
],
|
|
760
|
+
"sourceMap": [
|
|
761
|
+
{
|
|
762
|
+
"sourceId": "builtin.indexed-sprite",
|
|
763
|
+
"sourceName": "shader-language/builtin-components-2d-ui-family.json",
|
|
764
|
+
"generatedStartLine": 1,
|
|
765
|
+
"generatedEndLine": 129
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
"canonicalHash": "922becd3e6153801d9de6a87d94d4d8bdde460dfaa73c1327c651942768f35d1"
|
|
769
|
+
},
|
|
561
770
|
"spine2d": {
|
|
562
771
|
"id": "spine2d",
|
|
563
772
|
"code": spine2dWgsl,
|
|
@@ -863,7 +1072,7 @@ const BUILTIN_RENDER_SHADER_ARTIFACT = {
|
|
|
863
1072
|
"canonicalHash": "4d1ef60104af17bdb6c837bbdb67640c96abf7533f156510de4da5240c8c388e"
|
|
864
1073
|
}
|
|
865
1074
|
},
|
|
866
|
-
"artifactHash": "
|
|
1075
|
+
"artifactHash": "13fbee749aa5946580c6c90392b4e2cedc88b288a808a151c8e9bbe297ee9833"
|
|
867
1076
|
};
|
|
868
1077
|
|
|
869
1078
|
export { BUILTIN_RENDER_SHADER_ARTIFACT };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RaySceneAnalyticSphere, RaySceneTriangleGeometry, RayVec3 } from '../reference/index.js';
|
|
2
|
+
import type { RayAccelerationDiagnostic, RayAccelerationPhase, RayBlasBuildResult, RayBounds3, RayBvhNode } from './types.js';
|
|
3
|
+
export declare const RAY_ACCELERATION_POLICY: Readonly<{
|
|
4
|
+
schemaVersion: 1;
|
|
5
|
+
hierarchy: "deterministic-balanced-binary";
|
|
6
|
+
split: "largest-centroid-extent-median, primitive/instance identity tie-break";
|
|
7
|
+
blasLeafCapacity: 4;
|
|
8
|
+
tlasLeafCapacity: 2;
|
|
9
|
+
boundsEncoding: "float32 outward rounded at serialization; float64 CPU build";
|
|
10
|
+
boundsQuantization: "none-v1";
|
|
11
|
+
traversalStackLimit: 64;
|
|
12
|
+
overflowBehavior: "abort ray and emit RAY_ACCEL_STACK_OVERFLOW";
|
|
13
|
+
rationale: readonly string[];
|
|
14
|
+
}>;
|
|
15
|
+
interface BuildItem {
|
|
16
|
+
readonly sourceIndex: number;
|
|
17
|
+
readonly stableId: string;
|
|
18
|
+
readonly bounds: RayBounds3;
|
|
19
|
+
readonly centroid: RayVec3;
|
|
20
|
+
}
|
|
21
|
+
export interface BuiltHierarchy {
|
|
22
|
+
readonly rootNode: number;
|
|
23
|
+
readonly bounds: RayBounds3 | null;
|
|
24
|
+
readonly nodes: readonly RayBvhNode[];
|
|
25
|
+
readonly order: readonly number[];
|
|
26
|
+
readonly maxDepth: number;
|
|
27
|
+
readonly leafCount: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function buildBlas(geometry: RaySceneTriangleGeometry): RayBlasBuildResult;
|
|
30
|
+
export declare function buildAnalyticSphereBlas(sphere: RaySceneAnalyticSphere): RayBlasBuildResult;
|
|
31
|
+
export declare function buildHierarchy(items: readonly BuildItem[], leafCapacity: number): BuiltHierarchy;
|
|
32
|
+
export declare function blasKey(geometryId: string, revision: number): string;
|
|
33
|
+
export declare function analyticBlasKey(geometryId: string, revision: number, primitiveIndex: number): string;
|
|
34
|
+
export declare function fingerprintTriangleGeometry(geometry: RaySceneTriangleGeometry): string;
|
|
35
|
+
export declare function diagnoseDepth(maxDepth: number, phase: RayAccelerationPhase, diagnostics: RayAccelerationDiagnostic[], context: Record<string, string | number | boolean | null>): void;
|
|
36
|
+
export declare function diagnostic(phase: RayAccelerationPhase, severity: RayAccelerationDiagnostic['severity'], code: string, message: string, context: Record<string, string | number | boolean | null>): RayAccelerationDiagnostic;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { RAY_ACCELERATION_POLICY, analyticBlasKey, blasKey, buildAnalyticSphereBlas, buildBlas } from './bvh.js';
|
|
2
|
+
export { RAY_ACCELERATION_ABI_FINGERPRINT, RAY_ACCELERATION_ABI_V1, packAcceleration, validatePackedAcceleration } from './pack.js';
|
|
3
|
+
export { queryRayAccelerationCandidates, validateAccelerationStructure } from './query.js';
|
|
4
|
+
export { RayAccelerationBuilder, RayBlasCache } from './runtime.js';
|
|
5
|
+
export { buildTlas, refitTlas } from './tlas.js';
|
|
6
|
+
export type { RayAccelerationCandidateQuery, RayAccelerationDiagnostic, RayAccelerationPrimitive, RayAccelerationRuntimeStatistics, RayAccelerationSnapshot, RayAccelerationUpdate, RayAccelerationUpdateKind, RayBlas, RayBlasBuildResult, RayBlasStatistics, RayBounds3, RayBvhNode, RayDirtyUploadRange, RayPackedAcceleration, RayPackedAccelerationMemory, RayPackedBuffer, RayPackedBufferName, RayPackResult, RayTlas, RayTlasInstance, RayTlasStatistics, } from './types.js';
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { RayAccelerationDiagnostic, RayBlas, RayPackedAcceleration, RayPackResult, RayTlas } from './types.js';
|
|
2
|
+
export declare const RAY_ACCELERATION_ABI_V1: {
|
|
3
|
+
name: string;
|
|
4
|
+
version: number;
|
|
5
|
+
endianness: string;
|
|
6
|
+
indexWidthBits: number;
|
|
7
|
+
missingIndex: number;
|
|
8
|
+
maxAddressableIndex: number;
|
|
9
|
+
traversalStackLimit: 64;
|
|
10
|
+
stackOverflow: string;
|
|
11
|
+
buffers: {
|
|
12
|
+
blasNodes: {
|
|
13
|
+
stride: number;
|
|
14
|
+
alignment: number;
|
|
15
|
+
words: number;
|
|
16
|
+
};
|
|
17
|
+
blasTable: {
|
|
18
|
+
stride: number;
|
|
19
|
+
alignment: number;
|
|
20
|
+
words: number;
|
|
21
|
+
};
|
|
22
|
+
tlasNodes: {
|
|
23
|
+
stride: number;
|
|
24
|
+
alignment: number;
|
|
25
|
+
words: number;
|
|
26
|
+
};
|
|
27
|
+
primitives: {
|
|
28
|
+
stride: number;
|
|
29
|
+
alignment: number;
|
|
30
|
+
words: number;
|
|
31
|
+
};
|
|
32
|
+
instances: {
|
|
33
|
+
stride: number;
|
|
34
|
+
alignment: number;
|
|
35
|
+
words: number;
|
|
36
|
+
};
|
|
37
|
+
materials: {
|
|
38
|
+
stride: number;
|
|
39
|
+
alignment: number;
|
|
40
|
+
words: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
node: {
|
|
44
|
+
min: {
|
|
45
|
+
offset: number;
|
|
46
|
+
format: string;
|
|
47
|
+
};
|
|
48
|
+
leftFirst: {
|
|
49
|
+
offset: number;
|
|
50
|
+
format: string;
|
|
51
|
+
};
|
|
52
|
+
max: {
|
|
53
|
+
offset: number;
|
|
54
|
+
format: string;
|
|
55
|
+
};
|
|
56
|
+
meta: {
|
|
57
|
+
offset: number;
|
|
58
|
+
format: string;
|
|
59
|
+
leafBit: number;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
blasTable: {
|
|
63
|
+
rootNode: {
|
|
64
|
+
offset: number;
|
|
65
|
+
format: string;
|
|
66
|
+
};
|
|
67
|
+
nodeCount: {
|
|
68
|
+
offset: number;
|
|
69
|
+
format: string;
|
|
70
|
+
};
|
|
71
|
+
primitiveOffset: {
|
|
72
|
+
offset: number;
|
|
73
|
+
format: string;
|
|
74
|
+
};
|
|
75
|
+
primitiveCount: {
|
|
76
|
+
offset: number;
|
|
77
|
+
format: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
primitive: {
|
|
81
|
+
data: {
|
|
82
|
+
offset: number;
|
|
83
|
+
format: string;
|
|
84
|
+
};
|
|
85
|
+
kind: {
|
|
86
|
+
offset: number;
|
|
87
|
+
format: string;
|
|
88
|
+
triangle: number;
|
|
89
|
+
sphere: number;
|
|
90
|
+
};
|
|
91
|
+
sourcePrimitiveIndex: {
|
|
92
|
+
offset: number;
|
|
93
|
+
format: string;
|
|
94
|
+
};
|
|
95
|
+
geometryIdentityIndex: {
|
|
96
|
+
offset: number;
|
|
97
|
+
format: string;
|
|
98
|
+
};
|
|
99
|
+
reserved: {
|
|
100
|
+
offset: number;
|
|
101
|
+
format: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
instance: {
|
|
105
|
+
transform: {
|
|
106
|
+
offset: number;
|
|
107
|
+
format: string;
|
|
108
|
+
};
|
|
109
|
+
inverseTransform: {
|
|
110
|
+
offset: number;
|
|
111
|
+
format: string;
|
|
112
|
+
};
|
|
113
|
+
blasTableIndex: {
|
|
114
|
+
offset: number;
|
|
115
|
+
format: string;
|
|
116
|
+
};
|
|
117
|
+
materialIndex: {
|
|
118
|
+
offset: number;
|
|
119
|
+
format: string;
|
|
120
|
+
};
|
|
121
|
+
identityIndex: {
|
|
122
|
+
offset: number;
|
|
123
|
+
format: string;
|
|
124
|
+
};
|
|
125
|
+
flags: {
|
|
126
|
+
offset: number;
|
|
127
|
+
format: string;
|
|
128
|
+
analytic: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
material: {
|
|
132
|
+
identityHashLow: {
|
|
133
|
+
offset: number;
|
|
134
|
+
format: string;
|
|
135
|
+
};
|
|
136
|
+
identityHashHigh: {
|
|
137
|
+
offset: number;
|
|
138
|
+
format: string;
|
|
139
|
+
};
|
|
140
|
+
revision: {
|
|
141
|
+
offset: number;
|
|
142
|
+
format: string;
|
|
143
|
+
};
|
|
144
|
+
typeHash: {
|
|
145
|
+
offset: number;
|
|
146
|
+
format: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
export declare const RAY_ACCELERATION_ABI_FINGERPRINT: string;
|
|
151
|
+
export declare function packAcceleration(blases: ReadonlyMap<string, RayBlas>, tlas: RayTlas, maxTotalBytes?: number): RayPackResult;
|
|
152
|
+
export declare function validatePackedAcceleration(packed: RayPackedAcceleration): readonly RayAccelerationDiagnostic[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RayInput } from '../reference/index.js';
|
|
2
|
+
import type { RayAccelerationCandidateQuery, RayAccelerationDiagnostic, RayAccelerationSnapshot } from './types.js';
|
|
3
|
+
export declare function queryRayAccelerationCandidates(acceleration: RayAccelerationSnapshot, input: RayInput): RayAccelerationCandidateQuery;
|
|
4
|
+
export declare function validateAccelerationStructure(acceleration: RayAccelerationSnapshot): readonly RayAccelerationDiagnostic[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { RaySceneAnalyticSphere, RaySceneTriangleGeometry } from '../reference/index.js';
|
|
2
|
+
import type { RaySceneSnapshot } from '../scene/index.js';
|
|
3
|
+
import type { RayAccelerationRuntimeStatistics, RayAccelerationSnapshot, RayAccelerationUpdate, RayBlasBuildResult } from './types.js';
|
|
4
|
+
export declare class RayBlasCache {
|
|
5
|
+
private readonly _entries;
|
|
6
|
+
private _cacheHitCount;
|
|
7
|
+
private _destroyed;
|
|
8
|
+
get cacheHitCount(): number;
|
|
9
|
+
get size(): number;
|
|
10
|
+
get destroyed(): boolean;
|
|
11
|
+
get estimatedBytes(): number;
|
|
12
|
+
getOrBuildGeometry(geometry: RaySceneTriangleGeometry): RayBlasBuildResult;
|
|
13
|
+
getOrBuildAnalytic(sphere: RaySceneAnalyticSphere): RayBlasBuildResult;
|
|
14
|
+
retain(keys: ReadonlySet<string>): void;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class RayAccelerationBuilder {
|
|
18
|
+
private _cache;
|
|
19
|
+
private _current;
|
|
20
|
+
private _destroyed;
|
|
21
|
+
private _buildCount;
|
|
22
|
+
private _refitCount;
|
|
23
|
+
private _materialUpdateCount;
|
|
24
|
+
private _peakBytes;
|
|
25
|
+
get current(): RayAccelerationSnapshot | null;
|
|
26
|
+
get statistics(): RayAccelerationRuntimeStatistics;
|
|
27
|
+
update(source: RaySceneSnapshot): RayAccelerationUpdate;
|
|
28
|
+
rebuild(source: RaySceneSnapshot): RayAccelerationUpdate;
|
|
29
|
+
destroy(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RaySceneSnapshot } from '../scene/index.js';
|
|
2
|
+
import type { RayBlas, RayTlas } from './types.js';
|
|
3
|
+
export declare function buildTlas(snapshot: RaySceneSnapshot, blases: ReadonlyMap<string, RayBlas>): RayTlas;
|
|
4
|
+
export declare function refitTlas(previous: RayTlas, snapshot: RaySceneSnapshot, blases: ReadonlyMap<string, RayBlas>): RayTlas | null;
|