@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RayAccelerationSnapshot } from '../acceleration/index.js';
|
|
2
|
+
import type { RayPackedMaterialScene } from '../material/index.js';
|
|
3
|
+
import type { RayPathSceneFacts } from '../renderer/index.js';
|
|
4
|
+
import type { RayProgressiveAccumulationKey, RayProgressiveFrameRevision, RayProgressiveResetReason } from './types.js';
|
|
5
|
+
export declare function createRayProgressiveFrameRevision(acceleration: RayAccelerationSnapshot, materials: RayPackedMaterialScene, facts: RayPathSceneFacts): RayProgressiveFrameRevision;
|
|
6
|
+
export declare function createRayProgressiveAccumulationKey(revision: RayProgressiveFrameRevision, viewport: Readonly<{
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}>, quality: Readonly<{
|
|
10
|
+
revision: string;
|
|
11
|
+
maxBounces: number;
|
|
12
|
+
}>, sampling: Readonly<{
|
|
13
|
+
baseSeed: number;
|
|
14
|
+
}>, denoiseRevision: string): RayProgressiveAccumulationKey;
|
|
15
|
+
export declare function classifyRayProgressiveReset(previous: RayProgressiveAccumulationKey | null, next: RayProgressiveAccumulationKey, pending?: ReadonlySet<RayProgressiveResetReason>): readonly RayProgressiveResetReason[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RaySpatialTemporalDenoiser } from '../denoise/index.js';
|
|
2
|
+
import type { RayPathTracingRenderer } from '../renderer/index.js';
|
|
3
|
+
import type { RayProgressiveCreateResult, RayProgressiveFrame, RayProgressiveOptions, RayProgressiveRenderResult, RayProgressiveResetReason } from './types.js';
|
|
4
|
+
export declare class RayProgressiveRenderer {
|
|
5
|
+
readonly artifactHash: "68dbd34a27343815b6b1af275d7909c28b21bd0558b9a0aea6bc8cd54c5bc060";
|
|
6
|
+
private readonly _device;
|
|
7
|
+
private _baseRenderer;
|
|
8
|
+
private _denoiser;
|
|
9
|
+
private _layouts;
|
|
10
|
+
private _accumulatePipeline;
|
|
11
|
+
private _presentPipeline;
|
|
12
|
+
private _accumulation;
|
|
13
|
+
private _moments;
|
|
14
|
+
private _feature;
|
|
15
|
+
private _age;
|
|
16
|
+
private _output;
|
|
17
|
+
private _width;
|
|
18
|
+
private _height;
|
|
19
|
+
private _sampleCount;
|
|
20
|
+
private _resetCount;
|
|
21
|
+
private _key;
|
|
22
|
+
private _lastReset;
|
|
23
|
+
private readonly _pendingReasons;
|
|
24
|
+
private _generation;
|
|
25
|
+
private _rendering;
|
|
26
|
+
private _destroyed;
|
|
27
|
+
private _lostMessage;
|
|
28
|
+
private readonly _uncapturedErrors;
|
|
29
|
+
private readonly _uncapturedHandler;
|
|
30
|
+
private constructor();
|
|
31
|
+
static create(device: GPUDevice, baseRenderer: RayPathTracingRenderer, denoiser?: RaySpatialTemporalDenoiser | null): Promise<RayProgressiveCreateResult>;
|
|
32
|
+
get destroyed(): boolean;
|
|
33
|
+
get sampleCount(): number;
|
|
34
|
+
get outputTexture(): GPUTexture | null;
|
|
35
|
+
get liveResourceCount(): number;
|
|
36
|
+
reset(reason?: RayProgressiveResetReason): void;
|
|
37
|
+
replaceBaseRenderer(renderer: RayPathTracingRenderer): void;
|
|
38
|
+
setDenoiser(denoiser: RaySpatialTemporalDenoiser | null): void;
|
|
39
|
+
render(frame: RayProgressiveFrame, options: RayProgressiveOptions): Promise<RayProgressiveRenderResult>;
|
|
40
|
+
destroy(): void;
|
|
41
|
+
private resize;
|
|
42
|
+
private destroyTextures;
|
|
43
|
+
private memory;
|
|
44
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { RayPathDiagnostic, RayPathDiagnosticPhase, RayPathSceneFacts, RayToneMapping } from '../renderer/index.js';
|
|
2
|
+
export declare const RAY_PROGRESSIVE_SEQUENCE_ID: "haiyue-halton23-cranley-pcg32-v1";
|
|
3
|
+
export declare const RAY_ACCUMULATION_FORMAT: "rgba16float";
|
|
4
|
+
export interface RayProgressiveDiagnostic extends Omit<RayPathDiagnostic, 'phase'> {
|
|
5
|
+
readonly phase: RayPathDiagnosticPhase | 'sampling' | 'accumulation' | 'denoise' | 'present';
|
|
6
|
+
}
|
|
7
|
+
export type RayProgressiveView = 'raw' | 'denoised' | 'variance' | 'history-age' | 'feature';
|
|
8
|
+
export type RayProgressiveResetReason = 'initial' | 'explicit' | 'scene-owner' | 'geometry' | 'membership' | 'transform' | 'material' | 'camera' | 'light' | 'viewport' | 'quality' | 'sampling' | 'denoise' | 'renderer' | 'device';
|
|
9
|
+
export interface RayProgressiveSequenceSample {
|
|
10
|
+
readonly sequenceId: typeof RAY_PROGRESSIVE_SEQUENCE_ID;
|
|
11
|
+
readonly sampleIndex: number;
|
|
12
|
+
readonly baseSeed: number;
|
|
13
|
+
readonly pathSeed: number;
|
|
14
|
+
readonly jitter: readonly [number, number];
|
|
15
|
+
}
|
|
16
|
+
/** Read-only revisions derived from the canonical acceleration, material and scene facts. */
|
|
17
|
+
export interface RayProgressiveFrameRevision {
|
|
18
|
+
readonly sceneOwner: string;
|
|
19
|
+
readonly acceleration: string;
|
|
20
|
+
readonly geometry: string;
|
|
21
|
+
readonly membership: string;
|
|
22
|
+
readonly transform: string;
|
|
23
|
+
readonly material: string;
|
|
24
|
+
readonly camera: string;
|
|
25
|
+
readonly light: string;
|
|
26
|
+
}
|
|
27
|
+
export interface RayProgressiveFrame {
|
|
28
|
+
readonly facts: RayPathSceneFacts;
|
|
29
|
+
readonly revision: RayProgressiveFrameRevision;
|
|
30
|
+
}
|
|
31
|
+
export interface RayProgressiveAccumulationKey extends RayProgressiveFrameRevision {
|
|
32
|
+
readonly viewport: string;
|
|
33
|
+
readonly quality: string;
|
|
34
|
+
readonly sampling: string;
|
|
35
|
+
readonly denoise: string;
|
|
36
|
+
}
|
|
37
|
+
export interface RayProgressiveOptions {
|
|
38
|
+
readonly width: number;
|
|
39
|
+
readonly height: number;
|
|
40
|
+
readonly baseSeed?: number;
|
|
41
|
+
readonly maxBounces?: number;
|
|
42
|
+
readonly qualityRevision?: string;
|
|
43
|
+
readonly exposure?: number;
|
|
44
|
+
readonly toneMapping?: RayToneMapping;
|
|
45
|
+
readonly view?: RayProgressiveView;
|
|
46
|
+
readonly readback?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface RayProgressiveResetEvent {
|
|
49
|
+
readonly resetIndex: number;
|
|
50
|
+
readonly reasons: readonly RayProgressiveResetReason[];
|
|
51
|
+
readonly previousSampleCount: number;
|
|
52
|
+
readonly revision: string;
|
|
53
|
+
}
|
|
54
|
+
export interface RayProgressiveStageTiming {
|
|
55
|
+
readonly samplingNs: number | null;
|
|
56
|
+
readonly accumulationNs: number | null;
|
|
57
|
+
readonly denoiseTemporalNs: number | null;
|
|
58
|
+
readonly denoiseSpatialNs: number | null;
|
|
59
|
+
readonly presentNs: number | null;
|
|
60
|
+
readonly kind: 'timestamp-query' | 'unavailable';
|
|
61
|
+
}
|
|
62
|
+
export interface RayProgressiveMemory {
|
|
63
|
+
readonly historyBytes: number;
|
|
64
|
+
readonly denoiseScratchBytes: number;
|
|
65
|
+
readonly readbackBytes: number;
|
|
66
|
+
readonly peakBytes: number;
|
|
67
|
+
readonly liveResourceCount: number;
|
|
68
|
+
}
|
|
69
|
+
export interface RayProgressiveStatistics {
|
|
70
|
+
readonly sampleIndex: number;
|
|
71
|
+
readonly sampleCount: number;
|
|
72
|
+
readonly historyAge: number;
|
|
73
|
+
readonly resetCount: number;
|
|
74
|
+
readonly lastReset: RayProgressiveResetEvent | null;
|
|
75
|
+
readonly varianceMean: number;
|
|
76
|
+
readonly varianceMax: number;
|
|
77
|
+
readonly varianceSampleCount: number;
|
|
78
|
+
readonly sequence: RayProgressiveSequenceSample;
|
|
79
|
+
}
|
|
80
|
+
export interface RayProgressiveRenderResult {
|
|
81
|
+
readonly status: 'ok' | 'failed';
|
|
82
|
+
readonly width: number;
|
|
83
|
+
readonly height: number;
|
|
84
|
+
readonly revision: string;
|
|
85
|
+
readonly view: RayProgressiveView;
|
|
86
|
+
readonly outputTexture: GPUTexture | null;
|
|
87
|
+
readonly pixels: Uint8Array | null;
|
|
88
|
+
readonly statistics: RayProgressiveStatistics;
|
|
89
|
+
readonly timing: RayProgressiveStageTiming;
|
|
90
|
+
readonly memory: RayProgressiveMemory;
|
|
91
|
+
readonly diagnostics: readonly RayProgressiveDiagnostic[];
|
|
92
|
+
}
|
|
93
|
+
export interface RayProgressiveCreateResult {
|
|
94
|
+
readonly renderer: import('./runtime.js').RayProgressiveRenderer | null;
|
|
95
|
+
readonly diagnostics: readonly RayProgressiveDiagnostic[];
|
|
96
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { World } from '@haiyue/engine/ecs';
|
|
2
|
+
import type { Scene } from '@haiyue/engine/scene';
|
|
3
|
+
import type { RayDiagnostic, RayReferenceScene } from '../reference/index.js';
|
|
4
|
+
export interface RaySceneSourceRevision {
|
|
5
|
+
readonly worldId: number;
|
|
6
|
+
readonly structureVersion: number;
|
|
7
|
+
readonly componentChangeRevision: number;
|
|
8
|
+
}
|
|
9
|
+
export interface RaySceneMaterialFacts {
|
|
10
|
+
readonly materialId: string;
|
|
11
|
+
readonly revision: number;
|
|
12
|
+
readonly type: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RaySceneInstanceProvenance {
|
|
15
|
+
readonly instanceId: string;
|
|
16
|
+
readonly entityId: string;
|
|
17
|
+
readonly meshComponentId: number;
|
|
18
|
+
readonly hierarchyVersion: number;
|
|
19
|
+
readonly transformLocalVersion: number;
|
|
20
|
+
readonly material: RaySceneMaterialFacts;
|
|
21
|
+
}
|
|
22
|
+
export interface RaySceneSnapshot extends RayReferenceScene {
|
|
23
|
+
readonly schemaVersion: 1;
|
|
24
|
+
readonly sourceRevision: RaySceneSourceRevision;
|
|
25
|
+
readonly revision: string;
|
|
26
|
+
readonly fingerprint: string;
|
|
27
|
+
readonly provenance: readonly RaySceneInstanceProvenance[];
|
|
28
|
+
readonly diagnostics: readonly RayDiagnostic[];
|
|
29
|
+
}
|
|
30
|
+
export interface RaySceneExtractionResult {
|
|
31
|
+
readonly snapshot: RaySceneSnapshot;
|
|
32
|
+
readonly diagnostics: readonly RayDiagnostic[];
|
|
33
|
+
readonly valid: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Copies public Engine facts into a resource-free immutable snapshot.
|
|
37
|
+
* The extractor never calls Transform3D.updateWorldMatrix and never writes to source objects.
|
|
38
|
+
*/
|
|
39
|
+
export declare function extractRayTracingScene(source: Scene | World): RaySceneExtractionResult;
|
|
40
|
+
/** Cheap source revision check; fingerprint comparison remains authoritative after unversioned raw-array mutation. */
|
|
41
|
+
export declare function hasRaySceneSourceRevisionChanged(snapshot: RaySceneSnapshot, source: Scene | World): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { RayTraversalRuntime } from './runtime.js';
|
|
2
|
+
export { createRayTraversalDispatchPlan } from './plan.js';
|
|
3
|
+
export { RAY_TRAVERSAL_LAYOUT } from './layout.js';
|
|
4
|
+
export type { RayTraversalCounters, RayTraversalCreateResult, RayTraversalDiagnostic, RayTraversalDispatchPlan, RayTraversalDispatchPlanPass, RayTraversalExecuteOptions, RayTraversalHit, RayTraversalInput, RayTraversalMemory, RayTraversalMode, RayTraversalResult, } from './types.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const RAY_TRAVERSAL_LAYOUT: Readonly<{
|
|
2
|
+
artifactFormat: "haiyue-precompiled-shader-artifact";
|
|
3
|
+
artifactVersion: 2;
|
|
4
|
+
artifactHash: "3c7d275ae06d1510db7b454d2dc93cae66d5ef453371e252706d1b69fb281a9a";
|
|
5
|
+
compilerVersion: "shader-language-ray-traversal-v1";
|
|
6
|
+
passId: "ray-traversal";
|
|
7
|
+
workgroupSize: 64;
|
|
8
|
+
rayStride: 32;
|
|
9
|
+
hitStride: 96;
|
|
10
|
+
diagnosticSize: 32;
|
|
11
|
+
parameterSize: 32;
|
|
12
|
+
stackCapacity: 64;
|
|
13
|
+
requiredStorageBuffersPerShaderStage: 8;
|
|
14
|
+
requiredBindingsPerBindGroup: 9;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function createRayTraversalBindGroupLayout(device: GPUDevice): GPUBindGroupLayout;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RayPackedAcceleration } from '../acceleration/index.js';
|
|
2
|
+
import type { RayInput } from '../reference/index.js';
|
|
3
|
+
import type { RayTraversalCreateResult, RayTraversalExecuteOptions, RayTraversalResult } from './types.js';
|
|
4
|
+
export declare class RayTraversalRuntime {
|
|
5
|
+
readonly artifactHash: "3c7d275ae06d1510db7b454d2dc93cae66d5ef453371e252706d1b69fb281a9a";
|
|
6
|
+
readonly accelerationFingerprint: string;
|
|
7
|
+
private readonly _device;
|
|
8
|
+
private readonly _packed;
|
|
9
|
+
private readonly _buffers;
|
|
10
|
+
private _bindGroupLayout;
|
|
11
|
+
private _pipeline;
|
|
12
|
+
private _destroyed;
|
|
13
|
+
private _executing;
|
|
14
|
+
private _generation;
|
|
15
|
+
private _lostMessage;
|
|
16
|
+
private readonly _uncapturedErrors;
|
|
17
|
+
private readonly _uncapturedHandler;
|
|
18
|
+
private constructor();
|
|
19
|
+
static create(device: GPUDevice, packed: RayPackedAcceleration): Promise<RayTraversalCreateResult>;
|
|
20
|
+
get destroyed(): boolean;
|
|
21
|
+
get liveResourceCount(): number;
|
|
22
|
+
execute(inputs: readonly RayInput[], options?: RayTraversalExecuteOptions): Promise<RayTraversalResult>;
|
|
23
|
+
destroy(): void;
|
|
24
|
+
private _staticBytes;
|
|
25
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { RayInput, RayVec3 } from '../reference/index.js';
|
|
2
|
+
export type RayTraversalMode = 'closest-hit' | 'any-hit';
|
|
3
|
+
export type RayTraversalPhase = 'shader' | 'upload' | 'traversal' | 'readback' | 'lifecycle';
|
|
4
|
+
export type RayTraversalSeverity = 'info' | 'warning' | 'error';
|
|
5
|
+
export interface RayTraversalDiagnostic {
|
|
6
|
+
readonly phase: RayTraversalPhase;
|
|
7
|
+
readonly severity: RayTraversalSeverity;
|
|
8
|
+
readonly code: string;
|
|
9
|
+
readonly message: string;
|
|
10
|
+
readonly context: Readonly<Record<string, string | number | boolean | null>>;
|
|
11
|
+
}
|
|
12
|
+
export interface RayTraversalHit {
|
|
13
|
+
readonly primitiveKind: 'triangle' | 'sphere';
|
|
14
|
+
readonly instanceIdentityIndex: number;
|
|
15
|
+
readonly instanceIdentity: string;
|
|
16
|
+
readonly geometryIdentityIndex: number;
|
|
17
|
+
readonly geometryIdentity: string;
|
|
18
|
+
readonly primitiveIndex: number;
|
|
19
|
+
readonly t: number;
|
|
20
|
+
readonly position: RayVec3;
|
|
21
|
+
readonly barycentric: RayVec3 | null;
|
|
22
|
+
readonly frontFace: boolean;
|
|
23
|
+
readonly geometricNormal: RayVec3;
|
|
24
|
+
readonly shadingNormal: RayVec3;
|
|
25
|
+
readonly facingNormal: RayVec3;
|
|
26
|
+
}
|
|
27
|
+
export interface RayTraversalCounters {
|
|
28
|
+
readonly rays: number;
|
|
29
|
+
readonly tlasNodeTests: number;
|
|
30
|
+
readonly blasNodeTests: number;
|
|
31
|
+
readonly primitiveTests: number;
|
|
32
|
+
readonly hits: number;
|
|
33
|
+
readonly misses: number;
|
|
34
|
+
readonly stackOverflows: number;
|
|
35
|
+
readonly invalidAccesses: number;
|
|
36
|
+
}
|
|
37
|
+
export interface RayTraversalMemory {
|
|
38
|
+
readonly accelerationBytes: number;
|
|
39
|
+
readonly rayBytes: number;
|
|
40
|
+
readonly hitBytes: number;
|
|
41
|
+
readonly diagnosticBytes: number;
|
|
42
|
+
readonly parameterBytes: number;
|
|
43
|
+
readonly readbackBytes: number;
|
|
44
|
+
readonly peakBytes: number;
|
|
45
|
+
readonly liveResourceCount: number;
|
|
46
|
+
}
|
|
47
|
+
export interface RayTraversalResult {
|
|
48
|
+
readonly status: 'ok' | 'failed';
|
|
49
|
+
readonly mode: RayTraversalMode;
|
|
50
|
+
readonly hits: readonly (RayTraversalHit | null)[];
|
|
51
|
+
readonly counters: RayTraversalCounters;
|
|
52
|
+
readonly dispatchCount: number;
|
|
53
|
+
readonly gpuTimeNs: number | null;
|
|
54
|
+
readonly gpuTimeKind: 'timestamp-query' | 'unavailable';
|
|
55
|
+
readonly memory: RayTraversalMemory;
|
|
56
|
+
readonly diagnostics: readonly RayTraversalDiagnostic[];
|
|
57
|
+
}
|
|
58
|
+
export interface RayTraversalExecuteOptions {
|
|
59
|
+
readonly mode?: RayTraversalMode;
|
|
60
|
+
readonly maxRaysPerDispatch?: number;
|
|
61
|
+
/** Test/diagnostic override; production defaults to the frozen ABI limit of 64. */
|
|
62
|
+
readonly stackLimit?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface RayTraversalCreateResult {
|
|
65
|
+
readonly runtime: import('./runtime.js').RayTraversalRuntime | null;
|
|
66
|
+
readonly diagnostics: readonly RayTraversalDiagnostic[];
|
|
67
|
+
}
|
|
68
|
+
export interface RayTraversalDispatchPlanPass {
|
|
69
|
+
readonly kind: 'upload' | 'traversal' | 'consumer';
|
|
70
|
+
readonly label: string;
|
|
71
|
+
readonly dispatchIndex: number | null;
|
|
72
|
+
}
|
|
73
|
+
export interface RayTraversalDispatchPlan {
|
|
74
|
+
readonly rayCount: number;
|
|
75
|
+
readonly maxRaysPerDispatch: number;
|
|
76
|
+
readonly dispatchCount: number;
|
|
77
|
+
readonly passes: readonly RayTraversalDispatchPlanPass[];
|
|
78
|
+
}
|
|
79
|
+
export type RayTraversalInput = RayInput;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RaySceneSnapshot } from '../scene/index.js';
|
|
2
|
+
import { type RayAccelerationWorkerBuildOptions, type RayAccelerationWorkerBuildResult, type RayAccelerationWorkerClientCreateResult, type RayAccelerationWorkerClientOptions, type RayWorkerDiagnostic, type RayWorkerFactory } from './types.js';
|
|
3
|
+
export declare class RayAccelerationWorkerClient {
|
|
4
|
+
private readonly workerFactory;
|
|
5
|
+
private readonly options;
|
|
6
|
+
private channel;
|
|
7
|
+
private readonly owners;
|
|
8
|
+
private readonly diagnosticValues;
|
|
9
|
+
private readonly queueOverflowErrors;
|
|
10
|
+
private readonly maxRecoveryAttempts;
|
|
11
|
+
private disposedValue;
|
|
12
|
+
private recoveryPromise;
|
|
13
|
+
private constructor();
|
|
14
|
+
static create(workerFactory: RayWorkerFactory, options?: RayAccelerationWorkerClientOptions): RayAccelerationWorkerClientCreateResult;
|
|
15
|
+
get destroyed(): boolean;
|
|
16
|
+
get pendingCount(): number;
|
|
17
|
+
get liveOwnerCount(): number;
|
|
18
|
+
get diagnostics(): readonly RayWorkerDiagnostic[];
|
|
19
|
+
build(ownerId: string, snapshot: RaySceneSnapshot, options?: RayAccelerationWorkerBuildOptions): Promise<RayAccelerationWorkerBuildResult>;
|
|
20
|
+
releaseOwner(ownerId: string): Promise<boolean>;
|
|
21
|
+
dispose(): void;
|
|
22
|
+
private createChannel;
|
|
23
|
+
private recover;
|
|
24
|
+
private emit;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RayAccelerationWorkerRequest, type RayAccelerationWorkerResponse } from './types.js';
|
|
2
|
+
/** Worker-owned incremental BLAS/TLAS builders. No scene or GPU resource crosses this boundary. */
|
|
3
|
+
export declare class RayAccelerationWorkerRuntime {
|
|
4
|
+
private readonly owners;
|
|
5
|
+
private destroyedValue;
|
|
6
|
+
get destroyed(): boolean;
|
|
7
|
+
get liveOwnerCount(): number;
|
|
8
|
+
build(request: RayAccelerationWorkerRequest): RayAccelerationWorkerResponse;
|
|
9
|
+
release(ownerId: string): boolean;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type RayPackedAcceleration } from '../acceleration/index.js';
|
|
2
|
+
import type { RaySceneSnapshot } from '../scene/index.js';
|
|
3
|
+
import type { RayAccelerationWorkerResponse, RayPackedAccelerationDto, RaySceneSnapshotDto } from './types.js';
|
|
4
|
+
export declare function serializeRaySceneSnapshot(snapshot: RaySceneSnapshot): {
|
|
5
|
+
readonly snapshot: RaySceneSnapshotDto;
|
|
6
|
+
readonly transfer: readonly Transferable[];
|
|
7
|
+
};
|
|
8
|
+
export declare function deserializeRaySceneSnapshot(dto: RaySceneSnapshotDto): RaySceneSnapshot;
|
|
9
|
+
/** Clones buffers before transfer so the worker's incremental builder keeps an intact previous revision. */
|
|
10
|
+
export declare function clonePackedAccelerationForTransfer(packed: RayPackedAcceleration): {
|
|
11
|
+
readonly packed: RayPackedAccelerationDto;
|
|
12
|
+
readonly transfer: readonly Transferable[];
|
|
13
|
+
readonly transferBytes: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function deserializePackedAcceleration(dto: RayPackedAccelerationDto): RayPackedAcceleration;
|
|
16
|
+
export declare function collectRayWorkerResponseTransferables(response: RayAccelerationWorkerResponse): readonly Transferable[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createRayAccelerationWorkerSource(rayTracingModuleUrl: string): string;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { RayAccelerationDiagnostic, RayAccelerationRuntimeStatistics, RayAccelerationUpdateKind, RayDirtyUploadRange, RayPackedAcceleration } from '../acceleration/index.js';
|
|
2
|
+
import type { RayDiagnostic, RayMatrix4, RayPrimitiveIdentity, RayVec3 } from '../reference/index.js';
|
|
3
|
+
import type { RaySceneInstanceProvenance, RaySceneMaterialFacts, RaySceneSourceRevision, RaySceneSnapshot } from '../scene/index.js';
|
|
4
|
+
export declare const RAY_ACCELERATION_WORKER_PROTOCOL_VERSION: 1;
|
|
5
|
+
export declare const RAY_ACCELERATION_WORKER_REQUEST_FORMAT: "haiyue-ray-acceleration-worker-request@1";
|
|
6
|
+
export declare const RAY_ACCELERATION_WORKER_RESPONSE_FORMAT: "haiyue-ray-acceleration-worker-response@1";
|
|
7
|
+
export type RayWorkerDiagnosticCode = 'RAY_WORKER_QUEUE_OVERFLOW' | 'RAY_WORKER_CRASH' | 'RAY_WORKER_MESSAGE_ERROR' | 'RAY_WORKER_PROTOCOL_ERROR' | 'RAY_WORKER_STALE_REPLY' | 'RAY_WORKER_ABORTED' | 'RAY_WORKER_RECOVERY_STARTED' | 'RAY_WORKER_RECOVERY_COMPLETED' | 'RAY_WORKER_RECOVERY_FAILED' | 'RAY_WORKER_OWNER_RELEASED' | 'RAY_WORKER_DISPOSED';
|
|
8
|
+
export interface RayWorkerDiagnostic {
|
|
9
|
+
readonly phase: 'worker-request' | 'worker-recovery' | 'worker-lifecycle';
|
|
10
|
+
readonly severity: 'info' | 'warning' | 'error';
|
|
11
|
+
readonly code: RayWorkerDiagnosticCode;
|
|
12
|
+
readonly message: string;
|
|
13
|
+
readonly context: Readonly<Record<string, string | number | boolean | null>>;
|
|
14
|
+
}
|
|
15
|
+
export interface RayWorkerGeometryDto {
|
|
16
|
+
readonly kind: 'triangle-mesh';
|
|
17
|
+
readonly geometryId: string;
|
|
18
|
+
readonly revision: number;
|
|
19
|
+
readonly positions: Float64Array<ArrayBuffer>;
|
|
20
|
+
readonly normals: Float64Array<ArrayBuffer> | null;
|
|
21
|
+
readonly indices: Uint32Array<ArrayBuffer> | null;
|
|
22
|
+
readonly primitiveCount: number;
|
|
23
|
+
}
|
|
24
|
+
export interface RayWorkerInstanceDto {
|
|
25
|
+
readonly instanceId: string;
|
|
26
|
+
readonly entityId: string;
|
|
27
|
+
readonly geometryId: string;
|
|
28
|
+
readonly geometryRevision: number;
|
|
29
|
+
readonly transform: readonly number[];
|
|
30
|
+
}
|
|
31
|
+
export interface RayWorkerAnalyticSphereDto {
|
|
32
|
+
readonly kind: 'sphere';
|
|
33
|
+
readonly identity: RayPrimitiveIdentity;
|
|
34
|
+
readonly center: RayVec3;
|
|
35
|
+
readonly radius: number;
|
|
36
|
+
readonly transform: RayMatrix4;
|
|
37
|
+
}
|
|
38
|
+
export interface RaySceneSnapshotDto {
|
|
39
|
+
readonly schemaVersion: 1;
|
|
40
|
+
readonly sourceRevision: RaySceneSourceRevision;
|
|
41
|
+
readonly revision: string;
|
|
42
|
+
readonly fingerprint: string;
|
|
43
|
+
readonly geometries: readonly RayWorkerGeometryDto[];
|
|
44
|
+
readonly instances: readonly RayWorkerInstanceDto[];
|
|
45
|
+
readonly analyticPrimitives: readonly RayWorkerAnalyticSphereDto[];
|
|
46
|
+
readonly provenance: readonly RaySceneInstanceProvenance[];
|
|
47
|
+
readonly diagnostics: readonly RayDiagnostic[];
|
|
48
|
+
}
|
|
49
|
+
export interface RayAccelerationWorkerRequest {
|
|
50
|
+
readonly format: typeof RAY_ACCELERATION_WORKER_REQUEST_FORMAT;
|
|
51
|
+
readonly ownerId: string;
|
|
52
|
+
readonly generation: number;
|
|
53
|
+
readonly sourceFingerprint: string;
|
|
54
|
+
readonly forceRebuild: boolean;
|
|
55
|
+
readonly snapshot: RaySceneSnapshotDto;
|
|
56
|
+
}
|
|
57
|
+
export interface RayPackedAccelerationDto extends Omit<RayPackedAcceleration, 'buffers'> {
|
|
58
|
+
readonly buffers: RayPackedAcceleration['buffers'];
|
|
59
|
+
}
|
|
60
|
+
export interface RayAccelerationWorkerResponse {
|
|
61
|
+
readonly format: typeof RAY_ACCELERATION_WORKER_RESPONSE_FORMAT;
|
|
62
|
+
readonly ownerId: string;
|
|
63
|
+
readonly generation: number;
|
|
64
|
+
readonly sourceFingerprint: string;
|
|
65
|
+
readonly updateKind: RayAccelerationUpdateKind;
|
|
66
|
+
readonly packed: RayPackedAccelerationDto | null;
|
|
67
|
+
readonly dirtyRanges: readonly RayDirtyUploadRange[];
|
|
68
|
+
readonly diagnostics: readonly RayAccelerationDiagnostic[];
|
|
69
|
+
readonly statistics: RayAccelerationRuntimeStatistics;
|
|
70
|
+
readonly transferBytes: number;
|
|
71
|
+
}
|
|
72
|
+
export interface RayAccelerationWorkerBuildOptions {
|
|
73
|
+
readonly signal?: AbortSignal;
|
|
74
|
+
readonly forceRebuild?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface RayAccelerationWorkerBuildResult extends Omit<RayAccelerationWorkerResponse, 'packed'> {
|
|
77
|
+
readonly packed: RayPackedAcceleration | null;
|
|
78
|
+
readonly workerDiagnostics: readonly RayWorkerDiagnostic[];
|
|
79
|
+
}
|
|
80
|
+
export interface RayAccelerationWorkerClientOptions {
|
|
81
|
+
readonly maxPending?: number;
|
|
82
|
+
readonly maxRecoveryAttempts?: number;
|
|
83
|
+
readonly onDiagnostic?: (diagnostic: RayWorkerDiagnostic) => void;
|
|
84
|
+
}
|
|
85
|
+
export interface RayAccelerationWorkerClientCreateResult {
|
|
86
|
+
readonly client: import('./client.js').RayAccelerationWorkerClient | null;
|
|
87
|
+
readonly diagnostics: readonly RayWorkerDiagnostic[];
|
|
88
|
+
}
|
|
89
|
+
export type RayWorkerFactory = () => import('@haiyue/engine/experimental/async').WorkerChannelLike;
|
|
90
|
+
export declare function isRaySceneSnapshot(value: unknown): value is RaySceneSnapshot;
|
|
91
|
+
export declare function isRaySceneMaterialFacts(value: unknown): value is RaySceneMaterialFacts;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Experimental WebGPU compute ray-tracing capability.
|
|
3
|
+
*
|
|
4
|
+
* The namespace exports keep each owner boundary visible to consumers and
|
|
5
|
+
* prevent this optional capability from leaking into the extensions root.
|
|
6
|
+
*/
|
|
7
|
+
export * as rayReference from './ray-tracing/reference/index.js';
|
|
8
|
+
export * as rayScene from './ray-tracing/scene/index.js';
|
|
9
|
+
export * as rayAcceleration from './ray-tracing/acceleration/index.js';
|
|
10
|
+
export * as rayTraversal from './ray-tracing/traversal/index.js';
|
|
11
|
+
export * as rayMaterial from './ray-tracing/material/index.js';
|
|
12
|
+
export * as rayPathTracing from './ray-tracing/renderer/index.js';
|
|
13
|
+
export * as raySampling from './ray-tracing/sampling/index.js';
|
|
14
|
+
export * as rayDenoise from './ray-tracing/denoise/index.js';
|
|
15
|
+
export * as rayHybrid from './ray-tracing/hybrid/index.js';
|
|
16
|
+
export * as rayWorker from './ray-tracing/worker/index.js';
|
|
17
|
+
export * as rayLifecycle from './ray-tracing/lifecycle/index.js';
|