@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.
Files changed (269) hide show
  1. package/README.md +25 -0
  2. package/dist/animation/Animation2DComponent.d.ts +18 -0
  3. package/dist/animation/Animation2DExtensionRegistry.d.ts +7 -0
  4. package/dist/animation/Animation2DRenderSystem.d.ts +6 -0
  5. package/dist/animation/Animation2DRuntime.d.ts +6 -2
  6. package/dist/animation/AnimationTextRasterizer.d.ts +4 -0
  7. package/dist/animation/AnimationVisual2D.d.ts +58 -2
  8. package/dist/animation/interaction/InteractionRuntime.d.ts +83 -0
  9. package/dist/animation/interaction/runtime-types.d.ts +257 -0
  10. package/dist/animation.d.ts +3 -1
  11. package/dist/animation.js +551 -59
  12. package/dist/animation3d.js +1 -1
  13. package/dist/canvas-text.js +1 -1
  14. package/dist/chunks/2d-ui-animation-2d.generated-FpziAeGJ.js +4 -0
  15. package/dist/chunks/2d-ui-indexed-sprite.generated-DmKR0CC3.js +4 -0
  16. package/dist/chunks/Animation2DStateMachine-BHcA6Cu3.js +18212 -0
  17. package/dist/chunks/{AnimationStateMachineController-BIcAh-sT.js → AnimationStateMachineController-4sKaqh9E.js} +2 -2
  18. package/dist/chunks/AnimationVisual2D-8y3qp0_U.js +230 -0
  19. package/dist/chunks/{RenderSystem2DBase-DDT61dAu.js → RenderSystem2DBase-CF2s00vg.js} +2 -2
  20. package/dist/controls/VirtualJoystickControls.d.ts +46 -0
  21. package/dist/controls/contracts.d.ts +91 -0
  22. package/dist/controls.d.ts +2 -0
  23. package/dist/controls.js +358 -0
  24. package/dist/deformable-animation/runtime/DeformableMesh2DRuntimeExtension.d.ts +11 -0
  25. package/dist/deformable-animation/runtime/DeformableMesh2DSampler.d.ts +11 -0
  26. package/dist/deformable-animation.d.ts +5 -0
  27. package/dist/deformable-animation.js +316 -0
  28. package/dist/experimental-indexed-sprite.d.ts +5 -0
  29. package/dist/experimental-indexed-sprite.js +482 -0
  30. package/dist/gltf-worker-runtime.js +9 -9
  31. package/dist/hya-state-machine.js +3 -2
  32. package/dist/index.js +1 -1
  33. package/dist/indexed-sprite/AtlasLayout.d.ts +2 -0
  34. package/dist/indexed-sprite/IndexedSpriteRenderer.d.ts +23 -0
  35. package/dist/indexed-sprite/contracts.d.ts +89 -0
  36. package/dist/internal/2d-ui-shader-artifact.js +232 -23
  37. package/dist/ray-tracing/acceleration/bvh.d.ts +37 -0
  38. package/dist/ray-tracing/acceleration/index.d.ts +6 -0
  39. package/dist/ray-tracing/acceleration/pack.d.ts +152 -0
  40. package/dist/ray-tracing/acceleration/query.d.ts +4 -0
  41. package/dist/ray-tracing/acceleration/runtime.d.ts +30 -0
  42. package/dist/ray-tracing/acceleration/tlas.d.ts +4 -0
  43. package/dist/ray-tracing/acceleration/types.d.ts +165 -0
  44. package/dist/ray-tracing/denoise/index.d.ts +3 -0
  45. package/dist/ray-tracing/denoise/layout.d.ts +9 -0
  46. package/dist/ray-tracing/denoise/runtime.d.ts +23 -0
  47. package/dist/ray-tracing/denoise/types.d.ts +28 -0
  48. package/dist/ray-tracing/hybrid/contract.d.ts +2 -0
  49. package/dist/ray-tracing/hybrid/index.d.ts +5 -0
  50. package/dist/ray-tracing/hybrid/layout.d.ts +17 -0
  51. package/dist/ray-tracing/hybrid/plan.d.ts +2 -0
  52. package/dist/ray-tracing/hybrid/runtime.d.ts +31 -0
  53. package/dist/ray-tracing/hybrid/shaders/hybrid-artifact.generated.d.ts +625 -0
  54. package/dist/ray-tracing/hybrid/types.d.ts +144 -0
  55. package/dist/ray-tracing/lifecycle/device-recovery.d.ts +31 -0
  56. package/dist/ray-tracing/lifecycle/index.d.ts +2 -0
  57. package/dist/ray-tracing/lifecycle/types.d.ts +37 -0
  58. package/dist/ray-tracing/material/index.d.ts +2 -0
  59. package/dist/ray-tracing/material/pack.d.ts +5 -0
  60. package/dist/ray-tracing/material/types.d.ts +63 -0
  61. package/dist/ray-tracing/reference/index.d.ts +122 -0
  62. package/dist/ray-tracing/renderer/index.d.ts +7 -0
  63. package/dist/ray-tracing/renderer/layout.d.ts +20 -0
  64. package/dist/ray-tracing/renderer/plan.d.ts +2 -0
  65. package/dist/ray-tracing/renderer/reference.d.ts +17 -0
  66. package/dist/ray-tracing/renderer/runtime.d.ts +39 -0
  67. package/dist/ray-tracing/renderer/scene.d.ts +4 -0
  68. package/dist/ray-tracing/renderer/types.d.ts +115 -0
  69. package/dist/ray-tracing/sampling/index.d.ts +8 -0
  70. package/dist/ray-tracing/sampling/layout.d.ts +12 -0
  71. package/dist/ray-tracing/sampling/plan.d.ts +5 -0
  72. package/dist/ray-tracing/sampling/revision.d.ts +15 -0
  73. package/dist/ray-tracing/sampling/runtime.d.ts +44 -0
  74. package/dist/ray-tracing/sampling/sequence.d.ts +2 -0
  75. package/dist/ray-tracing/sampling/types.d.ts +96 -0
  76. package/dist/ray-tracing/scene/index.d.ts +41 -0
  77. package/dist/ray-tracing/traversal/index.d.ts +4 -0
  78. package/dist/ray-tracing/traversal/layout.d.ts +16 -0
  79. package/dist/ray-tracing/traversal/plan.d.ts +2 -0
  80. package/dist/ray-tracing/traversal/runtime.d.ts +25 -0
  81. package/dist/ray-tracing/traversal/types.d.ts +79 -0
  82. package/dist/ray-tracing/worker/client.d.ts +25 -0
  83. package/dist/ray-tracing/worker/index.d.ts +5 -0
  84. package/dist/ray-tracing/worker/runtime.d.ts +11 -0
  85. package/dist/ray-tracing/worker/serialization.d.ts +16 -0
  86. package/dist/ray-tracing/worker/source.d.ts +1 -0
  87. package/dist/ray-tracing/worker/types.d.ts +91 -0
  88. package/dist/ray-tracing.d.ts +17 -0
  89. package/dist/ray-tracing.js +7666 -0
  90. package/dist/spine.js +1 -1
  91. package/dist/tilemap.js +1 -1
  92. package/package.json +26 -23
  93. package/dist/animation/Animation2DStateMachineVisualRuntime.d.ts +0 -27
  94. package/dist/animation/Particle2DDescriptorAdapter.d.ts +0 -5
  95. package/dist/animation3d/Animation3DResource.d.ts +0 -28
  96. package/dist/animation3d/hya/HyaAnimation3DStateMachineRuntime.d.ts +0 -65
  97. package/dist/animation3d/hya/index.d.ts +0 -4
  98. package/dist/animation3d/runtime/integration/Animation3DStateMachineMixerAdapter.d.ts +0 -81
  99. package/dist/animation3d/runtime/integration/Animation3DStateMachineMixerIntegration.d.ts +0 -39
  100. package/dist/animation3d/runtime/integration/index.d.ts +0 -2
  101. package/dist/animation3d/runtime/mixer/Action.d.ts +0 -150
  102. package/dist/animation3d/runtime/mixer/Animation3DMixerRuntimeStore.d.ts +0 -6
  103. package/dist/animation3d/runtime/mixer/Mixer.d.ts +0 -59
  104. package/dist/animation3d/runtime/mixer/PoseBuffer.d.ts +0 -1
  105. package/dist/animation3d/runtime/mixer/TrackSampler.d.ts +0 -24
  106. package/dist/animation3d/runtime/mixer/index.d.ts +0 -4
  107. package/dist/animation3d/runtime/state-machine/Animation3DBlendTreeWeights.d.ts +0 -1
  108. package/dist/animation3d/runtime/state-machine/Animation3DStateMachineCompiler.d.ts +0 -1
  109. package/dist/animation3d/runtime/state-machine/Animation3DStateMachineController.d.ts +0 -1
  110. package/dist/animation3d/runtime/state-machine/Animation3DStateMachineMixerPort.d.ts +0 -1
  111. package/dist/animation3d/runtime/state-machine/index.d.ts +0 -6
  112. package/dist/benchmark.d.ts +0 -30
  113. package/dist/chunks/2d-ui-animation-2d.generated-D4aHzFU2.js +0 -4
  114. package/dist/chunks/Animation2DStateMachine-9IonguNa.js +0 -3245
  115. package/dist/gltf/GltfAccessorReader.d.ts +0 -7
  116. package/dist/gltf/GltfDracoDecoder.d.ts +0 -4
  117. package/dist/gltf/GltfLoaderErrors.d.ts +0 -4
  118. package/dist/gltf/GltfMaterialDescriptor.d.ts +0 -23
  119. package/dist/gltf/GltfMaterialLoader.d.ts +0 -6
  120. package/dist/gltf-worker-runtime.d.ts +0 -7
  121. package/dist/plugins/pluginUtils.d.ts +0 -20
  122. package/dist/plugins.d.ts +0 -6
  123. package/dist/shaders/generated/2d-ui-artifact.generated.d.ts +0 -658
  124. package/dist/spine/Spine2DGpuRenderer.d.ts +0 -65
  125. package/dist/spine/Spine2DRuntime.d.ts +0 -103
  126. package/dist/spine/SpineAnimationBoneTimelines.d.ts +0 -8
  127. package/dist/spine/SpineFloatBuilder.d.ts +0 -15
  128. package/dist/spine/SpinePathConstraintSolver.d.ts +0 -32
  129. package/dist/spine/SpineSkeletonRuntime.d.ts +0 -185
  130. package/dist/spine/SpineSlotAnimation.d.ts +0 -17
  131. package/dist/spine/SpineTimelineRuntime.d.ts +0 -25
  132. package/dist/spine/SpineVertexBuilder.d.ts +0 -61
  133. package/dist/tilemap/Tilemap2DRenderer.d.ts +0 -24
  134. package/dist/utils/arrayAccess.d.ts +0 -4
  135. package/dist/utils/camera2d.d.ts +0 -12
  136. package/src/animation/Animation2DComponent.ts +0 -135
  137. package/src/animation/Animation2DExtensionRegistry.ts +0 -52
  138. package/src/animation/Animation2DRenderSystem.ts +0 -1026
  139. package/src/animation/Animation2DRuntime.ts +0 -1326
  140. package/src/animation/Animation2DStateMachine.ts +0 -39
  141. package/src/animation/Animation2DStateMachineComponent.ts +0 -228
  142. package/src/animation/Animation2DStateMachineRuntime.ts +0 -141
  143. package/src/animation/Animation2DStateMachineSystem.ts +0 -60
  144. package/src/animation/Animation2DStateMachineVisualRuntime.ts +0 -282
  145. package/src/animation/Animation2DSystem.ts +0 -72
  146. package/src/animation/AnimationAssetLoader.ts +0 -84
  147. package/src/animation/AnimationAudioClip.ts +0 -140
  148. package/src/animation/AnimationPathTessellator.ts +0 -691
  149. package/src/animation/AnimationTextRasterizer.ts +0 -340
  150. package/src/animation/AnimationVisual2D.ts +0 -153
  151. package/src/animation/HyaAnimation2DClipAdapter.ts +0 -845
  152. package/src/animation/Particle2DDescriptorAdapter.ts +0 -35
  153. package/src/animation/runtime/mixer/Action.ts +0 -876
  154. package/src/animation/runtime/mixer/Mixer.ts +0 -505
  155. package/src/animation/runtime/mixer/PoseBuffer.ts +0 -105
  156. package/src/animation/runtime/mixer/Sampler.ts +0 -252
  157. package/src/animation/runtime/mixer/Types.ts +0 -138
  158. package/src/animation/runtime/mixer/index.ts +0 -31
  159. package/src/animation-state-machine/AnimationStateMachine.ts +0 -146
  160. package/src/animation-state-machine/AnimationStateMachineChannels.ts +0 -116
  161. package/src/animation-state-machine/runtime/Animation2DStateMachineMixerAdapter.ts +0 -197
  162. package/src/animation-state-machine/runtime/AnimationStateMachineBlendTreeWeights.ts +0 -503
  163. package/src/animation-state-machine/runtime/AnimationStateMachineCompiler.ts +0 -763
  164. package/src/animation-state-machine/runtime/AnimationStateMachineController.ts +0 -987
  165. package/src/animation-state-machine/runtime/AnimationStateMachineMixerPort.ts +0 -54
  166. package/src/animation-state-machine/runtime/index.ts +0 -47
  167. package/src/animation.ts +0 -33
  168. package/src/animation3d/Animation3DAction.ts +0 -73
  169. package/src/animation3d/Animation3DBinding.ts +0 -116
  170. package/src/animation3d/Animation3DClip.ts +0 -22
  171. package/src/animation3d/Animation3DError.ts +0 -34
  172. package/src/animation3d/Animation3DMixer.ts +0 -82
  173. package/src/animation3d/Animation3DPose.ts +0 -100
  174. package/src/animation3d/Animation3DPoseBuffer.ts +0 -85
  175. package/src/animation3d/Animation3DResource.ts +0 -49
  176. package/src/animation3d/Animation3DStateMachine.ts +0 -126
  177. package/src/animation3d/Animation3DStateMachineRuntime.ts +0 -191
  178. package/src/animation3d/Animation3DTrack.ts +0 -29
  179. package/src/animation3d/hya/HyaAnimation3DRuntime.ts +0 -756
  180. package/src/animation3d/hya/HyaAnimation3DStateMachineRuntime.ts +0 -618
  181. package/src/animation3d/hya/HyaAnimation3DTypes.ts +0 -168
  182. package/src/animation3d/hya/index.ts +0 -10
  183. package/src/animation3d/index.ts +0 -76
  184. package/src/animation3d/runtime/integration/Animation3DStateMachineMixerAdapter.ts +0 -325
  185. package/src/animation3d/runtime/integration/Animation3DStateMachineMixerIntegration.ts +0 -158
  186. package/src/animation3d/runtime/integration/index.ts +0 -9
  187. package/src/animation3d/runtime/mixer/Action.ts +0 -833
  188. package/src/animation3d/runtime/mixer/Animation3DMixerRuntimeStore.ts +0 -26
  189. package/src/animation3d/runtime/mixer/Mixer.ts +0 -562
  190. package/src/animation3d/runtime/mixer/PoseBuffer.ts +0 -1
  191. package/src/animation3d/runtime/mixer/TrackSampler.ts +0 -399
  192. package/src/animation3d/runtime/mixer/index.ts +0 -8
  193. package/src/animation3d/runtime/state-machine/Animation3DBlendTreeWeights.ts +0 -4
  194. package/src/animation3d/runtime/state-machine/Animation3DStateMachineCompiler.ts +0 -1
  195. package/src/animation3d/runtime/state-machine/Animation3DStateMachineController.ts +0 -1
  196. package/src/animation3d/runtime/state-machine/Animation3DStateMachineMixerPort.ts +0 -1
  197. package/src/animation3d/runtime/state-machine/index.ts +0 -45
  198. package/src/animation3d.ts +0 -5
  199. package/src/benchmark.ts +0 -168
  200. package/src/canvas-text/CanvasText2DRenderSystem.ts +0 -292
  201. package/src/canvas-text/CanvasTextComponent.ts +0 -47
  202. package/src/canvas-text.ts +0 -4
  203. package/src/experimental-gltf-worker.ts +0 -18
  204. package/src/experimental-spine-worker.ts +0 -9
  205. package/src/gltf/GltfAccessorReader.ts +0 -271
  206. package/src/gltf/GltfAnimation3DAdapter.ts +0 -680
  207. package/src/gltf/GltfAnimationRuntime.ts +0 -392
  208. package/src/gltf/GltfAssetWorkerClient.ts +0 -136
  209. package/src/gltf/GltfCompatibilityReport.ts +0 -214
  210. package/src/gltf/GltfConservativeBounds.ts +0 -219
  211. package/src/gltf/GltfDracoDecoder.ts +0 -251
  212. package/src/gltf/GltfExtensionAdapter.ts +0 -340
  213. package/src/gltf/GltfLoaderContract.ts +0 -333
  214. package/src/gltf/GltfLoaderErrors.ts +0 -59
  215. package/src/gltf/GltfMaterialDescriptor.ts +0 -134
  216. package/src/gltf/GltfMaterialEncoder.ts +0 -173
  217. package/src/gltf/GltfMaterialLoader.ts +0 -293
  218. package/src/gltf/GltfModelComponent.ts +0 -115
  219. package/src/gltf/GltfModelSystem.ts +0 -208
  220. package/src/gltf/GltfPlugin.ts +0 -84
  221. package/src/gltf/GltfSchema.ts +0 -229
  222. package/src/gltf/GltfUvSemanticPlanner.ts +0 -166
  223. package/src/gltf/gltfLoader.ts +0 -910
  224. package/src/gltf-animation3d.ts +0 -10
  225. package/src/gltf-worker-runtime.ts +0 -10
  226. package/src/gltf.ts +0 -56
  227. package/src/grid/Grid2DComponent.ts +0 -69
  228. package/src/grid.ts +0 -2
  229. package/src/hya-state-machine.ts +0 -19
  230. package/src/index.ts +0 -2
  231. package/src/plugins/pluginUtils.ts +0 -50
  232. package/src/plugins.ts +0 -6
  233. package/src/shaders/generated/2d-ui-animation-2d.generated.wgsl +0 -242
  234. package/src/shaders/generated/2d-ui-artifact.generated.ts +0 -867
  235. package/src/shaders/generated/2d-ui-canvas-text-2d.generated.wgsl +0 -38
  236. package/src/shaders/generated/2d-ui-spine2d.generated.wgsl +0 -41
  237. package/src/shaders/generated/2d-ui-tilemap2d.generated.wgsl +0 -36
  238. package/src/spine/Spine2DComponent.ts +0 -168
  239. package/src/spine/Spine2DGpuRenderer.ts +0 -449
  240. package/src/spine/Spine2DRenderSystem.ts +0 -199
  241. package/src/spine/Spine2DRuntime.ts +0 -1529
  242. package/src/spine/SpineAnimationBoneTimelines.ts +0 -30
  243. package/src/spine/SpineAssetParser.ts +0 -20
  244. package/src/spine/SpineAssetWorkerClient.ts +0 -112
  245. package/src/spine/SpineAssetWorkerContract.ts +0 -4
  246. package/src/spine/SpineAtlasParser.ts +0 -127
  247. package/src/spine/SpineFloatBuilder.ts +0 -66
  248. package/src/spine/SpinePathConstraintSolver.ts +0 -582
  249. package/src/spine/SpinePlugin.ts +0 -76
  250. package/src/spine/SpineSkeletonRuntime.ts +0 -521
  251. package/src/spine/SpineSlotAnimation.ts +0 -195
  252. package/src/spine/SpineTimelineRuntime.ts +0 -453
  253. package/src/spine/SpineVertexBuilder.ts +0 -686
  254. package/src/spine.ts +0 -7
  255. package/src/tilemap/Tilemap2DComponent.ts +0 -232
  256. package/src/tilemap/Tilemap2DRenderSystem.ts +0 -58
  257. package/src/tilemap/Tilemap2DRenderer.ts +0 -289
  258. package/src/tilemap/TilemapPlugin.ts +0 -75
  259. package/src/tilemap.ts +0 -6
  260. package/src/tween/Tween2DComponent.ts +0 -83
  261. package/src/tween/Tween2DSystem.ts +0 -78
  262. package/src/tween.ts +0 -4
  263. package/src/types/earcut.d.ts +0 -7
  264. package/src/types/wgsl.d.ts +0 -4
  265. package/src/utils/RenderSystem2DBase.ts +0 -164
  266. package/src/utils/arrayAccess.ts +0 -17
  267. package/src/utils/camera2d.ts +0 -68
  268. package/src/utils/render2dGpu.ts +0 -132
  269. package/test/fixtures/gltf/animation-characterization.gltf +0 -344
@@ -0,0 +1,165 @@
1
+ import type { RayMatrix4, RayPrimitiveIdentity, RayVec3 } from '../reference/index.js';
2
+ import type { RaySceneMaterialFacts, RaySceneSnapshot } from '../scene/index.js';
3
+ export type RayAccelerationPhase = 'blas-build' | 'tlas-build' | 'refit' | 'pack' | 'lifecycle';
4
+ export type RayAccelerationSeverity = 'info' | 'warning' | 'error';
5
+ export interface RayAccelerationDiagnostic {
6
+ readonly phase: RayAccelerationPhase;
7
+ readonly severity: RayAccelerationSeverity;
8
+ readonly code: string;
9
+ readonly message: string;
10
+ readonly context: Readonly<Record<string, string | number | boolean | null>>;
11
+ }
12
+ export interface RayBounds3 {
13
+ readonly min: RayVec3;
14
+ readonly max: RayVec3;
15
+ }
16
+ export interface RayBvhNode {
17
+ readonly bounds: RayBounds3;
18
+ readonly leftChild: number;
19
+ readonly rightChild: number;
20
+ readonly firstIndex: number;
21
+ readonly indexCount: number;
22
+ readonly depth: number;
23
+ }
24
+ export interface RayAccelerationPrimitive {
25
+ readonly kind: 'triangle' | 'sphere';
26
+ readonly primitiveIndex: number;
27
+ readonly bounds: RayBounds3;
28
+ /** triangle = v0.xyz,v1.xyz,v2.xyz; sphere = center.xyz,radius */
29
+ readonly data: readonly number[];
30
+ }
31
+ export interface RayBlasStatistics {
32
+ readonly nodeCount: number;
33
+ readonly leafCount: number;
34
+ readonly primitiveCount: number;
35
+ readonly maxDepth: number;
36
+ readonly estimatedBytes: number;
37
+ }
38
+ export interface RayBlas {
39
+ readonly schemaVersion: 1;
40
+ readonly key: string;
41
+ readonly geometryId: string;
42
+ readonly geometryRevision: number;
43
+ readonly sourceKind: 'triangle-mesh' | 'analytic-sphere';
44
+ readonly sourceFingerprint: string;
45
+ readonly fingerprint: string;
46
+ readonly rootNode: number;
47
+ readonly bounds: RayBounds3 | null;
48
+ readonly nodes: readonly RayBvhNode[];
49
+ readonly primitives: readonly RayAccelerationPrimitive[];
50
+ /** Leaf ranges address this deterministic primitive-order array. */
51
+ readonly primitiveIndices: readonly number[];
52
+ readonly statistics: RayBlasStatistics;
53
+ readonly diagnostics: readonly RayAccelerationDiagnostic[];
54
+ }
55
+ export interface RayBlasBuildResult {
56
+ readonly blas: RayBlas | null;
57
+ readonly diagnostics: readonly RayAccelerationDiagnostic[];
58
+ }
59
+ export interface RayTlasInstance {
60
+ readonly instanceId: string;
61
+ readonly entityId: string;
62
+ readonly geometryId: string;
63
+ readonly geometryRevision: number;
64
+ readonly blasKey: string;
65
+ readonly transform: RayMatrix4;
66
+ readonly inverseTransform: RayMatrix4;
67
+ readonly bounds: RayBounds3;
68
+ readonly material: RaySceneMaterialFacts | null;
69
+ readonly analyticIdentity: RayPrimitiveIdentity | null;
70
+ }
71
+ export interface RayTlasStatistics {
72
+ readonly nodeCount: number;
73
+ readonly leafCount: number;
74
+ readonly instanceCount: number;
75
+ readonly maxDepth: number;
76
+ readonly estimatedBytes: number;
77
+ }
78
+ export interface RayTlas {
79
+ readonly schemaVersion: 1;
80
+ readonly sourceFingerprint: string;
81
+ readonly membershipFingerprint: string;
82
+ readonly transformFingerprint: string;
83
+ readonly materialFingerprint: string;
84
+ readonly fingerprint: string;
85
+ readonly rootNode: number;
86
+ readonly bounds: RayBounds3 | null;
87
+ readonly nodes: readonly RayBvhNode[];
88
+ readonly instances: readonly RayTlasInstance[];
89
+ /** Leaf ranges address this deterministic instance-order array. */
90
+ readonly instanceIndices: readonly number[];
91
+ readonly statistics: RayTlasStatistics;
92
+ readonly diagnostics: readonly RayAccelerationDiagnostic[];
93
+ }
94
+ export type RayAccelerationUpdateKind = 'initial-build' | 'unchanged' | 'material-update' | 'transform-refit' | 'membership-rebuild' | 'topology-rebuild';
95
+ export type RayPackedBufferName = 'blasNodes' | 'blasTable' | 'tlasNodes' | 'primitives' | 'instances' | 'materials';
96
+ export interface RayDirtyUploadRange {
97
+ readonly buffer: RayPackedBufferName;
98
+ /** replace also carries targetByteLength=0 so removals release stale GPU storage. */
99
+ readonly mode: 'write' | 'replace';
100
+ readonly byteOffset: number;
101
+ readonly byteLength: number;
102
+ readonly targetByteLength: number;
103
+ }
104
+ export interface RayPackedBuffer {
105
+ readonly name: RayPackedBufferName;
106
+ readonly stride: number;
107
+ readonly count: number;
108
+ readonly data: ArrayBuffer;
109
+ }
110
+ export interface RayPackedAccelerationMemory {
111
+ readonly blasNodesBytes: number;
112
+ readonly blasTableBytes: number;
113
+ readonly tlasNodesBytes: number;
114
+ readonly primitivesBytes: number;
115
+ readonly instancesBytes: number;
116
+ readonly materialsBytes: number;
117
+ readonly totalBytes: number;
118
+ }
119
+ export interface RayPackedAcceleration {
120
+ readonly schemaVersion: 1;
121
+ readonly abiFingerprint: string;
122
+ readonly sourceFingerprint: string;
123
+ readonly fingerprint: string;
124
+ readonly tlasRootNode: number;
125
+ readonly buffers: Readonly<Record<RayPackedBufferName, RayPackedBuffer>>;
126
+ readonly geometryIdentities: readonly string[];
127
+ readonly instanceIdentities: readonly string[];
128
+ readonly materialIdentities: readonly string[];
129
+ readonly memory: RayPackedAccelerationMemory;
130
+ readonly diagnostics: readonly RayAccelerationDiagnostic[];
131
+ }
132
+ export interface RayPackResult {
133
+ readonly packed: RayPackedAcceleration | null;
134
+ readonly diagnostics: readonly RayAccelerationDiagnostic[];
135
+ }
136
+ export interface RayAccelerationSnapshot {
137
+ readonly source: RaySceneSnapshot;
138
+ readonly blases: ReadonlyMap<string, RayBlas>;
139
+ readonly tlas: RayTlas;
140
+ readonly packed: RayPackedAcceleration;
141
+ readonly fingerprint: string;
142
+ }
143
+ export interface RayAccelerationUpdate {
144
+ readonly kind: RayAccelerationUpdateKind;
145
+ readonly snapshot: RayAccelerationSnapshot | null;
146
+ readonly dirtyRanges: readonly RayDirtyUploadRange[];
147
+ readonly diagnostics: readonly RayAccelerationDiagnostic[];
148
+ }
149
+ export interface RayAccelerationRuntimeStatistics {
150
+ readonly buildCount: number;
151
+ readonly refitCount: number;
152
+ readonly materialUpdateCount: number;
153
+ readonly cacheHitCount: number;
154
+ readonly currentBytes: number;
155
+ readonly peakBytes: number;
156
+ readonly liveBlasCount: number;
157
+ readonly destroyed: boolean;
158
+ }
159
+ export interface RayAccelerationCandidateQuery {
160
+ readonly candidates: readonly RayPrimitiveIdentity[];
161
+ readonly diagnostics: readonly RayAccelerationDiagnostic[];
162
+ readonly tlasNodeTests: number;
163
+ readonly blasNodeTests: number;
164
+ readonly aborted: boolean;
165
+ }
@@ -0,0 +1,3 @@
1
+ export { RAY_DENOISE_LAYOUT } from './layout.js';
2
+ export { RaySpatialTemporalDenoiser } from './runtime.js';
3
+ export type { RayDenoiseCreateResult, RayDenoiseOptions } from './types.js';
@@ -0,0 +1,9 @@
1
+ export declare const RAY_DENOISE_LAYOUT: Readonly<{
2
+ artifactHash: "b2e55dafdf2be903e797241d14a98e76bee2c64e95dd889069a27044afe4d1aa";
3
+ temporalPassId: "ray-denoise-temporal";
4
+ spatialPassId: "ray-denoise-spatial";
5
+ parameterBytes: 64;
6
+ workgroupSizeX: 8;
7
+ workgroupSizeY: 8;
8
+ }>;
9
+ export declare function createRayDenoiseLayouts(device: GPUDevice): readonly [GPUBindGroupLayout, GPUBindGroupLayout];
@@ -0,0 +1,23 @@
1
+ import type { RayDenoiseCreateResult, RayDenoiseOptions, RayDenoiseRecordOptions, RayDenoiseRecordResult } from './types.js';
2
+ export declare class RaySpatialTemporalDenoiser {
3
+ readonly artifactHash: "b2e55dafdf2be903e797241d14a98e76bee2c64e95dd889069a27044afe4d1aa";
4
+ readonly revision: string;
5
+ private readonly _device;
6
+ private readonly _options;
7
+ private _layouts;
8
+ private _temporalPipeline;
9
+ private _spatialPipeline;
10
+ private _history;
11
+ private _scratch;
12
+ private _width;
13
+ private _height;
14
+ private _destroyed;
15
+ private constructor();
16
+ static create(device: GPUDevice, options?: RayDenoiseOptions): Promise<RayDenoiseCreateResult>;
17
+ get destroyed(): boolean;
18
+ get liveResourceCount(): number;
19
+ get scratchBytes(): number;
20
+ record(options: RayDenoiseRecordOptions): RayDenoiseRecordResult;
21
+ destroy(): void;
22
+ private resize;
23
+ }
@@ -0,0 +1,28 @@
1
+ import type { RayProgressiveDiagnostic } from '../sampling/types.js';
2
+ export interface RayDenoiseOptions {
3
+ readonly temporalFeedback?: number;
4
+ readonly phiColor?: number;
5
+ readonly phiFeature?: number;
6
+ readonly varianceBoost?: number;
7
+ }
8
+ export interface RayDenoiseCreateResult {
9
+ readonly denoiser: import('./runtime.js').RaySpatialTemporalDenoiser | null;
10
+ readonly diagnostics: readonly RayProgressiveDiagnostic[];
11
+ }
12
+ export interface RayDenoiseRecordOptions {
13
+ readonly encoder: GPUCommandEncoder;
14
+ readonly accumulation: GPUTexture;
15
+ readonly moments: GPUTexture;
16
+ readonly feature: GPUTexture;
17
+ readonly width: number;
18
+ readonly height: number;
19
+ readonly sampleIndex: number;
20
+ readonly reset: boolean;
21
+ readonly querySet: GPUQuerySet | null;
22
+ readonly temporalTimestampStart: number;
23
+ readonly spatialTimestampStart: number;
24
+ }
25
+ export interface RayDenoiseRecordResult {
26
+ readonly output: GPUTexture;
27
+ readonly transientBuffers: readonly GPUBuffer[];
28
+ }
@@ -0,0 +1,2 @@
1
+ import type { RayHybridFrameContract, RayHybridFrameInputs, RayHybridOptions } from './types.js';
2
+ export declare function createRayHybridFrameContract(inputs: RayHybridFrameInputs, options?: RayHybridOptions): RayHybridFrameContract;
@@ -0,0 +1,5 @@
1
+ export * from './types.js';
2
+ export * from './contract.js';
3
+ export * from './plan.js';
4
+ export * from './layout.js';
5
+ export * from './runtime.js';
@@ -0,0 +1,17 @@
1
+ import { RAY_HYBRID_SHADER_ARTIFACT } from './shaders/hybrid-artifact.generated.js';
2
+ export declare const RAY_HYBRID_LAYOUT: Readonly<{
3
+ artifactHash: "4a09990032ae1bfa55cc1f1de81b11e08e2611cb0bf05643f37aa8d179798077";
4
+ workgroupSize: 8;
5
+ parameterBytes: 256;
6
+ compositeParameterBytes: 32;
7
+ diagnosticBytes: 48;
8
+ passIds: Readonly<{
9
+ shadow: "ray-hybrid-shadow";
10
+ reflection: "ray-hybrid-reflection";
11
+ ao: "ray-hybrid-ao";
12
+ composite: "ray-hybrid-composite";
13
+ }>;
14
+ }>;
15
+ type PassId = keyof typeof RAY_HYBRID_SHADER_ARTIFACT.passes;
16
+ export declare function createRayHybridLayouts(device: GPUDevice): Readonly<Record<PassId, GPUBindGroupLayout>>;
17
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { RayHybridFrameContract, RayHybridPass } from './types.js';
2
+ export declare function createRayHybridRenderPlan(contract: RayHybridFrameContract): readonly RayHybridPass[];
@@ -0,0 +1,31 @@
1
+ import type { RayHybridCreateResult, RayHybridFrameInputs, RayHybridOptions, RayHybridRenderResult } from './types.js';
2
+ export declare class RayHybridRenderer {
3
+ readonly artifactHash: "4a09990032ae1bfa55cc1f1de81b11e08e2611cb0bf05643f37aa8d179798077";
4
+ private readonly device;
5
+ private readonly layouts;
6
+ private readonly pipelines;
7
+ private accelerationFingerprint;
8
+ private buffers;
9
+ private views;
10
+ private neutral;
11
+ private destroyedValue;
12
+ private generation;
13
+ private lost;
14
+ private busy;
15
+ private uncaptured;
16
+ private readonly errorHandler;
17
+ private constructor();
18
+ static create(device: GPUDevice): Promise<RayHybridCreateResult>;
19
+ get destroyed(): boolean;
20
+ get liveResourceCount(): number;
21
+ get ownedBytes(): number;
22
+ render(inputs: RayHybridFrameInputs, options?: RayHybridOptions): Promise<RayHybridRenderResult>;
23
+ destroy(): void;
24
+ private ensureAcceleration;
25
+ private ensureNeutral;
26
+ private ensureView;
27
+ private ensureEffect;
28
+ private releaseEffect;
29
+ private releaseView;
30
+ private releaseStatic;
31
+ }