hilo3d 2.0.0-alpha.4 → 2.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Hilo3d.d.ts CHANGED
@@ -4304,6 +4304,8 @@ interface LightParameters extends NodeParameters {
4304
4304
  quadraticAttenuation?: number;
4305
4305
  range?: number;
4306
4306
  isDirty?: boolean;
4307
+ /** Receiver-layer mask used by clustered lighting; defaults to every layer. */
4308
+ lightLayerMask?: number;
4307
4309
  }
4308
4310
  /** Parameters shared only by light kinds that implement shadows on every rendering backend. */
4309
4311
  interface ShadowCastingLightParameters extends LightParameters {
@@ -4326,6 +4328,10 @@ declare class Light extends Node {
4326
4328
  * 光强度
4327
4329
  */
4328
4330
  amount: number;
4331
+ private lightLayerMaskValue;
4332
+ /** Receiver-layer mask evaluated independently from camera/node visibility. */
4333
+ get lightLayerMask(): number;
4334
+ set lightLayerMask(value: number);
4329
4335
  /**
4330
4336
  * 是否开启灯光
4331
4337
  */
@@ -4567,6 +4573,28 @@ interface SpotLightParameters extends ShadowCastingLightParameters {
4567
4573
  direction?: Vector3;
4568
4574
  cutoff?: number;
4569
4575
  outerCutoff?: number;
4576
+ /** Optional analytic projected cookie for native clustered lighting. */
4577
+ cookie?: Readonly<SpotLightCookie> | null;
4578
+ /** Optional normalized axial IES fit for native clustered lighting. */
4579
+ iesProfile?: Readonly<SpotLightIESProfile> | null;
4580
+ }
4581
+ /** Analytic projected cookie carried by the high-end clustered-light ABI. */
4582
+ interface SpotLightCookie {
4583
+ /** Projected half-extent on the light plane. */
4584
+ readonly scale?: readonly [number, number];
4585
+ /** Projected cookie-center offset. */
4586
+ readonly offset?: readonly [number, number];
4587
+ /** Cookie multiplier. Defaults to one. */
4588
+ readonly intensity?: number;
4589
+ /** Edge transition as a fraction of the cookie extent. Defaults to 0.1. */
4590
+ readonly softness?: number;
4591
+ }
4592
+ /** Compact axial fit for an imported IES photometric profile. */
4593
+ interface SpotLightIESProfile {
4594
+ /** Candela multiplier after normalization. Defaults to one. */
4595
+ readonly intensity?: number;
4596
+ /** Axial concentration exponent. Defaults to one. */
4597
+ readonly exponent?: number;
4570
4598
  }
4571
4599
  /**
4572
4600
  * 聚光灯
@@ -4576,6 +4604,16 @@ declare class SpotLight extends Light {
4576
4604
  isSpotLight: boolean;
4577
4605
  className: string;
4578
4606
  direction: Vector3;
4607
+ private cookieValue;
4608
+ private iesProfileValue;
4609
+ /** Analytic projected cookie used by native clustered Spot lighting. */
4610
+ get cookie(): Readonly<Required<SpotLightCookie>> | null;
4611
+ /** Analytic projected cookie used by native clustered Spot lighting. */
4612
+ set cookie(value: Readonly<SpotLightCookie> | null);
4613
+ /** Normalized axial IES fit used by native clustered Spot lighting. */
4614
+ get iesProfile(): Readonly<Required<SpotLightIESProfile>> | null;
4615
+ /** Normalized axial IES fit used by native clustered Spot lighting. */
4616
+ set iesProfile(value: Readonly<SpotLightIESProfile> | null);
4579
4617
  private cutoffCosine;
4580
4618
  private cutoffDegrees;
4581
4619
  /**
@@ -5761,6 +5799,8 @@ interface RendererContract {
5761
5799
  useInstanced: boolean;
5762
5800
  readonly cameraRelative: boolean;
5763
5801
  readonly renderingProfile: 'portable' | 'high-end';
5802
+ /** Shadow-atlas page-budget policy selected when this renderer was created. */
5803
+ readonly shadowUpdateMode: 'paged' | 'full';
5764
5804
  forceMaterial: MaterialInstance | null;
5765
5805
  clearColor: Color;
5766
5806
  resize(width: number, height: number, force?: boolean): void;
@@ -6169,6 +6209,162 @@ interface ScriptableRenderGraph {
6169
6209
  addPass<P extends object>(pass: ScriptableRenderPass<P>, parameters: P): RenderGraphPassHandle;
6170
6210
  }
6171
6211
 
6212
+ /** Sample interpretation supported by whole-subresource compute graph textures. */
6213
+ type ComputeTextureSampleType = 'float' | 'unfilterable-float' | 'depth';
6214
+ /** Compute graph textures currently expose one complete two-dimensional subresource. */
6215
+ type ComputeTextureViewDimension = '2d';
6216
+ /** Compute storage textures currently expose one complete two-dimensional subresource. */
6217
+ type ComputeStorageTextureViewDimension = '2d';
6218
+ /** Sample interpretation supported by storage-aware graphics shaders. */
6219
+ type ShaderTextureSampleType = ComputeTextureSampleType | 'sint' | 'uint';
6220
+ /** Texture views supported by the Material-backed storage graphics path. */
6221
+ type ShaderTextureViewDimension = ComputeTextureViewDimension | '2d-array' | '3d' | 'cube';
6222
+ /** Public color formats that can be requested for a storage-texture binding. */
6223
+ type ComputeStorageTextureFormat = 'r32float' | 'rg32float' | 'rgba8unorm' | 'rgba16float' | 'rgba32float';
6224
+ /** Graph initialization promise for a writable storage-buffer binding. */
6225
+ type ComputeStorageBufferAccess = 'read-write' | 'write-discard';
6226
+ /** Resource binding that a shader may only read. */
6227
+ type ShaderReadBinding = Readonly<{
6228
+ name: string;
6229
+ group: number;
6230
+ binding: number;
6231
+ kind: 'uniform-buffer' | 'read-only-storage-buffer';
6232
+ minBindingSize?: number;
6233
+ dynamicOffset?: boolean;
6234
+ }> | Readonly<{
6235
+ name: string;
6236
+ group: number;
6237
+ binding: number;
6238
+ kind: 'sampled-texture';
6239
+ sampleType: ShaderTextureSampleType;
6240
+ viewDimension?: ShaderTextureViewDimension;
6241
+ }> | Readonly<{
6242
+ name: string;
6243
+ group: number;
6244
+ binding: number;
6245
+ kind: 'sampler' | 'comparison-sampler';
6246
+ }>;
6247
+ /** Explicit binding ABI for one Direct WGSL compute shader. */
6248
+ type ComputeShaderBinding = Readonly<{
6249
+ name: string;
6250
+ group: number;
6251
+ binding: number;
6252
+ kind: 'uniform-buffer' | 'read-only-storage-buffer';
6253
+ minBindingSize?: number;
6254
+ dynamicOffset?: boolean;
6255
+ }> | Readonly<{
6256
+ name: string;
6257
+ group: number;
6258
+ binding: number;
6259
+ kind: 'sampled-texture';
6260
+ sampleType: ComputeTextureSampleType;
6261
+ viewDimension?: ComputeTextureViewDimension;
6262
+ }> | Readonly<{
6263
+ name: string;
6264
+ group: number;
6265
+ binding: number;
6266
+ kind: 'sampler' | 'non-filtering-sampler' | 'comparison-sampler';
6267
+ }> | Readonly<{
6268
+ name: string;
6269
+ group: number;
6270
+ binding: number;
6271
+ kind: 'storage-buffer';
6272
+ /** Graph access promise; both modes use a WGSL `read_write` storage declaration. */
6273
+ access: ComputeStorageBufferAccess;
6274
+ minBindingSize?: number;
6275
+ dynamicOffset?: boolean;
6276
+ }> | Readonly<{
6277
+ name: string;
6278
+ group: number;
6279
+ binding: number;
6280
+ kind: 'storage-texture';
6281
+ /**
6282
+ * WGSL access mode. Declaring this binding also promises that the pass completely
6283
+ * replaces the bound texture subresource before a later graph read.
6284
+ */
6285
+ access: 'write-only';
6286
+ format: ComputeStorageTextureFormat;
6287
+ viewDimension?: ComputeStorageTextureViewDimension;
6288
+ }>;
6289
+ /** Immutable source, entry point, workgroup size, and binding ABI for {@link ComputeShader}. */
6290
+ interface ComputeShaderDescriptor {
6291
+ /** Optional diagnostic label. */
6292
+ readonly label?: string;
6293
+ /** Direct WGSL source containing exactly the declared compute entry point and resources. */
6294
+ readonly source: string;
6295
+ /** Compute entry-point name. Defaults to `main`. */
6296
+ readonly entryPoint?: string;
6297
+ /** One to three positive literal dimensions, which must match `@workgroup_size`. */
6298
+ readonly workgroupSize: readonly [number, number?, number?];
6299
+ /** Complete explicit resource ABI; entries are snapshotted and sorted by group/binding. */
6300
+ readonly bindings: readonly ComputeShaderBinding[];
6301
+ }
6302
+ /** Normalized three-dimensional compute workgroup size. */
6303
+ type NormalizedComputeWorkgroupSize = readonly [number, number, number];
6304
+ /** Immutable, backend-neutral Direct WGSL compute shader configuration. */
6305
+ declare class ComputeShader {
6306
+ /** Stable diagnostic label, or an empty string. */
6307
+ readonly label: string;
6308
+ /** Validated Direct WGSL source. */
6309
+ readonly source: string;
6310
+ /** Validated compute entry point. */
6311
+ readonly entryPoint: string;
6312
+ /** Normalized workgroup dimensions. */
6313
+ readonly workgroupSize: NormalizedComputeWorkgroupSize;
6314
+ /** Immutable bindings in group/binding order. */
6315
+ readonly bindings: readonly ComputeShaderBinding[];
6316
+ /** Snapshot a Direct WGSL compute shader contract without creating device objects. */
6317
+ constructor(descriptor: Readonly<ComputeShaderDescriptor>);
6318
+ }
6319
+
6320
+ /** Constrained GLSL ES 3.10 graphics source and readonly resource ABI. */
6321
+ interface StorageGraphicsShaderDescriptor {
6322
+ /** Optional diagnostic label. */
6323
+ readonly label?: string;
6324
+ /** GLSL ES 3.10 vertex source; storage blocks must be `readonly` and `std430`. */
6325
+ readonly vertexSource: string;
6326
+ /** GLSL ES 3.10 fragment source; storage blocks must be `readonly` and `std430`. */
6327
+ readonly fragmentSource: string;
6328
+ /** Complete read-only resource ABI shared by the two graphics stages. */
6329
+ readonly bindings: readonly ShaderReadBinding[];
6330
+ }
6331
+ /** Internal adapter for a preprocessed portable shader promoted into the storage-raster dialect. */
6332
+ interface PortableStorageGraphicsShaderDescriptor {
6333
+ readonly label?: string;
6334
+ /** Fully preprocessed GLSL ES 3.00 vertex source. */
6335
+ readonly portableVertexSource: string;
6336
+ /** Fully preprocessed GLSL ES 3.00 fragment source with constrained readonly storage blocks. */
6337
+ readonly portableFragmentSource: string;
6338
+ readonly bindings: readonly ShaderReadBinding[];
6339
+ }
6340
+ /**
6341
+ * Immutable WebGPU-only graphics shader configuration for readonly storage-buffer rendering.
6342
+ *
6343
+ * Sources use the constrained GLSL ES 3.10 contract. Compilation still runs through the shared
6344
+ * engine GLSL preprocessing and Naga translation path; this object never accepts hand-written
6345
+ * graphics WGSL.
6346
+ */
6347
+ declare class StorageGraphicsShader {
6348
+ /** Stable diagnostic label, or an empty string. */
6349
+ readonly label: string;
6350
+ /** Immutable GLSL ES 3.10 vertex source. */
6351
+ readonly vertexSource: string;
6352
+ /** Immutable GLSL ES 3.10 fragment source. */
6353
+ readonly fragmentSource: string;
6354
+ /** Immutable bindings in group/binding order. */
6355
+ readonly bindings: readonly ShaderReadBinding[];
6356
+ /** Snapshot a WebGPU-only storage-aware graphics shader contract. */
6357
+ constructor(descriptor: Readonly<StorageGraphicsShaderDescriptor>);
6358
+ }
6359
+ /**
6360
+ * Promote fully preprocessed portable raster source at the single storage-graphics boundary.
6361
+ * This keeps dynamic built-in material variants on the same GLSL/Naga path without admitting a
6362
+ * second handwritten WGSL or raster-material tree.
6363
+ *
6364
+ * @internal
6365
+ */
6366
+ declare function createStorageGraphicsShaderFromPortable(descriptor: Readonly<PortableStorageGraphicsShaderDescriptor>): StorageGraphicsShader;
6367
+
6172
6368
  /** Optional renderer capabilities exposed only after their complete SRP/RHI path is available. */
6173
6369
  type RenderPipelineCapabilityName = 'storage-buffer' | 'storage-texture' | 'compute-pass' | 'indirect-draw';
6174
6370
  /** Portable texture roles available to creation-time requirement validation. */
@@ -6259,6 +6455,8 @@ interface RenderPipelineCreateContext {
6259
6455
  * recording while avoiding native backend access.
6260
6456
  */
6261
6457
  createStorageBuffer(descriptor: Readonly<StorageBufferDescriptor>): StorageBuffer;
6458
+ /** Translate and validate storage-aware raster variants before the first application frame. */
6459
+ warmupStorageGraphicsShaders(shaders: readonly StorageGraphicsShader[], batchSize?: number): Promise<void>;
6262
6460
  }
6263
6461
  /** Attachment operations selected for one physical output color attachment. */
6264
6462
  interface RenderPipelineOutputColorAttachment {
@@ -6348,6 +6546,58 @@ interface RenderPipelineShadowResources {
6348
6546
  readonly pointBiases: Float32Array;
6349
6547
  /** Six view-space-to-shadow-clip face matrices per shadowed point light. */
6350
6548
  readonly pointMatrices: Float32Array;
6549
+ /** Physical atlas slices in dense render order. Values are valid only for this invocation. */
6550
+ readonly slices: readonly Readonly<RenderPipelineShadowSlice>[];
6551
+ /** Page-granular atlas updates recorded this frame, in render order. */
6552
+ readonly pageRegions: readonly Readonly<RenderPipelineShadowPageRegion>[];
6553
+ }
6554
+ /** One frame-scoped physical page update within a shadow slice. */
6555
+ interface RenderPipelineShadowPageRegion {
6556
+ /** Dense physical slice containing this page. */
6557
+ readonly slicePhysicalIndex: number;
6558
+ /** Zero-based horizontal virtual-page coordinate within the slice. */
6559
+ readonly pageX: number;
6560
+ /** Zero-based vertical virtual-page coordinate within the slice. */
6561
+ readonly pageY: number;
6562
+ /** Physical atlas X origin in pixels. */
6563
+ readonly x: number;
6564
+ /** Physical atlas Y origin in pixels. */
6565
+ readonly y: number;
6566
+ /** Physical page width in pixels; edge pages may be smaller than the page size. */
6567
+ readonly width: number;
6568
+ /** Physical page height in pixels; edge pages may be smaller than the page size. */
6569
+ readonly height: number;
6570
+ }
6571
+ /** One frame-scoped shadow-atlas slice exposed for GPU-driven caster work. */
6572
+ interface RenderPipelineShadowSlice {
6573
+ /** Light projection represented by the slice. */
6574
+ readonly kind: 'directional' | 'spot' | 'point';
6575
+ /** Stable LightBlock ABI index. */
6576
+ readonly sliceIndex: number;
6577
+ /** Dense physical placement index within the atlas. */
6578
+ readonly physicalIndex: number;
6579
+ /** Point-light cube face, or null for planar shadows. */
6580
+ readonly face: number | null;
6581
+ /** Directional cascade index, or null for local lights. */
6582
+ readonly cascade: number | null;
6583
+ /** Atlas viewport as `[x, y, width, height]`. */
6584
+ readonly viewport: RendererViewport;
6585
+ /** World-space to shadow clip-space transform. */
6586
+ readonly viewProjectionMatrix: Float32Array;
6587
+ /** Shadow-camera near plane. */
6588
+ readonly near: number;
6589
+ /** Shadow-camera far plane. */
6590
+ readonly far: number;
6591
+ /** Whether the submission-aware cache scheduled this slice for update. */
6592
+ readonly dirty: boolean;
6593
+ }
6594
+ /** Optional hybrid-shadow selection used by GPU-managed pipelines. */
6595
+ interface RenderPipelineShadowOptions {
6596
+ /**
6597
+ * Mesh identities omitted from CPU shadow draws while remaining part of cache invalidation.
6598
+ * The caller must record equivalent atlas writes for every exposed `pageRegions` entry.
6599
+ */
6600
+ readonly excludeMeshes?: readonly Mesh[];
6351
6601
  }
6352
6602
  /** Frame-scoped recording context; retaining it after record() returns is an error. */
6353
6603
  interface RenderPipelineContext {
@@ -6365,6 +6615,8 @@ interface RenderPipelineContext {
6365
6615
  readonly output: RenderPipelineOutput;
6366
6616
  /** Effective capabilities for the current device generation. */
6367
6617
  readonly capabilities: RenderPipelineCapabilities;
6618
+ /** Whether scene depth uses the renderer's logarithmic depth encoding. */
6619
+ readonly useLogDepth: boolean;
6368
6620
  /** Backend-neutral graph facade for this invocation. */
6369
6621
  readonly graph: ScriptableRenderGraph;
6370
6622
  /** Update scene world matrices and the active camera without building a CPU render list. */
@@ -6378,7 +6630,7 @@ interface RenderPipelineContext {
6378
6630
  * Returns the exact graph texture and packed sampling data, or `null` when no shadow slice is
6379
6631
  * active. The returned arrays are frame-scoped and must not be retained after `record()`.
6380
6632
  */
6381
- recordShadows(cullingResults: CullingResultsHandle): Readonly<RenderPipelineShadowResources> | null;
6633
+ recordShadows(cullingResults: CullingResultsHandle, options?: Readonly<RenderPipelineShadowOptions>): Readonly<RenderPipelineShadowResources> | null;
6382
6634
  /** Acquire one runtime-owned, high-water reusable parameter slot. */
6383
6635
  acquirePassParameters<P extends object>(pool: RenderPassParameterPool<P>): P;
6384
6636
  /**
@@ -6427,6 +6679,8 @@ type RendererAdapterPowerPreference = 'low-power' | 'high-performance';
6427
6679
  type RendererContextPowerPreference = 'default' | RendererAdapterPowerPreference;
6428
6680
  /** Shared renderer policy bundle. `high-end` enables reversed-Z cameras and camera-relative GPU transforms. */
6429
6681
  type RendererRenderingProfile = 'portable' | 'high-end';
6682
+ /** Shadow-atlas update policy. `full` disables page-budget deferral within a renderer frame. */
6683
+ type RendererShadowUpdateMode = 'paged' | 'full';
6430
6684
  /** Optional device capabilities that the renderer can request through the portable RHI. */
6431
6685
  type RendererFeatureName = 'texture-compression-bc' | 'texture-compression-etc2' | 'texture-compression-astc' | 'timestamp-query' | 'shader-f16' | 'subgroups' | 'depth32float-stencil8' | 'float32-filterable' | 'float32-blendable';
6432
6686
  /** Backend-independent construction options. */
@@ -6450,6 +6704,8 @@ interface RendererCommonOptions {
6450
6704
  cameraRelative?: boolean;
6451
6705
  /** Renderer policy bundle. Defaults to `portable`. */
6452
6706
  renderingProfile?: RendererRenderingProfile;
6707
+ /** Shadow-atlas update policy. Defaults to `paged`; use `full` for fully dynamic scenes. */
6708
+ shadowUpdateMode?: RendererShadowUpdateMode;
6453
6709
  vertexPrecision?: ShaderPrecision;
6454
6710
  fragmentPrecision?: ShaderPrecision;
6455
6711
  fog?: Fog | null;
@@ -6513,6 +6769,8 @@ declare class Renderer<Backend extends RendererBackend = RendererBackend> implem
6513
6769
  readonly renderTarget: RendererContract['renderTarget'];
6514
6770
  readonly cameraRelative: RendererContract['cameraRelative'];
6515
6771
  readonly renderingProfile: RendererContract['renderingProfile'];
6772
+ /** Shadow-atlas page-budget policy selected at creation. */
6773
+ readonly shadowUpdateMode: RendererContract['shadowUpdateMode'];
6516
6774
  width: RendererContract['width'];
6517
6775
  height: RendererContract['height'];
6518
6776
  pixelRatio: RendererContract['pixelRatio'];
@@ -8212,56 +8470,6 @@ declare namespace util_d {
8212
8470
  export type { util_d_GeometryDataLike as GeometryDataLike, util_d_MutableArrayLike as MutableArrayLike, util_d_TypedArray as TypedArray, util_d_TypedArrayConstructor as TypedArrayConstructor };
8213
8471
  }
8214
8472
 
8215
- interface SkinnedMeshParameters extends MeshParameters {
8216
- skeleton?: Skeleton | null;
8217
- }
8218
- /**
8219
- * 蒙皮Mesh
8220
- */
8221
- declare class SkinnedMesh extends Mesh {
8222
- static readonly typeName: string;
8223
- private jointMat;
8224
- private clonedFrom;
8225
- isSkinnedMesh: boolean;
8226
- className: string;
8227
- /**
8228
- * 是否支持 Instanced
8229
- */
8230
- useInstanced: boolean;
8231
- /**
8232
- * 是否开启视锥体裁剪
8233
- */
8234
- frustumTest: boolean;
8235
- /**
8236
- * 骨架
8237
- */
8238
- skeleton: Skeleton | null;
8239
- /**
8240
- * @param params - 初始化参数,所有params都会复制到实例上
8241
- * - `params.geometry`: 几何体
8242
- * - `params.material`: 材质
8243
- * - `params.skeleton`: 骨骼
8244
- */
8245
- constructor(params?: SkinnedMeshParameters);
8246
- /**
8247
- * 获取每个骨骼对应的矩阵数组
8248
- * @returns 返回矩阵数组
8249
- */
8250
- getJointMat(): Float32Array;
8251
- /**
8252
- * 用新骨骼的 node name 重设 jointNames
8253
- * @param skeleton - 新骨架
8254
- */
8255
- resetJointNamesByNodeName(skeleton: Skeleton): void;
8256
- /**
8257
- * 用新骨骼重置skinIndices
8258
- * @param skeleton -
8259
- */
8260
- resetSkinIndices(skeleton: Skeleton): void;
8261
- clone(isChild?: boolean): SkinnedMesh;
8262
- getRenderOption(opt?: ShaderOptions): ShaderOptions;
8263
- }
8264
-
8265
8473
  type DOMViewport = ReturnType<typeof getElementRect>;
8266
8474
  interface StageCommonParameters extends NodeParameters {
8267
8475
  container?: HTMLElement;
@@ -8281,6 +8489,8 @@ interface StageCommonParameters extends NodeParameters {
8281
8489
  useLogDepth?: boolean;
8282
8490
  /** Renderer policy bundle. `high-end` enables reversed-Z and camera-relative transforms. */
8283
8491
  renderingProfile?: RendererRenderingProfile;
8492
+ /** Shadow-atlas update policy. Use `full` for scenes whose shadow casters move every frame. */
8493
+ shadowUpdateMode?: RendererShadowUpdateMode;
8284
8494
  alpha?: boolean;
8285
8495
  depth?: boolean;
8286
8496
  stencil?: boolean;
@@ -8290,6 +8500,8 @@ interface StageCommonParameters extends NodeParameters {
8290
8500
  gameMode?: boolean;
8291
8501
  /** Renderer-local scriptable pipeline factory snapshotted during Stage.create(). */
8292
8502
  renderPipeline?: RenderPipelineFactory;
8503
+ /** Optional Stage Systems initialized transactionally before `Stage.create()` resolves. */
8504
+ systems?: readonly StageSystem[];
8293
8505
  }
8294
8506
  /** Requested backend policy. `auto` probes WebGPU first and otherwise selects WebGL 2. */
8295
8507
  type StageBackend = RendererBackend | 'auto';
@@ -8347,6 +8559,8 @@ declare class Stage<Backend extends RendererBackend = RendererBackend> extends N
8347
8559
  * 渲染器
8348
8560
  */
8349
8561
  renderer: Renderer<Backend>;
8562
+ /** Per-Stage scheduler and service registry for optional addon Systems. */
8563
+ readonly systems: StageSystemRegistry;
8350
8564
  /** Resolves when the selected graphics backend is ready for rendering. */
8351
8565
  readonly ready: Promise<void>;
8352
8566
  /** Ordered cameras rendered by `tick()`. */
@@ -8449,7 +8663,11 @@ declare class Stage<Backend extends RendererBackend = RendererBackend> extends N
8449
8663
  * @returns 舞台本身。链式调用支持。
8450
8664
  */
8451
8665
  tick(dt: number): this;
8452
- private prepareParticleRendererResources;
8666
+ /** Install one optional addon after this Stage is ready. */
8667
+ installSystem(system: StageSystem): Promise<this>;
8668
+ /** Remove one leaf addon System. Hard dependants must be removed first. */
8669
+ uninstallSystem(id: string): this;
8670
+ private prepareAddonRendererResources;
8453
8671
  /**
8454
8672
  * Replace the ordered camera composition.
8455
8673
  * @param cameras - Unique Camera instances in back-to-front render order.
@@ -8502,46 +8720,211 @@ declare class Stage<Backend extends RendererBackend = RendererBackend> extends N
8502
8720
  destroy(): this;
8503
8721
  }
8504
8722
 
8505
- type TweenEaseFunction = (ratio: number) => number;
8506
- type TweenProperties = Readonly<Record<string, number>>;
8507
- interface TweenParameters {
8508
- duration?: number;
8509
- delay?: number | string;
8510
- paused?: boolean;
8511
- loop?: boolean;
8512
- reverse?: boolean;
8513
- repeat?: number;
8514
- repeatDelay?: number;
8515
- ease?: TweenEaseFunction | null;
8516
- time?: number;
8517
- stagger?: number;
8518
- onStart?: TweenStartCallback | null;
8519
- onUpdate?: TweenUpdateCallback | null;
8520
- onComplete?: TweenCompleteCallback | null;
8521
- }
8522
- type TweenStartCallback = (this: Tween, tween: Tween) => void;
8523
- type TweenUpdateCallback = (this: Tween, ratio: number, tween: Tween) => void;
8524
- type TweenCompleteCallback = (this: Tween, tween: Tween) => void;
8525
- interface TweenEaseObject {
8526
- EaseIn: TweenEaseFunction;
8527
- EaseOut: TweenEaseFunction;
8528
- EaseInOut: TweenEaseFunction;
8529
- }
8530
- interface TweenEaseNoneObject {
8531
- EaseNone: TweenEaseFunction;
8723
+ /** Stage System ABI implemented by this Hilo3D release. */
8724
+ declare const STAGE_SYSTEM_API_VERSION: 1;
8725
+ /** Typed identity used by systems to publish services without string-key collisions. */
8726
+ declare class StageSystemService<T> {
8727
+ /** Human-readable token name used in diagnostics. */
8728
+ readonly name: string;
8729
+ private readonly serviceType;
8730
+ constructor(name: string);
8731
+ }
8732
+ /** Create a typed service identity shared by a provider and its consumers. */
8733
+ declare function createStageSystemService<T>(name: string): StageSystemService<T>;
8734
+ /** Immutable metadata compiled before System setup begins. */
8735
+ interface StageSystemDescriptor {
8736
+ /** Stable, package-qualified System identity. */
8737
+ readonly id: string;
8738
+ /** System implementation version for diagnostics. */
8739
+ readonly version: string;
8740
+ /** Exact Hilo3D Stage System ABI expected by this System. */
8741
+ readonly apiVersion: typeof STAGE_SYSTEM_API_VERSION;
8742
+ /** System identities that must be present, initialized first, and destroyed last. */
8743
+ readonly requires?: readonly string[];
8744
+ /** Optional System identities that this System runs before when they are present. */
8745
+ readonly before?: readonly string[];
8746
+ /** Optional System identities that this System runs after when they are present. */
8747
+ readonly after?: readonly string[];
8748
+ /** Complete set of typed services published during setup. */
8749
+ readonly provides?: readonly StageSystemService<unknown>[];
8750
+ }
8751
+ /** Context available only while a System factory is being initialized. */
8752
+ interface StageSystemSetupContext {
8753
+ /** Stage that owns this System runtime. */
8754
+ readonly stage: Stage;
8755
+ /** Publish one descriptor-declared service. */
8756
+ provide<T>(service: StageSystemService<T>, value: T): void;
8757
+ /** Read a required service published by an initialized dependency. */
8758
+ get<T>(service: StageSystemService<T>): T;
8759
+ /** Read an optional service published by an initialized dependency. */
8760
+ getOptional<T>(service: StageSystemService<T>): T | undefined;
8761
+ }
8762
+ /** Synchronous phase hooks owned by one initialized Stage System. */
8763
+ interface StageSystemRuntime {
8764
+ /** Run before scene-node updates for a frame. */
8765
+ beforeUpdate?(deltaTimeMilliseconds: number): void;
8766
+ /** Run after scene-node updates for a frame. */
8767
+ afterUpdate?(deltaTimeMilliseconds: number): void;
8768
+ /** Run immediately before rendering a frame. */
8769
+ beforeRender?(): void;
8770
+ /** Run after each render attempt, including a failed render. */
8771
+ afterRender?(): void;
8772
+ /** Release resources owned by this runtime. */
8773
+ destroy?(): void;
8774
+ }
8775
+ /** Reusable factory. Each Stage receives a distinct runtime from `setup()`. */
8776
+ interface StageSystem {
8777
+ /** Versioned identity, ordering, dependency, and service metadata. */
8778
+ readonly descriptor: StageSystemDescriptor;
8779
+ /** Create a fresh runtime for one Stage. */
8780
+ setup(context: StageSystemSetupContext): StageSystemRuntime | Promise<StageSystemRuntime>;
8532
8781
  }
8533
- interface ElasticEaseObject extends TweenEaseObject {
8534
- a: number;
8535
- p: number;
8536
- s: number;
8537
- config(amplitude: number, period: number): void;
8782
+ /**
8783
+ * Per-Stage System scheduler and service registry. Ordering is compiled only when the installed set
8784
+ * changes; frame dispatch walks flat phase-specific callback arrays.
8785
+ */
8786
+ declare class StageSystemRegistry {
8787
+ /** Stage that owns this System registry. */
8788
+ readonly stage: Stage;
8789
+ private readonly installed;
8790
+ private readonly installationOrder;
8791
+ private readonly services;
8792
+ private executionOrder;
8793
+ private beforeUpdateHooks;
8794
+ private afterUpdateHooks;
8795
+ private beforeRenderHooks;
8796
+ private afterRenderHooks;
8797
+ private dispatching;
8798
+ private initializing;
8799
+ private settingUp;
8800
+ private destroyingRuntime;
8801
+ private initialized;
8802
+ private destroyed;
8803
+ constructor(stage: Stage);
8804
+ /** Initialize an entire System set transactionally. Intended for `Stage.create()`. */
8805
+ initialize(systems: readonly StageSystem[]): Promise<void>;
8806
+ /** Install one System and recompile the frame schedule. */
8807
+ install(system: StageSystem): Promise<void>;
8808
+ /** Remove one leaf System. Hard dependants must be removed first. */
8809
+ uninstall(id: string): void;
8810
+ /** Return whether a System identity is currently installed. */
8811
+ has(id: string): boolean;
8812
+ /** Read an installed System runtime for diagnostics or explicit extension APIs. */
8813
+ getRuntime(id: string): StageSystemRuntime | undefined;
8814
+ /** Read a required typed service published by an installed System. */
8815
+ get<T>(service: StageSystemService<T>): T;
8816
+ /** Read a typed service when its provider is optional. */
8817
+ getOptional<T>(service: StageSystemService<T>): T | undefined;
8818
+ /** Dispatch the pre-update phase in compiled order. */
8819
+ runBeforeUpdate(deltaTimeMilliseconds: number): void;
8820
+ /** Dispatch the post-update phase in compiled order. */
8821
+ runAfterUpdate(deltaTimeMilliseconds: number): void;
8822
+ /** Dispatch the pre-render phase in compiled order. */
8823
+ runBeforeRender(): void;
8824
+ /** Dispatch the post-render phase in compiled order. */
8825
+ runAfterRender(): void;
8826
+ /** Destroy every runtime and its services in reverse compiled order. */
8827
+ destroy(): void;
8828
+ private installResolved;
8829
+ private destroyInstalled;
8830
+ private rebuildSchedule;
8831
+ private clearSchedule;
8832
+ private dispatchDelta;
8833
+ private dispatch;
8834
+ private beginDispatch;
8835
+ private requireMutable;
8538
8836
  }
8539
- interface BackEaseObject extends TweenEaseObject {
8540
- o: number;
8541
- s: number;
8542
- config(overshoot: number): void;
8837
+
8838
+ interface SkinnedMeshParameters extends MeshParameters {
8839
+ skeleton?: Skeleton | null;
8543
8840
  }
8544
- interface TweenEaseCollection {
8841
+ /**
8842
+ * 蒙皮Mesh
8843
+ */
8844
+ declare class SkinnedMesh extends Mesh {
8845
+ static readonly typeName: string;
8846
+ private jointMat;
8847
+ private clonedFrom;
8848
+ isSkinnedMesh: boolean;
8849
+ className: string;
8850
+ /**
8851
+ * 是否支持 Instanced
8852
+ */
8853
+ useInstanced: boolean;
8854
+ /**
8855
+ * 是否开启视锥体裁剪
8856
+ */
8857
+ frustumTest: boolean;
8858
+ /**
8859
+ * 骨架
8860
+ */
8861
+ skeleton: Skeleton | null;
8862
+ /**
8863
+ * @param params - 初始化参数,所有params都会复制到实例上
8864
+ * - `params.geometry`: 几何体
8865
+ * - `params.material`: 材质
8866
+ * - `params.skeleton`: 骨骼
8867
+ */
8868
+ constructor(params?: SkinnedMeshParameters);
8869
+ /**
8870
+ * 获取每个骨骼对应的矩阵数组
8871
+ * @returns 返回矩阵数组
8872
+ */
8873
+ getJointMat(): Float32Array;
8874
+ /**
8875
+ * 用新骨骼的 node name 重设 jointNames
8876
+ * @param skeleton - 新骨架
8877
+ */
8878
+ resetJointNamesByNodeName(skeleton: Skeleton): void;
8879
+ /**
8880
+ * 用新骨骼重置skinIndices
8881
+ * @param skeleton -
8882
+ */
8883
+ resetSkinIndices(skeleton: Skeleton): void;
8884
+ clone(isChild?: boolean): SkinnedMesh;
8885
+ getRenderOption(opt?: ShaderOptions): ShaderOptions;
8886
+ }
8887
+
8888
+ type TweenEaseFunction = (ratio: number) => number;
8889
+ type TweenProperties = Readonly<Record<string, number>>;
8890
+ interface TweenParameters {
8891
+ duration?: number;
8892
+ delay?: number | string;
8893
+ paused?: boolean;
8894
+ loop?: boolean;
8895
+ reverse?: boolean;
8896
+ repeat?: number;
8897
+ repeatDelay?: number;
8898
+ ease?: TweenEaseFunction | null;
8899
+ time?: number;
8900
+ stagger?: number;
8901
+ onStart?: TweenStartCallback | null;
8902
+ onUpdate?: TweenUpdateCallback | null;
8903
+ onComplete?: TweenCompleteCallback | null;
8904
+ }
8905
+ type TweenStartCallback = (this: Tween, tween: Tween) => void;
8906
+ type TweenUpdateCallback = (this: Tween, ratio: number, tween: Tween) => void;
8907
+ type TweenCompleteCallback = (this: Tween, tween: Tween) => void;
8908
+ interface TweenEaseObject {
8909
+ EaseIn: TweenEaseFunction;
8910
+ EaseOut: TweenEaseFunction;
8911
+ EaseInOut: TweenEaseFunction;
8912
+ }
8913
+ interface TweenEaseNoneObject {
8914
+ EaseNone: TweenEaseFunction;
8915
+ }
8916
+ interface ElasticEaseObject extends TweenEaseObject {
8917
+ a: number;
8918
+ p: number;
8919
+ s: number;
8920
+ config(amplitude: number, period: number): void;
8921
+ }
8922
+ interface BackEaseObject extends TweenEaseObject {
8923
+ o: number;
8924
+ s: number;
8925
+ config(overshoot: number): void;
8926
+ }
8927
+ interface TweenEaseCollection {
8545
8928
  Linear: TweenEaseNoneObject;
8546
8929
  Quad: TweenEaseObject;
8547
8930
  Cubic: TweenEaseObject;
@@ -8875,1231 +9258,6 @@ declare class OrbitControls {
8875
9258
  private readGesture;
8876
9259
  }
8877
9260
 
8878
- /** Addressing behavior outside the normalized curve domain. */
8879
- type ParticleCurveWrapMode = 'clamp' | 'loop' | 'ping-pong';
8880
- /** Interpolation applied between authored curve keyframes. */
8881
- type ParticleCurveInterpolation = 'linear' | 'smooth';
8882
- /** One scalar key in normalized authoring time. */
8883
- interface ParticleCurveKeyframe {
8884
- readonly time: number;
8885
- readonly value: number;
8886
- }
8887
- /** Immutable curve construction options. */
8888
- interface ParticleCurveOptions {
8889
- readonly wrap?: ParticleCurveWrapMode;
8890
- readonly interpolation?: ParticleCurveInterpolation;
8891
- }
8892
- /** Immutable scalar curve baked to identical float32 LUT bytes for CPU and GPU plans. */
8893
- declare class ParticleCurve {
8894
- readonly keys: readonly Readonly<ParticleCurveKeyframe>[];
8895
- readonly wrap: ParticleCurveWrapMode;
8896
- readonly interpolation: ParticleCurveInterpolation;
8897
- constructor(keys: readonly ParticleCurveKeyframe[], options?: ParticleCurveOptions);
8898
- /** Sample the authoring curve with explicitly defined wrap and interpolation semantics. */
8899
- sample(time: number): number;
8900
- /** Bake a fixed-size float32 lookup table. */
8901
- bake(sampleCount?: number): Float32Array;
8902
- }
8903
-
8904
- /** One linear-RGBA gradient key in normalized authoring time. */
8905
- interface ParticleGradientKey {
8906
- readonly time: number;
8907
- readonly color: ParticleColor;
8908
- }
8909
- /** Immutable linear-RGBA gradient with a fixed CPU/GPU LUT representation. */
8910
- declare class ParticleGradient {
8911
- readonly keys: readonly Readonly<ParticleGradientKey>[];
8912
- constructor(keys: readonly ParticleGradientKey[]);
8913
- /** Sample into a caller-provided array to avoid hot-path allocation. */
8914
- sample(time: number, target: Float32Array, offset?: number): void;
8915
- /** Bake tightly packed linear RGBA float32 texels. */
8916
- bake(sampleCount?: number): Float32Array;
8917
- }
8918
-
8919
- /** Closed value-kind set accepted by typed particle parameters. */
8920
- type ParticleParameterType = 'float' | 'uint' | 'boolean' | 'vector2' | 'vector3' | 'vector4' | 'color' | 'texture' | 'curve' | 'gradient';
8921
- /** Runtime values accepted by a typed particle parameter. */
8922
- type ParticleParameterValue = number | boolean | ParticleVector2 | ParticleVector3 | ParticleVector4 | Texture<unknown> | ParticleCurve | ParticleGradient;
8923
- /** Typed identity token for runtime parameter updates that do not change plan topology. */
8924
- declare class ParticleParameter<T extends ParticleParameterValue = ParticleParameterValue> {
8925
- readonly name: string;
8926
- readonly type: ParticleParameterType;
8927
- readonly defaultValue: T;
8928
- constructor(name: string, type: ParticleParameterType, defaultValue: T);
8929
- }
8930
- /** Runtime typed parameter values with a monotonic revision. */
8931
- declare class ParticleParameterSet {
8932
- #private;
8933
- get revision(): number;
8934
- get<T extends ParticleParameterValue>(parameter: ParticleParameter<T>): T;
8935
- set<T extends ParticleParameterValue>(parameter: ParticleParameter<T>, value: T): this;
8936
- reset(parameter?: ParticleParameter): this;
8937
- }
8938
-
8939
- /** Current serialized particle-definition schema version. */
8940
- declare const PARTICLE_DEFINITION_VERSION: 1;
8941
- /** Two-component serializable particle value. */
8942
- type ParticleVector2 = readonly [number, number];
8943
- /** Three-component serializable particle value. */
8944
- type ParticleVector3 = readonly [number, number, number];
8945
- /** Four-component serializable particle value. */
8946
- type ParticleVector4 = readonly [number, number, number, number];
8947
- /** Linear RGBA particle color. */
8948
- type ParticleColor = ParticleVector4;
8949
- /** Constant or deterministic random range evaluated from a particle counter key. */
8950
- type ParticleRange<T> = Readonly<{
8951
- min: T;
8952
- max: T;
8953
- }>;
8954
- /** Scalar authoring value accepted by fixed particle modules. */
8955
- type ParticleScalarValue = number | ParticleRange<number>;
8956
- /** Vector authoring value accepted by fixed particle modules. */
8957
- type ParticleVector3Value = ParticleVector3 | ParticleRange<ParticleVector3>;
8958
- /** Color authoring value accepted by fixed particle modules. */
8959
- type ParticleColorValue = ParticleColor | ParticleRange<ParticleColor>;
8960
- /** Runtime-bindable scalar source used only where plan topology remains unchanged. */
8961
- type ParticleScalarSource = ParticleScalarValue | ParticleParameter<number>;
8962
- /** Runtime-bindable vector source used only by spawn-time data evaluated on the CPU. */
8963
- type ParticleVector3Source = ParticleVector3Value | ParticleParameter<ParticleVector3>;
8964
- /** Runtime-bindable color source used only by spawn-time data evaluated on the CPU. */
8965
- type ParticleColorSource = ParticleColorValue | ParticleParameter<ParticleColor>;
8966
- /** Requested emitter execution policy. `auto` remains portable and capability driven. */
8967
- type ParticleExecutionMode = 'auto' | 'cpu' | 'gpu' | 'stateless';
8968
- /** Simulation coordinate system. */
8969
- type ParticleSimulationSpace = 'local' | 'world';
8970
- /** Reaction used when an emitter is culled by a renderer. */
8971
- type ParticleCullingReaction = 'render-only' | 'pause' | 'pause-and-catch-up' | 'stop';
8972
- /** Capacity overflow behavior. */
8973
- type ParticleOverflowPolicy = 'drop-new' | 'replace-oldest';
8974
- /** Overflow behavior for bounded particle event and data-channel buffers. */
8975
- type ParticleEventOverflowPolicy = 'drop-new' | 'drop-oldest';
8976
- /** Manual local-space bounds. */
8977
- interface ParticleManualBounds {
8978
- readonly mode: 'manual';
8979
- readonly min: ParticleVector3;
8980
- readonly max: ParticleVector3;
8981
- }
8982
- /** Compiler-derived conservative bounds. */
8983
- interface ParticleAutomaticBounds {
8984
- readonly mode: 'automatic';
8985
- }
8986
- /** Exact CPU bounds recomputed from the dense alive range. */
8987
- interface ParticleDynamicBounds {
8988
- readonly mode: 'dynamic';
8989
- }
8990
- /** Public emitter bounds policy. */
8991
- type ParticleBoundsDefinition = ParticleManualBounds | ParticleAutomaticBounds | ParticleDynamicBounds;
8992
- /** One deterministic time-based burst. */
8993
- interface ParticleBurstDefinition {
8994
- readonly time: number;
8995
- readonly count: number;
8996
- readonly cycles?: number;
8997
- readonly interval?: number;
8998
- }
8999
- /** Fixed emission sources evaluated before initialize modules. */
9000
- interface ParticleEmissionDefinition {
9001
- readonly rateOverTime?: ParticleScalarSource;
9002
- readonly rateOverDistance?: ParticleScalarSource;
9003
- readonly bursts?: readonly ParticleBurstDefinition[];
9004
- }
9005
- /** Common distribution controls shared by analytic particle shapes. */
9006
- interface ParticleShapeBase {
9007
- readonly distribution?: 'surface' | 'volume';
9008
- readonly arc?: number;
9009
- readonly thickness?: number;
9010
- }
9011
- /** Point emitter shape. */
9012
- interface ParticlePointShape extends ParticleShapeBase {
9013
- readonly type: 'point';
9014
- }
9015
- /** Line-segment or edge emitter shape. */
9016
- interface ParticleLineShape extends ParticleShapeBase {
9017
- readonly type: 'line' | 'edge';
9018
- readonly start: ParticleVector3;
9019
- readonly end: ParticleVector3;
9020
- }
9021
- /** Axis-aligned box emitter shape. */
9022
- interface ParticleBoxShape extends ParticleShapeBase {
9023
- readonly type: 'box';
9024
- readonly size: ParticleVector3;
9025
- }
9026
- /** Circle or filled-disc emitter shape. */
9027
- interface ParticleCircleShape extends ParticleShapeBase {
9028
- readonly type: 'circle' | 'disc';
9029
- readonly radius: number;
9030
- }
9031
- /** Sphere or hemisphere emitter shape. */
9032
- interface ParticleSphereShape extends ParticleShapeBase {
9033
- readonly type: 'sphere' | 'hemisphere';
9034
- readonly radius: number;
9035
- }
9036
- /** Cone emitter shape with a degree-based half-angle. */
9037
- interface ParticleConeShape extends ParticleShapeBase {
9038
- readonly type: 'cone';
9039
- readonly radius: number;
9040
- /** Cone half-angle in degrees. */
9041
- readonly angle: number;
9042
- readonly length?: number;
9043
- }
9044
- /** Torus or donut emitter shape. */
9045
- interface ParticleTorusShape extends ParticleShapeBase {
9046
- readonly type: 'torus' | 'donut';
9047
- readonly radius: number;
9048
- readonly tubeRadius: number;
9049
- }
9050
- /** Analytic shape sampled without allocating per-particle objects. */
9051
- type ParticleShapeDefinition = ParticlePointShape | ParticleLineShape | ParticleBoxShape | ParticleCircleShape | ParticleSphereShape | ParticleConeShape | ParticleTorusShape;
9052
- /** Initial attributes evaluated once for every spawn. */
9053
- interface ParticleInitializeDefinition {
9054
- readonly lifetime?: ParticleScalarSource;
9055
- readonly position?: ParticleVector3Source;
9056
- readonly direction?: ParticleVector3Source;
9057
- readonly speed?: ParticleScalarSource;
9058
- readonly color?: ParticleColorSource;
9059
- readonly size?: ParticleScalarSource;
9060
- /** Rotation in radians. */
9061
- readonly rotation?: ParticleScalarSource;
9062
- readonly mass?: ParticleScalarSource;
9063
- /** Integer mesh bucket selected at spawn. Omit to distribute by stable particle id. */
9064
- readonly meshIndex?: ParticleScalarSource;
9065
- /** Integer ribbon group selected at spawn. Particles only link inside the same group. */
9066
- readonly ribbonId?: ParticleScalarSource;
9067
- }
9068
- /** Constant velocity added before integration. */
9069
- interface ParticleVelocityModule {
9070
- readonly type: 'velocity-over-lifetime';
9071
- readonly velocity: ParticleVector3Value;
9072
- readonly space?: ParticleSimulationSpace;
9073
- }
9074
- /** Acceleration or force applied every fixed step. */
9075
- interface ParticleForceModule {
9076
- readonly type: 'force-over-lifetime' | 'gravity' | 'wind';
9077
- readonly force: ParticleVector3Value;
9078
- readonly space?: ParticleSimulationSpace;
9079
- }
9080
- /** Exponential velocity damping. */
9081
- interface ParticleDragModule {
9082
- readonly type: 'drag';
9083
- readonly coefficient: number;
9084
- }
9085
- /** Clamp particle speed and optionally damp the removed component. */
9086
- interface ParticleLimitVelocityModule {
9087
- readonly type: 'limit-velocity';
9088
- readonly limit: ParticleScalarValue;
9089
- readonly dampen?: number;
9090
- }
9091
- /** Add the emitter velocity observed at spawn. */
9092
- interface ParticleInheritVelocityModule {
9093
- readonly type: 'inherit-emitter-velocity';
9094
- readonly multiplier?: number;
9095
- }
9096
- /** Deterministic lattice noise shared by CPU and generated WebGPU kernels. */
9097
- interface ParticleNoiseModule {
9098
- readonly type: 'noise';
9099
- readonly mode: 'position-offset' | 'force';
9100
- readonly field: 'vector' | 'curl';
9101
- readonly strength: ParticleVector3Value;
9102
- readonly frequency: number;
9103
- readonly octaves: 1 | 2 | 3 | 4;
9104
- readonly lacunarity?: number;
9105
- readonly persistence?: number;
9106
- readonly scrollVelocity?: ParticleVector3;
9107
- readonly damping?: number;
9108
- readonly space?: ParticleSimulationSpace;
9109
- readonly seedOffset?: number;
9110
- }
9111
- /** Scalar curve applied over normalized lifetime. */
9112
- interface ParticleScalarOverLifetimeModule {
9113
- readonly type: 'alpha-over-lifetime' | 'size-over-lifetime' | 'rotation-over-lifetime' | 'frame-over-lifetime';
9114
- readonly curve: ParticleCurve;
9115
- readonly cycles?: number;
9116
- }
9117
- /** Gradient applied over normalized lifetime. */
9118
- interface ParticleColorOverLifetimeModule {
9119
- readonly type: 'color-over-lifetime';
9120
- readonly gradient: ParticleGradient;
9121
- }
9122
- /** Scalar speed-driven attribute modifier. */
9123
- interface ParticleScalarBySpeedModule {
9124
- readonly type: 'size-by-speed' | 'rotation-by-speed';
9125
- readonly speedRange: readonly [number, number];
9126
- readonly curve: ParticleCurve;
9127
- }
9128
- /** Gradient speed-driven color modifier. */
9129
- interface ParticleColorBySpeedModule {
9130
- readonly type: 'color-by-speed';
9131
- readonly speedRange: readonly [number, number];
9132
- readonly gradient: ParticleGradient;
9133
- }
9134
- /** First portable speed-driven attribute modifiers. */
9135
- type ParticleBySpeedModule = ParticleScalarBySpeedModule | ParticleColorBySpeedModule;
9136
- /** Texture-sheet frame selection. */
9137
- interface ParticleTextureSheetModule {
9138
- readonly type: 'texture-sheet';
9139
- readonly mode: 'lifetime' | 'speed' | 'fps';
9140
- readonly rows: number;
9141
- readonly columns: number;
9142
- readonly cycles?: number;
9143
- readonly fps?: number;
9144
- readonly speedRange?: readonly [number, number];
9145
- }
9146
- /** Advanced P2 force families. */
9147
- interface ParticleRadialForceModule {
9148
- readonly type: 'radial-force' | 'orbital-force' | 'vortex-force';
9149
- readonly center?: ParticleVector3;
9150
- readonly strength: ParticleScalarValue;
9151
- readonly axis?: ParticleVector3;
9152
- }
9153
- /** Point or closest-point-on-line attraction force. */
9154
- interface ParticleAttractionModule {
9155
- readonly type: 'point-attraction' | 'line-attraction';
9156
- readonly point?: ParticleVector3;
9157
- readonly lineStart?: ParticleVector3;
9158
- readonly lineEnd?: ParticleVector3;
9159
- readonly strength: ParticleScalarValue;
9160
- }
9161
- /** Tangential motion around an authored point and axis. */
9162
- interface ParticleRotateAroundPointModule {
9163
- readonly type: 'rotate-around-point';
9164
- readonly center?: ParticleVector3;
9165
- readonly axis?: ParticleVector3;
9166
- readonly angularSpeed: ParticleScalarValue;
9167
- }
9168
- /** Force particles toward an analytic sphere surface. */
9169
- interface ParticleConformSphereModule {
9170
- readonly type: 'conform-sphere';
9171
- readonly center?: ParticleVector3;
9172
- readonly radius: number;
9173
- readonly strength: number;
9174
- }
9175
- /** Remap initial lifetime from the emitter's spawn-time speed. */
9176
- interface ParticleLifetimeByEmitterSpeedModule {
9177
- readonly type: 'lifetime-by-emitter-speed';
9178
- readonly speedRange: readonly [number, number];
9179
- readonly lifetimeRange: readonly [number, number];
9180
- }
9181
- /** Kill particles outside an allowed speed or distance range. */
9182
- interface ParticleKillModule {
9183
- readonly type: 'kill-speed' | 'kill-distance';
9184
- readonly range: readonly [number, number];
9185
- }
9186
- /** Kill particles inside or outside an analytic volume. */
9187
- interface ParticleKillVolumeModule {
9188
- readonly type: 'kill-plane' | 'kill-box' | 'kill-sphere';
9189
- readonly center?: ParticleVector3;
9190
- readonly size?: ParticleVector3;
9191
- readonly radius?: number;
9192
- readonly normal?: ParticleVector3;
9193
- readonly offset?: number;
9194
- readonly mode?: 'inside' | 'outside';
9195
- }
9196
- /** Per-view camera offset, fade, or screen-space size modifier. */
9197
- interface ParticleCameraModule {
9198
- readonly type: 'camera-offset' | 'camera-fade' | 'screen-space-size';
9199
- readonly range?: readonly [number, number];
9200
- readonly scale?: number;
9201
- }
9202
- /** Typed fixed value allocated as a custom particle attribute. */
9203
- interface ParticleCustomChannelModule {
9204
- readonly type: 'custom-channel';
9205
- readonly name: string;
9206
- readonly valueType: 'float' | 'vec2' | 'vec3' | 'vec4' | 'color';
9207
- readonly value: number | ParticleVector2 | ParticleVector3 | ParticleVector4;
9208
- }
9209
- /** Texture-driven vector field force. */
9210
- interface ParticleVectorFieldModule {
9211
- readonly type: 'vector-field';
9212
- readonly texture: Texture<unknown>;
9213
- readonly strength: number;
9214
- }
9215
- /** Infinite plane used by analytic particle collision and trigger modules. */
9216
- interface ParticlePlaneCollider {
9217
- readonly type: 'plane';
9218
- readonly normal: ParticleVector3;
9219
- readonly offset?: number;
9220
- }
9221
- /** Solid sphere used by analytic particle collision and trigger modules. */
9222
- interface ParticleSphereCollider {
9223
- readonly type: 'sphere';
9224
- readonly center?: ParticleVector3;
9225
- readonly radius: number;
9226
- }
9227
- /** Axis-aligned solid box used by analytic particle collision and trigger modules. */
9228
- interface ParticleBoxCollider {
9229
- readonly type: 'box';
9230
- readonly center?: ParticleVector3;
9231
- readonly size: ParticleVector3;
9232
- }
9233
- /** Line-swept solid sphere used by analytic particle collision and trigger modules. */
9234
- interface ParticleCapsuleCollider {
9235
- readonly type: 'capsule';
9236
- readonly start: ParticleVector3;
9237
- readonly end: ParticleVector3;
9238
- readonly radius: number;
9239
- }
9240
- /** Backend-neutral analytic collision primitive. */
9241
- type ParticleAnalyticCollider = ParticlePlaneCollider | ParticleSphereCollider | ParticleBoxCollider | ParticleCapsuleCollider;
9242
- /** Resolve particles against a fixed list of analytic primitives. */
9243
- interface ParticleCollisionModule {
9244
- readonly type: 'collision';
9245
- readonly colliders: readonly ParticleAnalyticCollider[];
9246
- readonly bounce?: number;
9247
- readonly friction?: number;
9248
- readonly radiusScale?: number;
9249
- readonly lifetimeLoss?: number;
9250
- readonly event?: string;
9251
- }
9252
- /** Emit batched inside/enter/exit events for analytic trigger volumes. */
9253
- interface ParticleTriggerModule {
9254
- readonly type: 'trigger';
9255
- readonly volumes: readonly ParticleAnalyticCollider[];
9256
- readonly events?: Readonly<{
9257
- inside?: string;
9258
- enter?: string;
9259
- exit?: string;
9260
- }>;
9261
- }
9262
- /** WebGPU-only collision against the sampled opaque scene depth. */
9263
- interface ParticleSceneDepthCollisionModule {
9264
- readonly type: 'scene-depth-collision';
9265
- readonly thickness?: number;
9266
- readonly bounce?: number;
9267
- readonly friction?: number;
9268
- readonly event?: string;
9269
- }
9270
- /** Route a batched source event into another emitter without a CPU per-event callback. */
9271
- interface ParticleSubEmitterModule {
9272
- readonly type: 'sub-emitter';
9273
- readonly event: string;
9274
- readonly emitter: string;
9275
- readonly count?: number;
9276
- readonly inheritVelocity?: boolean;
9277
- }
9278
- /** Closed fixed-module union. Arbitrary code and per-particle callbacks are intentionally absent. */
9279
- type ParticleModule = ParticleVelocityModule | ParticleForceModule | ParticleDragModule | ParticleLimitVelocityModule | ParticleInheritVelocityModule | ParticleNoiseModule | ParticleScalarOverLifetimeModule | ParticleColorOverLifetimeModule | ParticleBySpeedModule | ParticleTextureSheetModule | ParticleRadialForceModule | ParticleAttractionModule | ParticleRotateAroundPointModule | ParticleConformSphereModule | ParticleLifetimeByEmitterSpeedModule | ParticleKillModule | ParticleKillVolumeModule | ParticleCameraModule | ParticleCustomChannelModule | ParticleVectorFieldModule | ParticleCollisionModule | ParticleTriggerModule | ParticleSceneDepthCollisionModule | ParticleSubEmitterModule;
9280
- /** Sprite-facing mode evaluated per camera by the portable particle shader. */
9281
- type ParticleSpriteAlignment = 'view' | 'world-up' | 'stretched' | 'velocity';
9282
- /** Particle-level sort mode. */
9283
- type ParticleSortMode = 'none' | 'distance' | 'youngest' | 'oldest';
9284
- /** Surface coverage used to place particle output in the shared render queues. */
9285
- type ParticleSurfaceCoverage = 'opaque' | 'masked' | 'transparent';
9286
- /** Deliberately small scene-light subset supported by mesh and ribbon particles. */
9287
- type ParticleLightingMode = 'unlit' | 'lambert';
9288
- /** Particle composition behavior relative to temporal and bloom stages. */
9289
- type ParticleCompositionMode = 'scene';
9290
- /** Shared controls for non-sprite particle surfaces. */
9291
- interface ParticleAdvancedSurfaceDefinition {
9292
- readonly texture?: Texture<unknown> | null;
9293
- readonly coverage?: ParticleSurfaceCoverage;
9294
- readonly alphaCutoff?: number;
9295
- readonly blend?: 'alpha' | 'premultiplied-alpha' | 'additive';
9296
- readonly lighting?: ParticleLightingMode;
9297
- readonly depthTest?: boolean;
9298
- readonly depthWrite?: boolean;
9299
- readonly sort?: ParticleSortMode;
9300
- readonly renderOrder?: number;
9301
- /** P5 renders into linear scene color before Bloom; other policies fail at compile time. */
9302
- readonly composition?: ParticleCompositionMode;
9303
- }
9304
- /** Portable sprite output consumed by CPU and WebGPU plans. */
9305
- interface ParticleSpriteRendererDefinition {
9306
- readonly type: 'sprite';
9307
- readonly texture?: Texture<unknown> | null;
9308
- readonly alignment?: ParticleSpriteAlignment;
9309
- readonly blend?: 'alpha' | 'premultiplied-alpha' | 'additive';
9310
- readonly depthTest?: boolean;
9311
- readonly depthWrite?: boolean;
9312
- readonly sort?: ParticleSortMode;
9313
- readonly renderOrder?: number;
9314
- readonly pivot?: ParticleVector2;
9315
- /** Relative elongation per world-space velocity unit for stretched alignment. */
9316
- readonly stretchScale?: number;
9317
- /** WebGPU storage-raster depth fade. Depth write must remain disabled. */
9318
- readonly softParticle?: Readonly<{
9319
- readonly distance: number;
9320
- readonly contrast?: number;
9321
- }>;
9322
- }
9323
- /** One immutable geometry bucket consumed by a mesh particle renderer. */
9324
- interface ParticleMeshAsset {
9325
- readonly geometry: Geometry;
9326
- readonly texture?: Texture<unknown> | null;
9327
- }
9328
- /** Instanced mesh output. One draw is emitted per non-empty mesh bucket, never per particle. */
9329
- interface ParticleMeshRendererDefinition extends ParticleAdvancedSurfaceDefinition {
9330
- readonly type: 'mesh';
9331
- readonly meshes: readonly ParticleMeshAsset[];
9332
- readonly orientation?: 'rotation' | 'velocity';
9333
- /** Available only for opaque/masked portable CPU mesh output. */
9334
- readonly motionVectors?: boolean;
9335
- }
9336
- /** Ribbon and trail output compacting adjacent members of each ribbon into dense segments. */
9337
- interface ParticleRibbonRendererDefinition extends ParticleAdvancedSurfaceDefinition {
9338
- readonly type: 'ribbon' | 'trail';
9339
- readonly facing?: 'view' | 'world-up';
9340
- readonly widthScale?: number;
9341
- readonly uvMode?: 'stretch' | 'repeat';
9342
- readonly tilesPerUnit?: number;
9343
- /** Optional WebGPU scene-depth fade. Depth write must remain disabled. */
9344
- readonly softParticle?: Readonly<{
9345
- readonly distance: number;
9346
- readonly contrast?: number;
9347
- }>;
9348
- }
9349
- /** Renderer definitions remain separate from simulation modules. */
9350
- type ParticleRendererDefinition = ParticleSpriteRendererDefinition | ParticleMeshRendererDefinition | ParticleRibbonRendererDefinition;
9351
- /** Immutable emitter authoring input. */
9352
- interface ParticleEmitterDefinitionInput {
9353
- readonly name: string;
9354
- readonly capacity: number;
9355
- readonly execution?: ParticleExecutionMode;
9356
- readonly duration?: number;
9357
- readonly looping?: boolean;
9358
- readonly startDelay?: number;
9359
- readonly prewarm?: boolean;
9360
- readonly fixedStep?: number;
9361
- readonly maxCatchUpSteps?: number;
9362
- readonly simulationSpace?: ParticleSimulationSpace;
9363
- readonly overflow?: ParticleOverflowPolicy;
9364
- readonly culling?: ParticleCullingReaction;
9365
- readonly eventCapacity?: number;
9366
- readonly eventOverflow?: ParticleEventOverflowPolicy;
9367
- readonly bounds?: ParticleBoundsDefinition;
9368
- readonly emission?: ParticleEmissionDefinition;
9369
- readonly shape?: ParticleShapeDefinition;
9370
- readonly initialize?: ParticleInitializeDefinition;
9371
- readonly modules?: readonly ParticleModule[];
9372
- readonly renderers: readonly ParticleRendererDefinition[];
9373
- }
9374
- /** Versioned immutable particle-system authoring input. */
9375
- interface ParticleSystemDefinitionInput {
9376
- readonly version?: typeof PARTICLE_DEFINITION_VERSION;
9377
- readonly emitters: readonly ParticleEmitterDefinitionInput[];
9378
- }
9379
-
9380
- /** Immutable, independently hashable emitter definition. */
9381
- declare class ParticleEmitterDefinition {
9382
- readonly name: string;
9383
- readonly capacity: number;
9384
- readonly execution: ParticleExecutionMode;
9385
- readonly duration: number;
9386
- readonly looping: boolean;
9387
- readonly startDelay: number;
9388
- readonly prewarm: boolean;
9389
- readonly fixedStep: number;
9390
- readonly maxCatchUpSteps: number;
9391
- readonly simulationSpace: ParticleSimulationSpace;
9392
- readonly overflow: ParticleOverflowPolicy;
9393
- readonly culling: ParticleCullingReaction;
9394
- readonly eventCapacity: number;
9395
- readonly eventOverflow: ParticleEventOverflowPolicy;
9396
- readonly bounds: ParticleBoundsDefinition;
9397
- readonly emission: ParticleEmissionDefinition;
9398
- readonly shape: ParticleShapeDefinition;
9399
- readonly initialize: ParticleInitializeDefinition;
9400
- readonly modules: readonly ParticleModule[];
9401
- readonly renderers: readonly ParticleRendererDefinition[];
9402
- readonly hash: string;
9403
- constructor(input: Readonly<ParticleEmitterDefinitionInput>);
9404
- }
9405
-
9406
- /** How faithfully a fixed module can be reconstructed without cross-frame particle state. */
9407
- type ParticleStatelessSupport = 'exact' | 'approximated' | 'stateful-only';
9408
- /** Asset-level stateless diagnostic retained by the compiled particle plan. */
9409
- interface ParticleStatelessModuleMetadata {
9410
- readonly moduleIndex: number;
9411
- readonly moduleType: ParticleModule['type'] | 'rate-over-distance';
9412
- readonly support: ParticleStatelessSupport;
9413
- readonly reason: string;
9414
- }
9415
- /** Analyze the complete fixed module set without compiling renderer or backend objects. */
9416
- declare function analyzeParticleStatelessEligibility(emitter: ParticleEmitterDefinition): readonly Readonly<ParticleStatelessModuleMetadata>[];
9417
- /** Return only the diagnostics that prevent selection of a stateless execution plan. */
9418
- declare function particleStatelessBlockingDiagnostics(metadata: readonly Readonly<ParticleStatelessModuleMetadata>[]): readonly string[];
9419
-
9420
- /** Immutable, versioned particle asset compiled independently by each renderer. */
9421
- declare class ParticleSystemDefinition {
9422
- readonly version: 1;
9423
- readonly emitters: readonly ParticleEmitterDefinition[];
9424
- readonly hash: string;
9425
- private constructor();
9426
- /** Validate and snapshot mutable authoring input. */
9427
- static create(input: Readonly<ParticleSystemDefinitionInput>): ParticleSystemDefinition;
9428
- /** Resolve one immutable emitter by stable authored name. */
9429
- getEmitter(name: string): ParticleEmitterDefinition | null;
9430
- }
9431
-
9432
- /** Typed particle attributes allocated only when a module or renderer consumes them. */
9433
- type ParticleAttributeName = 'stable-id' | 'generation' | 'alive' | 'age' | 'lifetime' | 'normalized-age' | 'position' | 'previous-position' | 'spawn-position' | 'velocity' | 'size' | 'base-size' | 'rotation' | 'base-rotation' | 'color' | 'base-color' | 'sprite-frame' | 'mass' | 'noise-offset' | 'collision-state' | 'mesh-index' | 'ribbon-id' | `custom:${string}`;
9434
- interface ParticleAttributeLayout {
9435
- readonly name: ParticleAttributeName;
9436
- readonly storage: 'f32' | 'u32';
9437
- readonly components: 1 | 2 | 3 | 4;
9438
- /** Sixteen-byte-aligned byte offset in the generated WebGPU SoA storage buffer. */
9439
- readonly byteOffset: number;
9440
- readonly byteLength: number;
9441
- }
9442
- /** Baked scalar curve table retained by a compiled emitter. */
9443
- interface ParticleCurveLUT {
9444
- readonly curve: ParticleCurve;
9445
- readonly values: Float32Array;
9446
- }
9447
- /** Baked linear-RGBA gradient table retained by a compiled emitter. */
9448
- interface ParticleGradientLUT {
9449
- readonly gradient: ParticleGradient;
9450
- readonly values: Float32Array;
9451
- }
9452
- /** Backend-neutral compiled emitter plan. Shader/native objects remain renderer-internal. */
9453
- interface ParticleCompiledEmitterPlan {
9454
- readonly definition: ParticleEmitterDefinition;
9455
- readonly emitterId: number;
9456
- readonly kind: 'cpu-stateful' | 'gpu-stateful' | 'stateless';
9457
- readonly attributes: readonly Readonly<ParticleAttributeLayout>[];
9458
- readonly attributeByteLength: number;
9459
- readonly layoutHash: string;
9460
- readonly curveLUTs: readonly Readonly<ParticleCurveLUT>[];
9461
- readonly gradientLUTs: readonly Readonly<ParticleGradientLUT>[];
9462
- readonly bounds: Readonly<Bounds>;
9463
- readonly statelessEligible: boolean;
9464
- readonly statelessDiagnostics: readonly string[];
9465
- /** Per-module reconstruction contract consumed by diagnostics and stateless generators. */
9466
- readonly statelessModules: readonly Readonly<ParticleStatelessModuleMetadata>[];
9467
- /** Cross-frame particle-state bytes. Stateless renderer input is intentionally excluded. */
9468
- readonly persistentStateByteLength: number;
9469
- }
9470
- /** Immutable compilation result cached by definition hash and execution environment. */
9471
- interface ParticleCompiledPlan {
9472
- readonly definition: ParticleSystemDefinition;
9473
- readonly hash: string;
9474
- readonly emitters: readonly Readonly<ParticleCompiledEmitterPlan>[];
9475
- }
9476
-
9477
- /** Backend capabilities and optional automatic execution threshold used during plan selection. */
9478
- interface ParticleAdvancedQualityPlan {
9479
- /** Enable ribbon/trail topology. Explicit false fails definitions that require it. */
9480
- readonly ribbons?: boolean;
9481
- /** Enable the controlled Lambert scene-light subset. */
9482
- readonly litParticles?: boolean;
9483
- /** Enable portable opaque/masked mesh motion-vector output. */
9484
- readonly motionVectors?: boolean;
9485
- }
9486
- interface ParticleCompilationEnvironment {
9487
- readonly backend?: 'webgl2' | 'webgpu';
9488
- readonly preferGPUAboveCapacity?: number;
9489
- readonly advancedQuality?: Readonly<ParticleAdvancedQualityPlan>;
9490
- }
9491
- /** Compile immutable particle definitions before any RHI frame begins. */
9492
- declare function compileParticleSystemDefinition(definition: ParticleSystemDefinition, environment?: Readonly<ParticleCompilationEnvironment>): Readonly<ParticleCompiledPlan>;
9493
-
9494
- /** Stable identifier stored at the root of every serialized particle definition. */
9495
- declare const PARTICLE_DEFINITION_SCHEMA: "hilo3d.particle-system";
9496
- /** JSON value accepted by the version upgrade and definition serialization APIs. */
9497
- type ParticleDefinitionJSONValue = null | boolean | number | string | ParticleDefinitionJSONRecord | readonly ParticleDefinitionJSONValue[];
9498
- /** JSON object accepted by the version upgrade and definition serialization APIs. */
9499
- interface ParticleDefinitionJSONRecord {
9500
- readonly [key: string]: ParticleDefinitionJSONValue;
9501
- }
9502
- /** One serialized parameter declaration referenced by stable document-local identity. */
9503
- interface ParticleDefinitionJSONParameter extends ParticleDefinitionJSONRecord {
9504
- /** Stable document-local identity used by parameter reference tags. */
9505
- readonly id: string;
9506
- /** Public runtime parameter name. */
9507
- readonly name: string;
9508
- /** Runtime value kind enforced when the parameter token is recreated. */
9509
- readonly type: ParticleParameterType;
9510
- /** Tagged JSON representation of the immutable default value. */
9511
- readonly defaultValue: ParticleDefinitionJSONValue;
9512
- }
9513
- /** Current versioned JSON representation of an immutable particle-system definition. */
9514
- interface ParticleSystemDefinitionJSON extends ParticleDefinitionJSONRecord {
9515
- /** Stable particle document family identifier. */
9516
- readonly schema: typeof PARTICLE_DEFINITION_SCHEMA;
9517
- /** Current particle document schema version. */
9518
- readonly version: typeof PARTICLE_DEFINITION_VERSION;
9519
- /** Shared parameter declarations referenced by emitters. */
9520
- readonly parameters: readonly ParticleDefinitionJSONParameter[];
9521
- /** Serialized emitter authoring records. */
9522
- readonly emitters: readonly ParticleDefinitionJSONRecord[];
9523
- }
9524
- /** Opaque engine resource kinds represented by stable application-owned asset identifiers. */
9525
- type ParticleDefinitionResourceKind = 'texture' | 'geometry';
9526
- /** Opaque engine resources that require application-owned identifiers in JSON. */
9527
- type ParticleDefinitionResource = Texture<unknown> | Geometry;
9528
- /** Options used while converting a runtime definition into portable JSON data. */
9529
- interface ParticleDefinitionSerializationOptions {
9530
- /** Return a stable asset identifier for every Texture or Geometry encountered. */
9531
- readonly getResourceId?: (resource: ParticleDefinitionResource, kind: ParticleDefinitionResourceKind) => string;
9532
- }
9533
- /** One sequential JSON schema upgrade. The returned document must use `fromVersion + 1`. */
9534
- interface ParticleDefinitionUpgrade {
9535
- /** Source version accepted by this step. */
9536
- readonly fromVersion: number;
9537
- /** Produce a plain JSON document whose version is exactly `fromVersion + 1`. */
9538
- readonly upgrade: (document: Readonly<ParticleDefinitionJSONRecord>) => Readonly<ParticleDefinitionJSONRecord>;
9539
- }
9540
- /** Options used while upgrading and materializing a serialized definition. */
9541
- interface ParticleDefinitionDeserializationOptions {
9542
- /** Resolve stable asset identifiers without embedding runtime object IDs in the document. */
9543
- readonly resolveResource?: (kind: ParticleDefinitionResourceKind, id: string) => ParticleDefinitionResource;
9544
- /** Sequential application-owned upgrades for schema versions older than the engine version. */
9545
- readonly upgrades?: readonly ParticleDefinitionUpgrade[];
9546
- /** Optional compile target used for backend-specific definition validation. */
9547
- readonly compilationEnvironment?: Readonly<ParticleCompilationEnvironment>;
9548
- }
9549
- /** Convert an immutable runtime definition into a deeply frozen, versioned JSON document. */
9550
- declare function serializeParticleSystemDefinition(definition: ParticleSystemDefinition, options?: Readonly<ParticleDefinitionSerializationOptions>): Readonly<ParticleSystemDefinitionJSON>;
9551
- /** Upgrade, strictly decode, validate, and snapshot a particle JSON document. */
9552
- declare function deserializeParticleSystemDefinition(source: unknown, options?: Readonly<ParticleDefinitionDeserializationOptions>): ParticleSystemDefinition;
9553
- /** Parse JSON text before applying the same upgrade, resource, and validation contract. */
9554
- declare function parseParticleSystemDefinitionJSON(source: string, options?: Readonly<ParticleDefinitionDeserializationOptions>): ParticleSystemDefinition;
9555
-
9556
- /** Stable external fixed-module graph document family. */
9557
- declare const PARTICLE_AUTHORING_SCHEMA: "hilo3d.particle-authoring";
9558
- /** Current external fixed-module graph and normalized IR version. */
9559
- declare const PARTICLE_AUTHORING_VERSION: 1;
9560
- /** Closed node kinds understood by the external authoring compiler. */
9561
- type ParticleAuthoringNodeKind = 'system' | 'emitter' | 'module' | 'renderer';
9562
- /** Closed ownership ports; edges do not represent arbitrary executable data flow. */
9563
- type ParticleAuthoringPort = 'emitters' | 'modules' | 'renderers';
9564
- /** One JSON node in the external fixed-module authoring graph. */
9565
- interface ParticleAuthoringNode {
9566
- readonly id: string;
9567
- readonly kind: ParticleAuthoringNodeKind;
9568
- readonly data: ParticleDefinitionJSONRecord;
9569
- /** Opaque JSON retained for an external editor and ignored by runtime compilation. */
9570
- readonly metadata?: ParticleDefinitionJSONRecord;
9571
- }
9572
- /** One ordered ownership edge in the external authoring graph. */
9573
- interface ParticleAuthoringEdge {
9574
- readonly id: string;
9575
- readonly from: string;
9576
- readonly to: string;
9577
- readonly port: ParticleAuthoringPort;
9578
- readonly order: number;
9579
- }
9580
- /** Versioned pure-JSON graph consumed by the external authoring compiler. */
9581
- interface ParticleAuthoringGraph {
9582
- readonly schema: typeof PARTICLE_AUTHORING_SCHEMA;
9583
- readonly version: typeof PARTICLE_AUTHORING_VERSION;
9584
- readonly definitionSchema: typeof PARTICLE_DEFINITION_SCHEMA;
9585
- readonly definitionVersion: typeof PARTICLE_DEFINITION_VERSION;
9586
- readonly parameters: readonly ParticleDefinitionJSONParameter[];
9587
- readonly nodes: readonly Readonly<ParticleAuthoringNode>[];
9588
- readonly edges: readonly Readonly<ParticleAuthoringEdge>[];
9589
- /** Opaque graph-level JSON retained for external editor layout/project data. */
9590
- readonly metadata?: ParticleDefinitionJSONRecord;
9591
- }
9592
- /** Structured compiler feedback addressable to one graph path/node. */
9593
- interface ParticleAuthoringDiagnostic {
9594
- readonly severity: 'error' | 'warning' | 'info';
9595
- readonly code: string;
9596
- readonly message: string;
9597
- /** Stable graph path; node-addressed paths use the submitted node id. */
9598
- readonly path: string;
9599
- readonly nodeId?: string;
9600
- }
9601
- /** Compiler-derived emitter data used by inspectors and preview hosts. */
9602
- interface ParticleAuthoringEmitterIR {
9603
- readonly nodeId: string;
9604
- readonly name: string;
9605
- readonly emitterId: number;
9606
- readonly planKind: 'cpu-stateful' | 'gpu-stateful' | 'stateless';
9607
- readonly layoutHash: string;
9608
- readonly attributes: readonly Readonly<ParticleAttributeLayout>[];
9609
- readonly moduleNodeIds: readonly string[];
9610
- readonly rendererNodeIds: readonly string[];
9611
- readonly statelessEligible: boolean;
9612
- readonly statelessDiagnostics: readonly string[];
9613
- }
9614
- /** Normalized fixed-module IR; runtime still consumes the embedded ordinary definition. */
9615
- interface ParticleAuthoringIR {
9616
- readonly schema: typeof PARTICLE_AUTHORING_SCHEMA;
9617
- readonly version: typeof PARTICLE_AUTHORING_VERSION;
9618
- readonly systemNodeId: string;
9619
- readonly definitionJSON: Readonly<ParticleSystemDefinitionJSON>;
9620
- readonly definitionHash: string;
9621
- readonly compiledPlanHash: string;
9622
- readonly emitters: readonly Readonly<ParticleAuthoringEmitterIR>[];
9623
- }
9624
- /** Environment/resource policy for compiling an external authoring graph. */
9625
- type ParticleAuthoringCompileOptions = ParticleDefinitionDeserializationOptions;
9626
- /** Successful external authoring compilation. */
9627
- interface ParticleAuthoringCompileSuccess {
9628
- readonly success: true;
9629
- readonly diagnostics: readonly Readonly<ParticleAuthoringDiagnostic>[];
9630
- readonly graph: Readonly<ParticleAuthoringGraph>;
9631
- readonly ir: Readonly<ParticleAuthoringIR>;
9632
- readonly definition: ParticleSystemDefinition;
9633
- readonly compiledPlan: Readonly<ParticleCompiledPlan>;
9634
- }
9635
- /** Failed external authoring compilation; no partial runtime definition escapes. */
9636
- interface ParticleAuthoringCompileFailure {
9637
- readonly success: false;
9638
- readonly diagnostics: readonly Readonly<ParticleAuthoringDiagnostic>[];
9639
- }
9640
- /** Fail-closed result returned to external authoring and preview hosts. */
9641
- type ParticleAuthoringCompileResult = ParticleAuthoringCompileSuccess | ParticleAuthoringCompileFailure;
9642
- /**
9643
- * JSON Schema for graph transport and editor-side structural validation. Definition node payloads
9644
- * remain governed by `PARTICLE_DEFINITION_SCHEMA` and are revalidated by the engine compiler.
9645
- */
9646
- declare const PARTICLE_AUTHORING_JSON_SCHEMA: Readonly<ParticleDefinitionJSONRecord>;
9647
- /** Convert one immutable definition into a deterministic editable fixed-module graph. */
9648
- declare function createParticleAuthoringGraph(definition: ParticleSystemDefinition, options?: Readonly<ParticleDefinitionSerializationOptions>): Readonly<ParticleAuthoringGraph>;
9649
- /** Validate topology, rebuild the ordinary definition, compile it, and expose normalized IR. */
9650
- declare function compileParticleAuthoringGraph(source: unknown, options?: Readonly<ParticleAuthoringCompileOptions>): ParticleAuthoringCompileResult;
9651
-
9652
- /** Renderer-local particle quality and capacity budget. */
9653
- interface ParticleBudgetProfile {
9654
- readonly maxSystems?: number;
9655
- readonly maxEmitters?: number;
9656
- readonly maxParticles?: number;
9657
- readonly maxDistance?: number;
9658
- readonly capacityScale?: number;
9659
- readonly spawnRateScale?: number;
9660
- readonly sorting?: boolean;
9661
- readonly softParticles?: boolean;
9662
- readonly collision?: boolean;
9663
- readonly ribbons?: boolean;
9664
- }
9665
- /** One stable emitter request submitted to a particle budget manager. */
9666
- interface ParticleBudgetRequest {
9667
- readonly systemId: string;
9668
- readonly emitterId: number;
9669
- readonly capacity: number;
9670
- readonly estimatedAlive: number;
9671
- readonly priority?: number;
9672
- readonly distance?: number;
9673
- readonly visible?: boolean;
9674
- }
9675
- /** Deterministic quality decision and its explainable degradation reasons. */
9676
- interface ParticleBudgetDecision {
9677
- readonly systemId: string;
9678
- readonly emitterId: number;
9679
- readonly enabled: boolean;
9680
- readonly particleLimit: number;
9681
- readonly spawnRateScale: number;
9682
- readonly sorting: boolean;
9683
- readonly softParticles: boolean;
9684
- readonly collision: boolean;
9685
- readonly ribbons: boolean;
9686
- readonly reasons: readonly string[];
9687
- }
9688
- /** Shared deterministic allocator used by renderer-local particle managers. */
9689
- declare class ParticleBudgetManager {
9690
- readonly profile: Readonly<Required<ParticleBudgetProfile>>;
9691
- constructor(profile?: Readonly<ParticleBudgetProfile>);
9692
- /** Resolve and immediately apply one complete frame-wide budget to live systems. */
9693
- apply(systems: readonly ParticleSystem[], camera?: Camera): readonly Readonly<ParticleBudgetDecision>[];
9694
- /** Resolve a complete frame at once so request order cannot alter the result. */
9695
- resolve(requests: readonly Readonly<ParticleBudgetRequest>[]): readonly Readonly<ParticleBudgetDecision>[];
9696
- }
9697
-
9698
- /** Current deterministic particle baking artifact format. */
9699
- declare const PARTICLE_BAKE_VERSION: 1;
9700
- /** Shared fixed-rate, half-open timeline used by particle baking. */
9701
- interface ParticleBakeTimelineOptions {
9702
- /** Sampled duration in seconds. */
9703
- readonly duration: number;
9704
- /** Samples per second. */
9705
- readonly frameRate: number;
9706
- /** Seconds simulated before the first captured frame. Defaults to zero. */
9707
- readonly startTime?: number;
9708
- /** Add one exact sample at `startTime + duration`. Defaults to false. */
9709
- readonly includeEnd?: boolean;
9710
- /** Safety limit for generated frames. Defaults to 4096. */
9711
- readonly maxFrames?: number;
9712
- }
9713
- /** Options for deterministic CPU particle instance-stream baking. */
9714
- interface ParticleMeshCacheOptions extends ParticleBakeTimelineOptions {
9715
- /** Optional named emitter. Omit to bake every emitter containing a mesh renderer. */
9716
- readonly emitter?: string;
9717
- /** Safety limit across all materialized emitter/frame particle records. Defaults to 1048576. */
9718
- readonly maxSampledParticles?: number;
9719
- }
9720
- /** One emitter's frame-major particle instance streams. */
9721
- interface ParticleBakedMeshEmitter {
9722
- readonly name: string;
9723
- readonly emitterId: number;
9724
- readonly capacity: number;
9725
- readonly simulationSpace: ParticleSimulationSpace;
9726
- /** Per-frame record boundaries; frame N occupies `[offsets[N], offsets[N + 1])`. */
9727
- readonly frameOffsets: Uint32Array;
9728
- readonly stableIds: Uint32Array;
9729
- readonly generations: Uint32Array;
9730
- readonly positions: Float32Array;
9731
- readonly previousPositions: Float32Array;
9732
- readonly velocities: Float32Array;
9733
- readonly sizes: Float32Array;
9734
- readonly rotations: Float32Array;
9735
- readonly colors: Float32Array;
9736
- readonly meshIndices: Uint32Array;
9737
- /** Per-frame `[xMin, yMin, zMin, xMax, yMax, zMax]`, or zeros for an empty frame. */
9738
- readonly frameBounds: Float32Array;
9739
- readonly storageByteLength: number;
9740
- }
9741
- /** Portable frame-major instance data baked from CPU or CPU-materialized stateless simulation. */
9742
- interface ParticleMeshCache {
9743
- readonly version: typeof PARTICLE_BAKE_VERSION;
9744
- readonly definitionHash: string;
9745
- readonly seed: number;
9746
- readonly duration: number;
9747
- readonly frameRate: number;
9748
- readonly startTime: number;
9749
- readonly includeEnd: boolean;
9750
- readonly frameCount: number;
9751
- readonly frameTimes: Float32Array;
9752
- readonly emitters: readonly Readonly<ParticleBakedMeshEmitter>[];
9753
- readonly storageByteLength: number;
9754
- }
9755
- /** Context supplied to an offline flipbook renderer/readback callback. */
9756
- interface ParticleFlipbookFrameContext {
9757
- readonly system: ParticleSystem;
9758
- readonly frameIndex: number;
9759
- readonly timeSeconds: number;
9760
- }
9761
- /** Options for packing real render-target captures into one flipbook atlas. */
9762
- interface ParticleFlipbookOptions extends ParticleBakeTimelineOptions {
9763
- /** Render and asynchronously read one tightly packed color attachment. */
9764
- readonly captureFrame: (context: Readonly<ParticleFlipbookFrameContext>) => RenderTargetColorAttachmentReadback | PromiseLike<RenderTargetColorAttachmentReadback>;
9765
- /** Atlas column count. Defaults to a near-square layout. */
9766
- readonly columns?: number;
9767
- /** Safety limit for either atlas dimension. Defaults to 16384. */
9768
- readonly maxTextureSize?: number;
9769
- /** Safety limit for the packed atlas payload. Defaults to 256 MiB. */
9770
- readonly maxAtlasByteLength?: number;
9771
- }
9772
- /** One tightly packed native-format flipbook atlas produced from real rendered frames. */
9773
- interface ParticleFlipbook {
9774
- readonly version: typeof PARTICLE_BAKE_VERSION;
9775
- readonly definitionHash: string;
9776
- readonly seed: number;
9777
- readonly duration: number;
9778
- readonly frameRate: number;
9779
- readonly startTime: number;
9780
- readonly includeEnd: boolean;
9781
- readonly frameCount: number;
9782
- readonly frameTimes: Float32Array;
9783
- readonly frameWidth: number;
9784
- readonly frameHeight: number;
9785
- readonly columns: number;
9786
- readonly rows: number;
9787
- readonly width: number;
9788
- readonly height: number;
9789
- readonly format: RenderTargetColorFormat;
9790
- readonly bytesPerPixel: number;
9791
- readonly data: Uint8Array;
9792
- /** Top-left atlas-space `[uMin, vMin, uMax, vMax]` for each frame. */
9793
- readonly frameUVs: Float32Array;
9794
- readonly storageByteLength: number;
9795
- }
9796
-
9797
- /** One application-visible particle event materialized only at a batch boundary. */
9798
- interface ParticleEventRecord {
9799
- readonly name: string;
9800
- readonly emitter: string;
9801
- readonly stableId: number;
9802
- readonly position: ParticleVector3;
9803
- readonly velocity: ParticleVector3;
9804
- }
9805
- /** Bounded asynchronous aggregate returned to application code. */
9806
- interface ParticleEventAggregate {
9807
- readonly events: readonly Readonly<ParticleEventRecord>[];
9808
- readonly counts: Readonly<Record<string, number>>;
9809
- readonly droppedCount: number;
9810
- readonly remainingCount: number;
9811
- }
9812
-
9813
- /** Current in-memory deterministic particle simulation cache format. */
9814
- declare const PARTICLE_SIMULATION_CACHE_VERSION: 1;
9815
- /**
9816
- * Opaque reusable in-memory checkpoint for deterministic particle replay.
9817
- *
9818
- * A cache is intentionally bound to the immutable definition, compiled plan, seed, parameter-set
9819
- * identity/revision, and event-readback capacity from which it was captured. It is not a serialized
9820
- * asset; use definition serialization for persistence and particle baking for portable output.
9821
- */
9822
- interface ParticleSimulationCache {
9823
- readonly version: typeof PARTICLE_SIMULATION_CACHE_VERSION;
9824
- readonly definitionHash: string;
9825
- readonly compiledPlanHash: string;
9826
- readonly seed: number;
9827
- readonly parameterRevision: number;
9828
- readonly elapsedSeconds: number;
9829
- readonly emitterCount: number;
9830
- /** Copied typed-array storage retained by this cache, excluding JavaScript metadata. */
9831
- readonly storageByteLength: number;
9832
- }
9833
-
9834
- /** Construction parameters for a runtime particle scene node. */
9835
- interface ParticleSystemParameters extends NodeParameters {
9836
- readonly definition: ParticleSystemDefinition;
9837
- readonly seed?: number;
9838
- readonly autoPlay?: boolean;
9839
- readonly timeScale?: number;
9840
- /** Live typed values used by bindable emission and initialization fields. */
9841
- readonly parameters?: ParticleParameterSet;
9842
- /** Stable identifier used by deterministic frame-wide particle budgeting. */
9843
- readonly budgetId?: string;
9844
- /** Higher values win budget allocation before distance and identifier tie-breaks. */
9845
- readonly budgetPriority?: number;
9846
- /** Optional compile target. Omit for a portable CPU-first plan. */
9847
- readonly compilationEnvironment?: Readonly<ParticleCompilationEnvironment>;
9848
- /** Maximum materialized CPU events retained for bounded asynchronous application reads. */
9849
- readonly eventReadbackCapacity?: number;
9850
- }
9851
- /** Options for an explicit particle simulation advance. */
9852
- interface ParticleSystemSimulateOptions {
9853
- readonly fixedStep?: number;
9854
- }
9855
- /** Deterministic manual emission targeting the first or a named emitter. */
9856
- interface ParticleSystemEmitCommand {
9857
- readonly emitter?: string;
9858
- readonly count: number;
9859
- readonly position?: ParticleVector3;
9860
- readonly velocity?: ParticleVector3;
9861
- }
9862
- /** Runtime scene node for immutable compiled particle-system definitions. */
9863
- declare class ParticleSystem extends Node {
9864
- #private;
9865
- static readonly typeName = "ParticleSystem";
9866
- className: string;
9867
- readonly definition: ParticleSystemDefinition;
9868
- readonly compiledPlan: Readonly<ParticleCompiledPlan>;
9869
- readonly seed: number;
9870
- readonly parameters: ParticleParameterSet;
9871
- readonly budgetId: string;
9872
- readonly budgetPriority: number;
9873
- constructor(parameters: Readonly<ParticleSystemParameters>);
9874
- /** Whether Stage updates currently advance this particle system. */
9875
- get playing(): boolean;
9876
- /** Scaled runtime age in seconds, excluding prewarm. */
9877
- get elapsedSeconds(): number;
9878
- /** Total dense alive count across CPU/stateless emitters; GPU plans avoid count readback. */
9879
- get aliveCount(): number;
9880
- /** Whether the compiled system contains renderer-owned stateful WebGPU emitters. @internal */
9881
- get hasGPUEmitters(): boolean;
9882
- /** Whether a GPU emitter contributes opaque or alpha-masked advanced draws. @internal */
9883
- get hasGPUOpaqueRenderers(): boolean;
9884
- /** Whether this system needs a sampled Forward depth texture for GPU simulation/raster. @internal */
9885
- get requiresGPUSampledDepth(): boolean;
9886
- /** Whether any GPU emitter has simulation or spawn work waiting for graph recording. @internal */
9887
- get hasPendingGPUWork(): boolean;
9888
- /** Whether this node contributes a visible GPU draw for one camera. @internal */
9889
- isGPUVisible(camera: Camera): boolean;
9890
- /** True after all non-looping emitters finished and their dense alive ranges became empty. */
9891
- get completed(): boolean;
9892
- /** Bounded aggregate event diagnostics; no GPU or per-particle synchronous readback occurs. */
9893
- get eventDiagnostics(): Readonly<{
9894
- pendingCount: number;
9895
- droppedCount: number;
9896
- }>;
9897
- /** Build current per-emitter requests for a frame-wide budget allocation. @internal */
9898
- createBudgetRequests(camera?: Camera): readonly Readonly<ParticleBudgetRequest>[];
9899
- /** Apply one complete set of frame-wide budget decisions. @internal */
9900
- applyBudgetDecisions(decisions: readonly Readonly<ParticleBudgetDecision>[]): this;
9901
- get timeScale(): number;
9902
- set timeScale(value: number);
9903
- play(): this;
9904
- pause(): this;
9905
- stop(): this;
9906
- restart(): this;
9907
- /** Reset simulation and authored node state before a pool lease. @internal */
9908
- resetForPool(parameters: Readonly<ParticleSystemParameters>): this;
9909
- /** Advance explicitly in seconds even when playback is paused. */
9910
- simulate(seconds: number, options?: Readonly<ParticleSystemSimulateOptions>): this;
9911
- /** Queue deterministic manual emission on the first or named emitter. */
9912
- emit(count: number, emitter?: string): this;
9913
- emit(command: Readonly<ParticleSystemEmitCommand>): this;
9914
- /** Dispatch a named gameplay event without admitting arbitrary simulation callbacks. */
9915
- sendEvent(name: string, payload?: unknown): this;
9916
- /** Materialize at most `maxEvents` from compact CPU event buffers on an async boundary. */
9917
- readEvents(maxEvents?: number): Promise<ParticleEventAggregate>;
9918
- /** Deterministic dense-state hash for replay and regression tests. */
9919
- stateHash(emitter?: string): string;
9920
- /**
9921
- * Bake stable-ID-sorted frame-major instance streams for authored mesh emitters.
9922
- *
9923
- * The system is restored to its exact simulation checkpoint after the synchronous bake.
9924
- */
9925
- bakeMeshCache(options: Readonly<ParticleMeshCacheOptions>): ParticleMeshCache;
9926
- /**
9927
- * Bake real render-target readbacks into a tightly packed flipbook atlas.
9928
- *
9929
- * The callback owns rendering and asynchronous readback; the system owns deterministic timeline
9930
- * advancement and restores its exact checkpoint after completion or failure.
9931
- */
9932
- bakeFlipbook(options: Readonly<ParticleFlipbookOptions>): Promise<ParticleFlipbook>;
9933
- /**
9934
- * Capture one reusable deterministic replay checkpoint without GPU readback.
9935
- *
9936
- * Stateful GPU emitters are rejected because their authoritative state is device-resident.
9937
- * Stateless GPU emitters capture only absolute reconstruction time.
9938
- */
9939
- captureSimulation(): ParticleSimulationCache;
9940
- /** Restore a compatible checkpoint and make its simulation state current. */
9941
- restoreSimulation(cache: ParticleSimulationCache): this;
9942
- update(deltaTimeMilliseconds: number): void;
9943
- clone(isChild?: boolean): ParticleSystem;
9944
- destroy(renderer?: Renderer, destroyTextures?: boolean): this;
9945
- /** Allocate renderer-owned GPU state before the renderer enters its frame transaction. @internal */
9946
- prepareGPU(renderer: RendererContract): void;
9947
- /** Refresh per-camera CPU sort and topology streams before scene collection. @internal */
9948
- prepareView(camera: Camera): void;
9949
- /** Record GPU simulation and storage-raster passes through the active Forward graph. @internal */
9950
- recordGPU(context: RenderPipelineContext, color: RenderGraphTextureHandle, depth: RenderGraphTextureHandle | null, drawVisible: boolean, phase: 'opaque' | 'transparent'): void;
9951
- /** Commit staged GPU clocks only after the enclosing graph submission succeeds. @internal */
9952
- gpuFrameSubmitted(frameIndex: number): void;
9953
- /** Preserve queued GPU commands and roll the double-buffer index back on failure. @internal */
9954
- gpuFrameDiscarded(frameIndex: number): void;
9955
- private createRuntime;
9956
- private updateWorldContext;
9957
- private advance;
9958
- private advanceWithCulling;
9959
- private runtimeVisible;
9960
- private hierarchyVisible;
9961
- private runtimeBoundsVisible;
9962
- private syncWriters;
9963
- private prewarmEmitters;
9964
- private collectCPUEvents;
9965
- private updateCompletion;
9966
- private advanceRuntime;
9967
- private materializeStatelessCPU;
9968
- private findStage;
9969
- }
9970
-
9971
- /** Current deterministic external particle preview command protocol. */
9972
- declare const PARTICLE_PREVIEW_PROTOCOL_VERSION: 1;
9973
- /** Commands accepted by `ParticleAuthoringPreviewController`. */
9974
- type ParticleAuthoringPreviewCommand = 'compile' | 'play' | 'pause' | 'restart' | 'seek' | 'step' | 'inspect' | 'dispose';
9975
- interface ParticleAuthoringPreviewRequestBase {
9976
- readonly protocolVersion: typeof PARTICLE_PREVIEW_PROTOCOL_VERSION;
9977
- readonly requestId: string;
9978
- readonly command: ParticleAuthoringPreviewCommand;
9979
- }
9980
- /** Compile and install one external authoring graph for preview. */
9981
- interface ParticleAuthoringPreviewCompileRequest extends ParticleAuthoringPreviewRequestBase {
9982
- readonly command: 'compile';
9983
- readonly graph: Readonly<ParticleAuthoringGraph>;
9984
- readonly seed?: number;
9985
- }
9986
- /** Playback/control request without a numeric payload. */
9987
- interface ParticleAuthoringPreviewControlRequest extends ParticleAuthoringPreviewRequestBase {
9988
- readonly command: 'play' | 'pause' | 'restart' | 'inspect' | 'dispose';
9989
- }
9990
- /** Deterministically seek from authored start/prewarm state. */
9991
- interface ParticleAuthoringPreviewSeekRequest extends ParticleAuthoringPreviewRequestBase {
9992
- readonly command: 'seek';
9993
- readonly timeSeconds: number;
9994
- }
9995
- /** Advance one explicit preview step regardless of play/pause state. */
9996
- interface ParticleAuthoringPreviewStepRequest extends ParticleAuthoringPreviewRequestBase {
9997
- readonly command: 'step';
9998
- readonly deltaSeconds: number;
9999
- }
10000
- /** Closed request union transported between an external editor and preview host. */
10001
- type ParticleAuthoringPreviewRequest = ParticleAuthoringPreviewCompileRequest | ParticleAuthoringPreviewControlRequest | ParticleAuthoringPreviewSeekRequest | ParticleAuthoringPreviewStepRequest;
10002
- /** Compact backend-neutral preview state; no GPU particle readback is performed. */
10003
- interface ParticleAuthoringPreviewState {
10004
- readonly status: 'empty' | 'ready' | 'playing' | 'completed' | 'disposed';
10005
- readonly timeSeconds: number;
10006
- readonly definitionHash: string | null;
10007
- readonly compiledPlanHash: string | null;
10008
- readonly seed: number | null;
10009
- readonly aliveCount: number;
10010
- readonly stateHash: string | null;
10011
- }
10012
- /** Structured response returned for every accepted or rejected preview command. */
10013
- interface ParticleAuthoringPreviewResponse {
10014
- readonly protocolVersion: typeof PARTICLE_PREVIEW_PROTOCOL_VERSION;
10015
- readonly requestId: string;
10016
- readonly command: ParticleAuthoringPreviewCommand | 'invalid';
10017
- readonly success: boolean;
10018
- readonly diagnostics: readonly Readonly<ParticleAuthoringDiagnostic>[];
10019
- readonly state: Readonly<ParticleAuthoringPreviewState>;
10020
- /** Present after successful compilation so external inspectors can rebuild without runtime access. */
10021
- readonly ir?: Readonly<ParticleAuthoringIR>;
10022
- }
10023
- /** Factory used when a preview host needs custom ParticleSystem construction/attachment. */
10024
- type ParticleAuthoringPreviewSystemFactory = (definition: ParticleSystemDefinition, seed: number, compilationEnvironment?: Readonly<ParticleCompilationEnvironment>) => ParticleSystem;
10025
- /** Preview host integration hooks and compiler resource/environment policy. */
10026
- interface ParticleAuthoringPreviewControllerOptions {
10027
- readonly compileOptions?: Readonly<ParticleAuthoringCompileOptions>;
10028
- readonly createSystem?: ParticleAuthoringPreviewSystemFactory;
10029
- /** Release renderer/scene ownership when a compiled preview is replaced or disposed. */
10030
- readonly disposeSystem?: (system: ParticleSystem) => void;
10031
- }
10032
- /**
10033
- * Deterministic preview command adapter. The controller owns simulation time and never renders;
10034
- * hosts render the current `system` through the ordinary Renderer/Stage contract.
10035
- */
10036
- declare class ParticleAuthoringPreviewController {
10037
- #private;
10038
- constructor(options?: Readonly<ParticleAuthoringPreviewControllerOptions>);
10039
- /** Current preview node for host-owned scene attachment/rendering. */
10040
- get system(): ParticleSystem | null;
10041
- /** Validate and execute one protocol request without throwing authoring errors. */
10042
- handle(request: unknown): Readonly<ParticleAuthoringPreviewResponse>;
10043
- private compile;
10044
- private withSystem;
10045
- private releaseSystem;
10046
- private state;
10047
- private response;
10048
- private parseRequest;
10049
- }
10050
-
10051
- /** Fixed field types accepted by a typed particle event channel. */
10052
- type ParticleEventFieldType = 'float' | 'uint' | 'boolean' | 'vec2' | 'vec3' | 'vec4' | 'color';
10053
- /** Runtime values accepted by typed event fields. */
10054
- type ParticleEventFieldValue = number | boolean | ParticleVector2 | ParticleVector3 | ParticleVector4;
10055
- /** Stable field schema participating in an event channel's public contract. */
10056
- type ParticleEventChannelSchema = Readonly<Record<string, ParticleEventFieldType>>;
10057
- /** Small typed payload submitted by applications or aggregate event routing. */
10058
- type ParticleEventChannelPayload = Readonly<Record<string, ParticleEventFieldValue>>;
10059
- /** Construction parameters for a bounded typed data channel. */
10060
- interface ParticleEventChannelParameters<Payload extends ParticleEventChannelPayload> {
10061
- readonly schema: Readonly<{
10062
- [Name in keyof Payload]: ParticleEventFieldType;
10063
- }>;
10064
- readonly capacity: number;
10065
- readonly overflow?: ParticleEventOverflowPolicy;
10066
- readonly name?: string;
10067
- }
10068
- /**
10069
- * Bounded typed event/data channel for sharing impact-style bursts with a resident particle
10070
- * system. Overflow is explicit and draining is batched.
10071
- */
10072
- declare class ParticleEventChannel<Payload extends ParticleEventChannelPayload> {
10073
- #private;
10074
- readonly name: string;
10075
- readonly schema: Readonly<ParticleEventChannelSchema>;
10076
- readonly capacity: number;
10077
- readonly overflow: ParticleEventOverflowPolicy;
10078
- constructor(parameters: Readonly<ParticleEventChannelParameters<Payload>>);
10079
- get size(): number;
10080
- get droppedCount(): number;
10081
- submit(payload: Readonly<Payload>): boolean;
10082
- drain(maxCount?: number): readonly Readonly<Payload>[];
10083
- /** Drain position/velocity payloads into one resident emitter without creating systems. */
10084
- emitTo(system: ParticleSystem, options?: Readonly<{
10085
- emitter?: string;
10086
- count?: number;
10087
- positionField?: keyof Payload & string;
10088
- velocityField?: keyof Payload & string;
10089
- }>): number;
10090
- }
10091
-
10092
- /** Reuses stopped ParticleSystem nodes for large numbers of short-lived effects. */
10093
- declare class ParticleSystemPool {
10094
- #private;
10095
- constructor(capacity?: number);
10096
- get activeCount(): number;
10097
- get pooledCount(): number;
10098
- acquire(parameters: Readonly<ParticleSystemParameters>): ParticleSystem;
10099
- release(system: ParticleSystem, renderer?: Renderer): void;
10100
- destroy(renderer: Renderer): void;
10101
- }
10102
-
10103
9261
  interface BoxGeometryParameters extends GeometryParameters {
10104
9262
  width?: number;
10105
9263
  height?: number;
@@ -10661,114 +9819,6 @@ declare class UiButton extends SlicedSprite {
10661
9819
  private updateState;
10662
9820
  }
10663
9821
 
10664
- /** Sample interpretation supported by whole-subresource compute graph textures. */
10665
- type ComputeTextureSampleType = 'float' | 'unfilterable-float' | 'depth';
10666
- /** Compute graph textures currently expose one complete two-dimensional subresource. */
10667
- type ComputeTextureViewDimension = '2d';
10668
- /** Compute storage textures currently expose one complete two-dimensional subresource. */
10669
- type ComputeStorageTextureViewDimension = '2d';
10670
- /** Sample interpretation supported by storage-aware graphics shaders. */
10671
- type ShaderTextureSampleType = ComputeTextureSampleType | 'sint' | 'uint';
10672
- /** Texture views supported by the Material-backed storage graphics path. */
10673
- type ShaderTextureViewDimension = ComputeTextureViewDimension | '2d-array' | '3d' | 'cube';
10674
- /** Public color formats that can be requested for a storage-texture binding. */
10675
- type ComputeStorageTextureFormat = 'r32float' | 'rg32float' | 'rgba8unorm' | 'rgba16float' | 'rgba32float';
10676
- /** Graph initialization promise for a writable storage-buffer binding. */
10677
- type ComputeStorageBufferAccess = 'read-write' | 'write-discard';
10678
- /** Resource binding that a shader may only read. */
10679
- type ShaderReadBinding = Readonly<{
10680
- name: string;
10681
- group: number;
10682
- binding: number;
10683
- kind: 'uniform-buffer' | 'read-only-storage-buffer';
10684
- minBindingSize?: number;
10685
- dynamicOffset?: boolean;
10686
- }> | Readonly<{
10687
- name: string;
10688
- group: number;
10689
- binding: number;
10690
- kind: 'sampled-texture';
10691
- sampleType: ShaderTextureSampleType;
10692
- viewDimension?: ShaderTextureViewDimension;
10693
- }> | Readonly<{
10694
- name: string;
10695
- group: number;
10696
- binding: number;
10697
- kind: 'sampler' | 'comparison-sampler';
10698
- }>;
10699
- /** Explicit binding ABI for one Direct WGSL compute shader. */
10700
- type ComputeShaderBinding = Readonly<{
10701
- name: string;
10702
- group: number;
10703
- binding: number;
10704
- kind: 'uniform-buffer' | 'read-only-storage-buffer';
10705
- minBindingSize?: number;
10706
- dynamicOffset?: boolean;
10707
- }> | Readonly<{
10708
- name: string;
10709
- group: number;
10710
- binding: number;
10711
- kind: 'sampled-texture';
10712
- sampleType: ComputeTextureSampleType;
10713
- viewDimension?: ComputeTextureViewDimension;
10714
- }> | Readonly<{
10715
- name: string;
10716
- group: number;
10717
- binding: number;
10718
- kind: 'sampler' | 'non-filtering-sampler' | 'comparison-sampler';
10719
- }> | Readonly<{
10720
- name: string;
10721
- group: number;
10722
- binding: number;
10723
- kind: 'storage-buffer';
10724
- /** Graph access promise; both modes use a WGSL `read_write` storage declaration. */
10725
- access: ComputeStorageBufferAccess;
10726
- minBindingSize?: number;
10727
- dynamicOffset?: boolean;
10728
- }> | Readonly<{
10729
- name: string;
10730
- group: number;
10731
- binding: number;
10732
- kind: 'storage-texture';
10733
- /**
10734
- * WGSL access mode. Declaring this binding also promises that the pass completely
10735
- * replaces the bound texture subresource before a later graph read.
10736
- */
10737
- access: 'write-only';
10738
- format: ComputeStorageTextureFormat;
10739
- viewDimension?: ComputeStorageTextureViewDimension;
10740
- }>;
10741
- /** Immutable source, entry point, workgroup size, and binding ABI for {@link ComputeShader}. */
10742
- interface ComputeShaderDescriptor {
10743
- /** Optional diagnostic label. */
10744
- readonly label?: string;
10745
- /** Direct WGSL source containing exactly the declared compute entry point and resources. */
10746
- readonly source: string;
10747
- /** Compute entry-point name. Defaults to `main`. */
10748
- readonly entryPoint?: string;
10749
- /** One to three positive literal dimensions, which must match `@workgroup_size`. */
10750
- readonly workgroupSize: readonly [number, number?, number?];
10751
- /** Complete explicit resource ABI; entries are snapshotted and sorted by group/binding. */
10752
- readonly bindings: readonly ComputeShaderBinding[];
10753
- }
10754
- /** Normalized three-dimensional compute workgroup size. */
10755
- type NormalizedComputeWorkgroupSize = readonly [number, number, number];
10756
- /** Immutable, backend-neutral Direct WGSL compute shader configuration. */
10757
- declare class ComputeShader {
10758
- /** Stable diagnostic label, or an empty string. */
10759
- readonly label: string;
10760
- /** Validated Direct WGSL source. */
10761
- readonly source: string;
10762
- /** Validated compute entry point. */
10763
- readonly entryPoint: string;
10764
- /** Normalized workgroup dimensions. */
10765
- readonly workgroupSize: NormalizedComputeWorkgroupSize;
10766
- /** Immutable bindings in group/binding order. */
10767
- readonly bindings: readonly ComputeShaderBinding[];
10768
- /** Snapshot a Direct WGSL compute shader contract without creating device objects. */
10769
- constructor(descriptor: Readonly<ComputeShaderDescriptor>);
10770
- }
10771
-
10772
9822
  /** Value accepted by a fixed WGSL pipeline override constant. */
10773
9823
  type ComputePipelineConstant = number | boolean;
10774
9824
  /** Immutable compute pipeline configuration shared across renderer-local caches. */
@@ -10854,37 +9904,6 @@ declare class ComputeSampler {
10854
9904
  constructor(descriptor?: Readonly<ComputeSamplerDescriptor>);
10855
9905
  }
10856
9906
 
10857
- /** Constrained GLSL ES 3.10 graphics source and readonly resource ABI. */
10858
- interface StorageGraphicsShaderDescriptor {
10859
- /** Optional diagnostic label. */
10860
- readonly label?: string;
10861
- /** GLSL ES 3.10 vertex source; storage blocks must be `readonly` and `std430`. */
10862
- readonly vertexSource: string;
10863
- /** GLSL ES 3.10 fragment source; storage blocks must be `readonly` and `std430`. */
10864
- readonly fragmentSource: string;
10865
- /** Complete read-only resource ABI shared by the two graphics stages. */
10866
- readonly bindings: readonly ShaderReadBinding[];
10867
- }
10868
- /**
10869
- * Immutable WebGPU-only graphics shader configuration for readonly storage-buffer rendering.
10870
- *
10871
- * Sources use the constrained GLSL ES 3.10 contract. Compilation still runs through the shared
10872
- * engine GLSL preprocessing and Naga translation path; this object never accepts hand-written
10873
- * graphics WGSL.
10874
- */
10875
- declare class StorageGraphicsShader {
10876
- /** Stable diagnostic label, or an empty string. */
10877
- readonly label: string;
10878
- /** Immutable GLSL ES 3.10 vertex source. */
10879
- readonly vertexSource: string;
10880
- /** Immutable GLSL ES 3.10 fragment source. */
10881
- readonly fragmentSource: string;
10882
- /** Immutable bindings in group/binding order. */
10883
- readonly bindings: readonly ShaderReadBinding[];
10884
- /** Snapshot a WebGPU-only storage-aware graphics shader contract. */
10885
- constructor(descriptor: Readonly<StorageGraphicsShaderDescriptor>);
10886
- }
10887
-
10888
9907
  /** Scalar WGSL storage-address-space types supported by {@link StorageLayout}. */
10889
9908
  type StorageScalarType = 'f32' | 'i32' | 'u32' | 'atomic<i32>' | 'atomic<u32>';
10890
9909
  /** Two-, three-, and four-component WGSL storage vector types. */
@@ -11205,30 +10224,62 @@ interface ScreenSpaceReflectionsOptions {
11205
10224
  readonly historyWeight?: number;
11206
10225
  /** Maximum relative reprojected view-depth error. Defaults to 0.03. */
11207
10226
  readonly depthThreshold?: number;
11208
- /** Linear HDR reflection multiplier. Defaults to 1. */
10227
+ /** Linear HDR multiplier applied to SSR radiance, without scaling fallback removal. Defaults to 1. */
11209
10228
  readonly intensity?: number;
11210
10229
  }
11211
10230
 
10231
+ /** Quality preset used when an individual GTAO sampling control is omitted. */
10232
+ type GroundTruthAmbientOcclusionQuality = 'low' | 'medium' | 'high' | 'ultra';
10233
+ /** Normal source used for GTAO horizon integration and edge rejection. */
10234
+ type GroundTruthAmbientOcclusionNormalSource = 'material' | 'geometry' | 'hybrid';
11212
10235
  /** Production controls for ground-truth ambient occlusion. */
11213
10236
  interface GroundTruthAmbientOcclusionOptions {
11214
- /** Internal AO resolution relative to opaque rendering. Defaults to 0.5. */
10237
+ /** Sampling preset. Individual resolution/direction/step controls override it. Defaults to high. */
10238
+ readonly quality?: GroundTruthAmbientOcclusionQuality;
10239
+ /** Internal AO resolution relative to opaque rendering. Defaults to the quality preset. */
11215
10240
  readonly resolutionScale?: number;
11216
10241
  /** View-space horizon-search radius. Defaults to 2. */
11217
10242
  readonly radius?: number;
11218
10243
  /** Fraction of the radius at which distance falloff begins. Defaults to 0.6. */
11219
10244
  readonly falloffStart?: number;
11220
- /** Thin-surface tolerance in view-space units. Defaults to 0.05. */
10245
+ /** View-space self-intersection rejection distance. Defaults to 0.05. */
11221
10246
  readonly thickness?: number;
11222
- /** Number of rotated horizon slices per pixel. Defaults to 6. */
11223
- readonly directionCount?: 4 | 6 | 8;
11224
- /** Samples evaluated on each side of a horizon slice. Defaults to 4. */
11225
- readonly stepCount?: 3 | 4 | 5 | 6;
10247
+ /** Blend between a thin depth field and a solid occluder. Defaults to 0.5. */
10248
+ readonly thicknessBlend?: number;
10249
+ /** Number of rotated horizon slices per pixel. Defaults to the quality preset. */
10250
+ readonly directionCount?: 2 | 3 | 4 | 6 | 8;
10251
+ /** Samples evaluated on each side of a horizon slice. Defaults to the quality preset. */
10252
+ readonly stepCount?: 3 | 4 | 5 | 6 | 8 | 10 | 12;
11226
10253
  /** Contrast applied to the physically normalized visibility. Defaults to 1.2. */
11227
10254
  readonly power?: number;
10255
+ /** Occlusion intensity before contrast. Defaults to 1. */
10256
+ readonly intensity?: number;
10257
+ /** Angular self-occlusion bias in radians. Defaults to 0.035. */
10258
+ readonly bias?: number;
10259
+ /** Radius of the additional contact-occlusion lobe, relative to radius. Defaults to 0.2. */
10260
+ readonly contactRadiusScale?: number;
10261
+ /** Strength of the contact-occlusion lobe. Defaults to 0.35. */
10262
+ readonly contactStrength?: number;
10263
+ /** Normal source used by the horizon search. Defaults to hybrid. */
10264
+ readonly normalSource?: GroundTruthAmbientOcclusionNormalSource;
10265
+ /** Geometric-normal contribution in hybrid mode. Defaults to 0.65. */
10266
+ readonly geometricNormalWeight?: number;
10267
+ /** Strength of bent-normal redirection. Defaults to 1. */
10268
+ readonly bentNormalStrength?: number;
10269
+ /** Strength of color-aware multi-bounce diffuse AO. Defaults to 1. */
10270
+ readonly multiBounce?: number;
10271
+ /** View distance where AO starts fading. Defaults to 100. */
10272
+ readonly distanceFadeStart?: number;
10273
+ /** View distance where AO is fully disabled. Defaults to 200. */
10274
+ readonly distanceFadeEnd?: number;
10275
+ /** Screen-edge fade width in AO pixels. Defaults to 2. */
10276
+ readonly edgeFadePixels?: number;
11228
10277
  /** Maximum accepted temporal contribution. Defaults to 0.9. */
11229
10278
  readonly historyWeight?: number;
11230
10279
  /** Maximum relative reprojected view-depth error. Defaults to 0.03. */
11231
10280
  readonly depthThreshold?: number;
10281
+ /** Minimum normal agreement accepted by temporal reprojection. Defaults to 0.82. */
10282
+ readonly normalThreshold?: number;
11232
10283
  }
11233
10284
  /**
11234
10285
  * Portable production GTAO for the shared Forward pipeline.
@@ -11440,6 +10491,41 @@ declare class AutoExposure implements ForwardRenderPipelineFeature {
11440
10491
  readDiagnostics(): Promise<Readonly<AutoExposureDiagnostics>>;
11441
10492
  }
11442
10493
 
10494
+ /** GPU receiver-driven shadow-page allocation and directional clipmap controls. */
10495
+ interface VirtualShadowMapOptions {
10496
+ /** Square virtual resolution for every directional clipmap level. Defaults to 4096. */
10497
+ readonly virtualResolution?: number;
10498
+ /** Square physical page edge in pixels. Defaults to 128. */
10499
+ readonly pageSize?: number;
10500
+ /** Shared physical depth-page capacity. Defaults to 32. */
10501
+ readonly physicalPageCount?: number;
10502
+ /** Maximum missing or invalidated pages rendered by one frame. Defaults to 16. */
10503
+ readonly maxPageUpdatesPerFrame?: number;
10504
+ /** Camera-centered directional clipmap levels. Defaults to 4. */
10505
+ readonly directionalClipmapLevels?: number;
10506
+ /** Full world-space width covered by the finest clipmap. Defaults to 64. */
10507
+ readonly firstDirectionalClipmapExtent?: number;
10508
+ }
10509
+ /** On-demand counters copied only when diagnostics are explicitly requested. */
10510
+ interface VirtualShadowMapDiagnostics {
10511
+ /** Unique logical pages requested by the latest submitted receiver pass. */
10512
+ readonly requestedPageCount: number;
10513
+ /** Physical pages whose depth contents were refreshed by the latest submitted frame. */
10514
+ readonly renderedPageCount: number;
10515
+ /** Requested or dirty pages postponed by the configured update/physical-page budgets. */
10516
+ readonly deferredPageCount: number;
10517
+ /** Valid physical residency records retained after the latest submitted allocation. */
10518
+ readonly residentPageCount: number;
10519
+ /** Resident physical pages remapped to another logical identity. */
10520
+ readonly evictionCount: number;
10521
+ /** Unique logical pages touched by changed caster coverage. */
10522
+ readonly invalidatedPageCount: number;
10523
+ /** Configured physical depth-page capacity. */
10524
+ readonly physicalPageCapacity: number;
10525
+ /** Configured camera-centered clipmap levels per directional light. */
10526
+ readonly directionalClipmapLevelCount: number;
10527
+ }
10528
+
11443
10529
  /** Rendering budgets for the physical atmosphere and volumetric clouds. */
11444
10530
  type AtmosphereWeatherQuality = 'low' | 'medium' | 'high' | 'ultra';
11445
10531
  /** Optional diagnostic texture shown in place of the weather composition. */
@@ -11558,6 +10644,22 @@ interface GPUSceneBucket {
11558
10644
  /** Optional coarse levels ordered from smallest to largest projected-radius threshold. */
11559
10645
  readonly lods?: readonly GPUSceneLOD[];
11560
10646
  }
10647
+ /** One concrete scene shader topology requested before the first application frame. */
10648
+ interface ClusteredMaterialVariantManifestEntry {
10649
+ /** Exemplar carrying the exact geometry deformation and PBR material topology. */
10650
+ readonly mesh: Mesh;
10651
+ /** Also warm the receive-shadow variant. Defaults to the exemplar's current setting. */
10652
+ readonly shadowed?: boolean;
10653
+ }
10654
+ /** Bounded startup manifest for clustered scene shader translation and diagnostics. */
10655
+ interface ClusteredMaterialVariantManifest {
10656
+ /** Exact mesh/material exemplars whose native clustered variants are required at startup. */
10657
+ readonly entries: readonly Readonly<ClusteredMaterialVariantManifestEntry>[];
10658
+ /** Maximum unique native scene variants, including runtime discoveries. Defaults to 64. */
10659
+ readonly maxVariants?: number;
10660
+ /** Variants translated before yielding back to renderer initialization. Defaults to 4. */
10661
+ readonly warmupBatchSize?: number;
10662
+ }
11561
10663
  /** Construction options for the WebGPU high-end GPU Scene and Clustered Forward+ pipeline. */
11562
10664
  interface ClusteredForwardPlusPipelineOptions {
11563
10665
  /**
@@ -11565,7 +10667,10 @@ interface ClusteredForwardPlusPipelineOptions {
11565
10667
  * other scene meshes remain renderable through the shared Forward compatibility path.
11566
10668
  */
11567
10669
  readonly buckets: readonly GPUSceneBucket[];
11568
- /** Stable GPU Scene object capacity. Excess meshes use the Forward fallback. Defaults to 16,384. */
10670
+ /**
10671
+ * Stable fixed-bucket GPU Scene object capacity. Compatible excess PBR uses the direct native
10672
+ * clustered lane; unsupported content uses Forward compatibility. Defaults to 16,384.
10673
+ */
11569
10674
  readonly maxObjects?: number;
11570
10675
  /** GPU light-database capacity. Extra traversal-order lights are deterministically dropped. */
11571
10676
  readonly maxLights?: number;
@@ -11583,6 +10688,11 @@ interface ClusteredForwardPlusPipelineOptions {
11583
10688
  readonly maxViewportHeight?: number;
11584
10689
  /** Enable previous-frame Hi-Z occlusion. Defaults to true. */
11585
10690
  readonly hiZ?: boolean;
10691
+ /**
10692
+ * GPU receiver-driven virtual directional shadows with arbitrary page-table remapping and
10693
+ * camera-centered clipmaps. Requires `hiZ`; disabled by default.
10694
+ */
10695
+ readonly virtualShadows?: Readonly<VirtualShadowMapOptions> | false;
11586
10696
  /** Bloom contribution mixed into the final display transform. Defaults to 0.7. */
11587
10697
  readonly bloomStrength?: number;
11588
10698
  /** Exposure multiplier applied before the ACES display transform. Defaults to 1. */
@@ -11618,6 +10728,8 @@ interface ClusteredForwardPlusPipelineOptions {
11618
10728
  * This WebGPU path uses the complete 3D cluster light grid and submission-aware history.
11619
10729
  */
11620
10730
  readonly volumetricLighting?: Readonly<VolumetricLightingOptions> | false;
10731
+ /** Optional bounded material/deformation topology manifest translated during async creation. */
10732
+ readonly variantManifest?: Readonly<ClusteredMaterialVariantManifest>;
11621
10733
  }
11622
10734
  /** On-demand GPU counters plus current CPU database occupancy. */
11623
10735
  interface ClusteredForwardPlusDiagnostics {
@@ -11625,6 +10737,10 @@ interface ClusteredForwardPlusDiagnostics {
11625
10737
  readonly objectCount: number;
11626
10738
  /** Visible-layer meshes routed through the shared Forward compatibility fallback. */
11627
10739
  readonly fallbackObjectCount: number;
10740
+ /** Alpha-blended PBR meshes shaded from the Clustered Forward+ light database. */
10741
+ readonly clusteredTransparentObjectCount: number;
10742
+ /** Non-bucket opaque PBR meshes using native clustered lighting with shared deformation. */
10743
+ readonly clusteredDeformedObjectCount: number;
11628
10744
  /** Enabled supported lights uploaded to the current GPU light database. */
11629
10745
  readonly lightCount: number;
11630
10746
  /** Enabled supported lights rejected by the configured light capacity. */
@@ -11649,20 +10765,49 @@ interface ClusteredForwardPlusDiagnostics {
11649
10765
  readonly volumetricFroxelCount: number;
11650
10766
  /** Whether the latest submitted volumetric resolve consumed temporal history. */
11651
10767
  readonly volumetricHistoryUsed: boolean;
10768
+ /** Eight-by-eight SSR trace tiles containing at least one eligible receiver. */
10769
+ readonly screenSpaceReflectionActiveTileCount: number;
10770
+ /** Eligible SSR receiver pixels classified by the latest submitted frame. */
10771
+ readonly screenSpaceReflectionActivePixelCount: number;
10772
+ /** Eligible SSR receiver pixels that produced a valid screen-space hit. */
10773
+ readonly screenSpaceReflectionHitPixelCount: number;
10774
+ /** Eligible SSR receiver pixels that missed or left the screen. */
10775
+ readonly screenSpaceReflectionMissPixelCount: number;
10776
+ /** SSR misses whose hierarchy crossing could not be validated precisely. */
10777
+ readonly screenSpaceReflectionUncertainPixelCount: number;
10778
+ /** SSR candidates rejected because the hit surface faced away from the ray. */
10779
+ readonly screenSpaceReflectionBackfaceRejectedPixelCount: number;
10780
+ /** SSR temporal pixels that consumed valid surface- or hit-domain history. */
10781
+ readonly screenSpaceReflectionHistoryAcceptedPixelCount: number;
10782
+ /** SSR temporal pixels that rejected every available history candidate. */
10783
+ readonly screenSpaceReflectionHistoryRejectedPixelCount: number;
11652
10784
  /** Latest adapted exposure in EV stops, or zero when auto exposure is disabled. */
11653
10785
  readonly autoExposureEV: number;
11654
10786
  /** Latest histogram-derived target exposure in EV stops, or zero when disabled. */
11655
10787
  readonly autoExposureTargetEV: number;
10788
+ /** Unique manifest variants translated before renderer creation completed. */
10789
+ readonly warmedMaterialVariantCount: number;
10790
+ /** Unique native variants admitted by the configured runtime budget. */
10791
+ readonly activeMaterialVariantCount: number;
10792
+ /** Runtime candidates rejected after the unique variant budget was exhausted. */
10793
+ readonly materialVariantBudgetExceededCount: number;
10794
+ /** Configured unique clustered scene-variant ceiling. */
10795
+ readonly materialVariantBudget: number;
10796
+ /** CPU translation wall time spent in asynchronous warmup. */
10797
+ readonly materialVariantWarmupTimeMs: number;
10798
+ /** Latest on-demand virtual-shadow counters, or null when virtual shadows are disabled. */
10799
+ readonly virtualShadows: Readonly<VirtualShadowMapDiagnostics> | null;
11656
10800
  }
11657
10801
  /**
11658
10802
  * WebGPU-only high-end factory combining G0 GPU Scene/Hi-Z and L0 Clustered Forward+.
11659
10803
  *
11660
10804
  * Compatible registered bucket meshes bypass CPU frustum sorting and ordinary PreparedDraw
11661
- * creation. The GPU-driven path intentionally accepts opaque, unskinned, indexed triangle PBR
11662
- * buckets with scalar factors or common opaque PBR maps. Material surface evaluation and the BRDF
11663
- * are shared with ordinary Forward PBR; the clustered variant replaces only light-list selection
11664
- * and iteration. Unregistered meshes, runtime-incompatible bucket state, deformation,
11665
- * transparency, and object-capacity overflow use the shared Forward path in the same frame.
10805
+ * creation. Fixed indirect buckets accept opaque, unskinned, indexed triangle PBR geometry;
10806
+ * eligible deformed, layered, and globally sorted transparent PBR meshes use the native direct
10807
+ * storage-lighting lane. Material surface evaluation and the BRDF are shared with ordinary Forward
10808
+ * PBR; clustered variants replace only light-list selection and iteration. Unregistered meshes,
10809
+ * runtime-incompatible state, mixed compatibility-transparent queues, and object-capacity overflow
10810
+ * use the shared Forward path in the same frame.
11666
10811
  * Invalid initial bucket declarations and unsupported devices still fail closed.
11667
10812
  */
11668
10813
  declare class ClusteredForwardPlusPipelineFactory implements RenderPipelineFactory {
@@ -11673,11 +10818,42 @@ declare class ClusteredForwardPlusPipelineFactory implements RenderPipelineFacto
11673
10818
  readonly requirements: Readonly<RenderPipelineRequirements>;
11674
10819
  constructor(options: Readonly<ClusteredForwardPlusPipelineOptions>);
11675
10820
  /** Create one independent renderer-local GPU Scene and clustered-lighting runtime. */
11676
- create(context: RenderPipelineCreateContext): RenderPipeline;
10821
+ create(context: RenderPipelineCreateContext): Promise<RenderPipeline>;
11677
10822
  /** Read on-demand GPU counters when this factory is attached to exactly one live Renderer. */
11678
10823
  readDiagnostics(): Promise<Readonly<ClusteredForwardPlusDiagnostics>>;
11679
10824
  }
11680
10825
 
10826
+ /** Process-global symbol used by optional addons to attach renderer behavior across package copies. */
10827
+ declare const RENDER_NODE_EXTENSION: unique symbol;
10828
+ /** GPU graph contribution owned by an optional scene-node addon. */
10829
+ interface RenderNodeGPUExtension {
10830
+ /** Whether this contribution has an opaque or alpha-masked phase. */
10831
+ readonly hasOpaqueRenderers: boolean;
10832
+ /** Whether simulation or raster needs the current sampled scene depth. */
10833
+ readonly requiresSampledDepth: boolean;
10834
+ /** Whether graph work must run even when the contribution is outside the camera. */
10835
+ readonly hasPendingWork: boolean;
10836
+ /** Test view visibility without issuing render commands. */
10837
+ isVisible(camera: Camera): boolean;
10838
+ /** Record one opaque or transparent contribution through the active Render Graph. */
10839
+ record(context: RenderPipelineContext, color: RenderGraphTextureHandle, depth: RenderGraphTextureHandle | null, drawVisible: boolean, phase: 'opaque' | 'transparent'): void;
10840
+ /** Commit staged state only after the enclosing frame submission succeeds. */
10841
+ frameSubmitted(frameIndex: number): void;
10842
+ /** Roll back staged state after recording or submission is discarded. */
10843
+ frameDiscarded(frameIndex: number): void;
10844
+ }
10845
+ /** Optional render lifecycle implemented by addon-owned scene nodes. */
10846
+ interface RenderNodeExtension {
10847
+ /** Allocate or recover renderer-local resources before node updates and graph recording. */
10848
+ prepareRenderer?(renderer: RendererContract): void;
10849
+ /** Refresh camera-dependent streams before scene collection. */
10850
+ prepareView?(camera: Camera): void;
10851
+ /** Active GPU contribution, or `null` when this node uses ordinary scene rendering only. */
10852
+ readonly gpu: RenderNodeGPUExtension | null;
10853
+ }
10854
+ /** Read and validate an optional render-node extension without importing its addon package. */
10855
+ declare function getRenderNodeExtension(node: Node): RenderNodeExtension | null;
10856
+
11681
10857
  /** One graph-buffer range consumed by a storage binding. */
11682
10858
  interface ComputeBufferBinding {
11683
10859
  /** Frame-scoped graph buffer handle. */
@@ -12050,8 +11226,15 @@ interface SceneStorageBufferBinding {
12050
11226
  * explicit: it does not automatically rewrite built-in Basic/PBR shader source.
12051
11227
  */
12052
11228
  interface SceneStorageShaderVariant {
12053
- /** Storage-aware shader used by every direct mesh in this renderer list. */
11229
+ /** Default storage-aware shader and the canonical pass-global storage ABI. */
12054
11230
  readonly shader: StorageGraphicsShader;
11231
+ /**
11232
+ * Optional exact per-mesh variants applied without splitting the renderer list. This preserves
11233
+ * global transparent sorting while allowing geometry/material topology to select its compiled
11234
+ * shader. Every mapped shader must expose the same group-three readonly-storage ABI as
11235
+ * the default shader.
11236
+ */
11237
+ readonly shaderByMesh?: ReadonlyMap<Mesh, StorageGraphicsShader>;
12055
11238
  /** Positional ranges matching the shader's sorted readonly-storage binding order. */
12056
11239
  readonly buffers: readonly Readonly<SceneStorageBufferBinding>[];
12057
11240
  }
@@ -12845,6 +12028,11 @@ declare const semantic: {
12845
12028
  isDependMesh: boolean;
12846
12029
  notSupportInstanced: boolean;
12847
12030
  };
12031
+ MODELLAYERPARAMS: {
12032
+ get(mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): Uint32Array;
12033
+ isDependMesh: boolean;
12034
+ notSupportInstanced: boolean;
12035
+ };
12848
12036
  VIEW: {
12849
12037
  get(_mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
12850
12038
  };
@@ -15830,6 +15018,6 @@ declare const math: {
15830
15018
  nextPowerOfTwo(value: number): number;
15831
15019
  };
15832
15020
 
15833
- export { AmbientLight, Animation, AnimationStates, AreaLight, AtmosphereWeatherState, AutoExposure, AxisHelper, AxisNetHelper, BUILTIN_UNIFORM_BLOCK_BINDING_COUNT, BasicLoader, BasicMaterial, Bloom, BoxGeometry, Cache, Camera, Camera2D, CameraHelper, ClusteredForwardPlusPipelineFactory, Color, ColorUber, ComputeKernel, ComputeRenderPass, ComputeSampler, ComputeShader, CubeTexture, CubeTextureLoader, DEFAULT_2D_LAYER, DEFAULT_MATERIAL_PIPELINE_STATE, DEFAULT_MATERIAL_TEXTURE_CHANNELS, DataTexture, DirectionalLight, Euler, EulerNotifier, EventDispatcher, Fog, ForwardRenderPipelineFactory, Frustum, FullscreenRenderPass, GLTFExtensions_d as GLTFExtensions, GLTFLoader, GLTFParser, GPUDrivenRenderPass, Geometry, GeometryData, GeometryMaterial, GroundTruthAmbientOcclusion, HDRLoader, HiloEvent, KTXLoader, LazyTexture, Light, LightManager, LoadCache, LoadQueue, LoadState, Loader, LogLevel, Logger, MATERIAL_TEXTURE_SLOT_COUNT, MaterialAttributeSemantic, MaterialBlendPreset, MaterialCompiler, MaterialDefinition, MaterialInstance, MaterialTextureSemantic, MaterialTextureSlot, MaterialUniformSemantic, Matrix3, Matrix4, Matrix4Notifier, Mesh, MeshPicker, MorphGeometry, Node, OrbitControls, OrthographicCamera, PARTICLE_AUTHORING_JSON_SCHEMA, PARTICLE_AUTHORING_SCHEMA, PARTICLE_AUTHORING_VERSION, PARTICLE_BAKE_VERSION, PARTICLE_DEFINITION_SCHEMA, PARTICLE_DEFINITION_VERSION, PARTICLE_PREVIEW_PROTOCOL_VERSION, PARTICLE_SIMULATION_CACHE_VERSION, PBRMaterial, PBRMaterialBuilder, ParticleAuthoringPreviewController, ParticleBudgetManager, ParticleCurve, ParticleEmitterDefinition, ParticleEventChannel, ParticleGradient, ParticleParameter, ParticleParameterSet, ParticleSystem, ParticleSystemDefinition, ParticleSystemPool, PerspectiveCamera, Plane, PlaneGeometry, PointLight, PostProcessRenderPipelineFactory, PresentRenderPass, Quaternion, QuaternionNotifier, Ray, RenderInfo, RenderPassParameterPool, Renderer, SCENE_STORAGE_BIND_GROUP, STATE_TYPES, SceneRenderPass, ScreenSpaceGlobalIllumination, Shader, ShaderMaterial, ShaderMaterialLoader, ShadowRenderPass, Skeleton, SkinnedMesh, SlicedSprite, Sphere, SphereGeometry, SphericalHarmonics3, SpotLight, Sprite, SpriteFrame, SpriteMaterial, Stage, Std140Layout, StorageGraphicsShader, StorageLayout, TemporalAA, Text2D, Texture, TextureCopyPass, TextureLoader, Ticker, Tween, UNIFORM_BLOCK_BINDINGS, UiButton, UniformBuffer, Vector2, Vector3, Vector3Notifier, Vector4, WebGLSupport, analyzeParticleStatelessEligibility, browser, collectionEntries, compileParticleAuthoringGraph, compileParticleSystemDefinition, constants, createEmptyGLTFRoot, createParticleAuthoringGraph, createStd140Layout, createStorageLayout, deserializeParticleSystemDefinition, detectBrowserFeatures, detectWebGLSupport, Hilo as engineConstants, getCollectionItem, getUniformBlockBinding, isArrayCollection, isGLTFRoot, log, math, parseParticleSystemDefinitionJSON, parseRadianceHDR, particleStatelessBlockingDiagnostics, registerUniformBlockBinding, resolveMaterialPassDefinition, resolveMaterialPassState, semantic, serializeParticleSystemDefinition, util_d as util, version, webgl2 as webgl2Constants, webgl as webglConstants, webglExtensions as webglExtensionConstants };
15834
- export type { AccessorArray, AmbientLightParameters, AnimationClip, AnimationInterpolationType, AnimationParameters, AnimationStateHandler, AnimationStateType, AnimationStatesParameters, AnimationTimeRange, AreaLightInfo, AreaLightParameters, AtmosphereWeatherDebugView, AtmosphereWeatherOptions, AtmosphereWeatherQuality, AutoExposureDiagnostics, AutoExposureMeteringMode, AutoExposureOptions, AxisAlignedBox, AxisHelperParameters, AxisNetHelperParameters, BackEaseObject, BasicLightType, BasicLoadRequest, BasicLoaderResource, BasicMaterialParameters, BasicResource, BasicResourceType, BloomOptions, Bounds, BoxGeometryParameters, BrowserFeatures, BuiltInAnimationStateType, BuiltInMaterialTextureSlotName, Camera2DParameters, CameraDepthMode, CameraHelperParameters, CameraParameters, ClusteredForwardPlusDiagnostics, ClusteredForwardPlusPipelineOptions, ColorUberOptions, ComputeBufferBinding, ComputeDispatch, ComputeKernelDescriptor, ComputePipelineConstant, ComputeRenderPassParameters, ComputeSamplerAddressMode, ComputeSamplerDescriptor, ComputeSamplerFilterMode, ComputeShaderBinding, ComputeShaderDescriptor, ComputeStorageBufferAccess, ComputeStorageTextureFormat, ComputeStorageTextureViewDimension, ComputeTextureBinding, ComputeTextureSampleType, ComputeTextureViewDimension, ComputeUniformBufferBinding, CubeTextureImage, CubeTextureLoadRequest, CubeTextureParameters, CullingOptions, CullingResultsHandle, DataTextureParameters, DirectionalLightInfo, DirectionalLightParameters, DirectionalLightShadowOptions, DispatchEvent, DynamicResolutionDiagnostics, DynamicResolutionOptions, ElasticEaseObject, EulerOrder, EventListener, FogMode, FogParameters, ForwardRenderFeatureContext, ForwardRenderFeatureRequirements, ForwardRenderInjectionPoint, ForwardRenderPipelineFactoryOptions, ForwardRenderPipelineFeature, ForwardRenderPipelineFeatureRuntime, ForwardRenderPipelineResources, FullscreenRenderPassOptions, FullscreenRenderPassParameters, GLTFAccessor, GLTFAccessorResult, GLTFAccessorType, GLTFAnimation, GLTFAnimationChannel, GLTFAnimationClipsExtension, GLTFAnimationSampler, GLTFAnimationTarget, GLTFAnisotropyExtension, GLTFAsset, GLTFBoundingBoxExtension, GLTFBounds, GLTFBuffer, GLTFBufferView, GLTFBufferViewRuntime, GLTFCamera, GLTFClearcoatExtension, GLTFCollection, GLTFComponentType, GLTFExtensionHandler, GLTFExtensionHandlerRegistry, GLTFExtensionMap, GLTFExtensionMethodName, GLTFExtensionOptions, GLTFImage, GLTFIndex, GLTFIorExtension, GLTFIridescenceExtension, GLTFLoadRequest, GLTFMaterial, GLTFMaterialValue, GLTFMaterialsCommonExtension, GLTFMesh, GLTFModel, GLTFMorphTarget, GLTFNode, GLTFOrthographicCamera, GLTFPBRMetallicRoughness, GLTFPBRSpecularGlossinessExtension, GLTFParserParameters, GLTFPerspectiveCamera, GLTFPrimitive, GLTFProgram, GLTFProgressivePrimitiveState, GLTFProperty, GLTFPunctualLight, GLTFPunctualLightNodeExtension, GLTFPunctualLightsExtension, GLTFPunctualSpotLight, GLTFQuantizedAttributesExtension, GLTFResourceLoader, GLTFRoot, GLTFSampler, GLTFScene, GLTFShader, GLTFSkin, GLTFSparseAccessor, GLTFSparseIndices, GLTFSparseValues, GLTFTechnique, GLTFTechniqueBinding, GLTFTechniqueStates, GLTFTexture, GLTFTextureInfo, GLTFTextureTransformExtension, GLTFTransmissionExtension, GLTFVolumeExtension, GPUDrivenDraw, GPUDrivenRenderPassOptions, GPUDrivenRenderPassParameters, GPUDrivenVertexAttribute, GPUDrivenVertexBufferLayout, GPUDrivenVertexFormat, GPUSceneBucket, GPUSceneLOD, GeometryAttributeValue, GeometryComponentSize, GeometryDataComponentCallback, GeometryDataLike, GeometryDataParameters, GeometryDataTraverseCallback, GeometryMaterialParameters, GeometryParameters, GeometryVertexType, GroundTruthAmbientOcclusionOptions, HDRLoadRequest, ImageCrossOrigin, InstancedUniform, InterpolatedValue, InterpolationFunction, JsonPrimitive, JsonValue, KTXLoadRequest, KTXTextureOptions, LazyTextureParameters, LightGroupName, LightInfo, LightManagerParameters, LightParameters, LightShadowOptions, ListenerEntry, ListenerMap, LoadCacheFile, LoadQueueItem, LoadQueueSource, LoadStateValue, LoaderRequest, LoaderTextureOptions, LogLevelValue, MaterialAttributeSemanticName, MaterialBinding, MaterialBindingInfo, MaterialBindingMap, MaterialBlendComponent, MaterialBlendFactor, MaterialBlendOperation, MaterialBlendState, MaterialColorOrTextureInput, MaterialCompareFunction, MaterialCompileRequest, MaterialCompositing, MaterialCoverage, MaterialCullMode, MaterialDefinitionParameters, MaterialFamily, MaterialFragmentOutput, MaterialFrontFace, MaterialInstanceParameters, MaterialPassDefinition, MaterialPassFallback, MaterialPassRole, MaterialPipelineState, MaterialRenderingProfile, MaterialSemanticName, MaterialShaderModule, MaterialStencilFaceState, MaterialStencilOperation, MaterialStencilState, MaterialSurfaceDomain, MaterialTargetSignature, MaterialTexture, MaterialTextureChannel, MaterialTextureEncoding, MaterialTextureSemanticName, MaterialTextureSlotBinding, MaterialTextureSlotDefinition, MaterialTextureSlotInput, MaterialTextureValue, MaterialUniformSemanticName, MeshParameters, MeshPickerParameters, MorphGeometryParameters, MorphTargets, MutableArrayLike, MutableNumberArray, MutablePBRMaterialParameters, NetworkResourceType, NodeGetChildByCallback, NodeParameters, NodePointerEvent, NodeRaycastInfo, NodeTraverseCallback, NodeTraverseResult, NormalizedComputeWorkgroupSize, OrbitControlsOptions, OrthographicCameraParameters, PBRMaterialParameters, PBRMaterialTextureInput, ParticleAdvancedQualityPlan, ParticleAdvancedSurfaceDefinition, ParticleAnalyticCollider, ParticleAttractionModule, ParticleAttributeLayout, ParticleAttributeName, ParticleAuthoringCompileFailure, ParticleAuthoringCompileOptions, ParticleAuthoringCompileResult, ParticleAuthoringCompileSuccess, ParticleAuthoringDiagnostic, ParticleAuthoringEdge, ParticleAuthoringEmitterIR, ParticleAuthoringGraph, ParticleAuthoringIR, ParticleAuthoringNode, ParticleAuthoringNodeKind, ParticleAuthoringPort, ParticleAuthoringPreviewCommand, ParticleAuthoringPreviewCompileRequest, ParticleAuthoringPreviewControlRequest, ParticleAuthoringPreviewControllerOptions, ParticleAuthoringPreviewRequest, ParticleAuthoringPreviewResponse, ParticleAuthoringPreviewSeekRequest, ParticleAuthoringPreviewState, ParticleAuthoringPreviewStepRequest, ParticleAuthoringPreviewSystemFactory, ParticleAutomaticBounds, ParticleBakeTimelineOptions, ParticleBakedMeshEmitter, ParticleBoundsDefinition, ParticleBoxCollider, ParticleBoxShape, ParticleBudgetDecision, ParticleBudgetProfile, ParticleBudgetRequest, ParticleBurstDefinition, ParticleBySpeedModule, ParticleCameraModule, ParticleCapsuleCollider, ParticleCircleShape, ParticleCollisionModule, ParticleColor, ParticleColorBySpeedModule, ParticleColorOverLifetimeModule, ParticleColorSource, ParticleColorValue, ParticleCompilationEnvironment, ParticleCompiledEmitterPlan, ParticleCompiledPlan, ParticleCompositionMode, ParticleConeShape, ParticleConformSphereModule, ParticleCullingReaction, ParticleCurveInterpolation, ParticleCurveKeyframe, ParticleCurveLUT, ParticleCurveOptions, ParticleCurveWrapMode, ParticleCustomChannelModule, ParticleDefinitionDeserializationOptions, ParticleDefinitionJSONParameter, ParticleDefinitionJSONRecord, ParticleDefinitionJSONValue, ParticleDefinitionResource, ParticleDefinitionResourceKind, ParticleDefinitionSerializationOptions, ParticleDefinitionUpgrade, ParticleDragModule, ParticleDynamicBounds, ParticleEmissionDefinition, ParticleEmitterDefinitionInput, ParticleEventAggregate, ParticleEventChannelParameters, ParticleEventChannelPayload, ParticleEventChannelSchema, ParticleEventFieldType, ParticleEventFieldValue, ParticleEventOverflowPolicy, ParticleEventRecord, ParticleExecutionMode, ParticleFlipbook, ParticleFlipbookFrameContext, ParticleFlipbookOptions, ParticleForceModule, ParticleGradientKey, ParticleGradientLUT, ParticleInheritVelocityModule, ParticleInitializeDefinition, ParticleKillModule, ParticleKillVolumeModule, ParticleLifetimeByEmitterSpeedModule, ParticleLightingMode, ParticleLimitVelocityModule, ParticleLineShape, ParticleManualBounds, ParticleMeshAsset, ParticleMeshCache, ParticleMeshCacheOptions, ParticleMeshRendererDefinition, ParticleModule, ParticleNoiseModule, ParticleOverflowPolicy, ParticleParameterType, ParticleParameterValue, ParticlePlaneCollider, ParticlePointShape, ParticleRadialForceModule, ParticleRange, ParticleRendererDefinition, ParticleRibbonRendererDefinition, ParticleRotateAroundPointModule, ParticleScalarBySpeedModule, ParticleScalarOverLifetimeModule, ParticleScalarSource, ParticleScalarValue, ParticleSceneDepthCollisionModule, ParticleShapeBase, ParticleShapeDefinition, ParticleSimulationCache, ParticleSimulationSpace, ParticleSortMode, ParticleSphereCollider, ParticleSphereShape, ParticleSpriteAlignment, ParticleSpriteRendererDefinition, ParticleStatelessModuleMetadata, ParticleStatelessSupport, ParticleSubEmitterModule, ParticleSurfaceCoverage, ParticleSystemDefinitionInput, ParticleSystemDefinitionJSON, ParticleSystemEmitCommand, ParticleSystemParameters, ParticleSystemSimulateOptions, ParticleTextureSheetModule, ParticleTorusShape, ParticleTriggerModule, ParticleVector2, ParticleVector3, ParticleVector3Source, ParticleVector3Value, ParticleVector4, ParticleVectorFieldModule, ParticleVelocityModule, PerspectiveCameraParameters, PhysicalAtmosphereOptions, PlaneGeometryParameters, Point2, Point3, PointLightInfo, PointLightParameters, PointLightShadowOptions, PointShadowCameraParameters, PostProcessRenderPipelineOptions, PreparedMaterialVariant, ProgramBindingInfo, RGPassTimestampKind, RadianceHDRImage, RayCamera, RayParameters, RenderColorEncoding, RenderGraphBufferHandle, RenderGraphBufferReadUse, RenderGraphBufferWriteUse, RenderGraphFramePlan, RenderGraphGPUTimelineStatus, RenderGraphPassHandle, RenderGraphPassTimelineSnapshot, RenderGraphResourceLifetimeSnapshot, RenderGraphTextureAccessHandle, RenderGraphTextureHandle, RenderGraphTextureViewHandle, RenderGraphTimelineSnapshot, RenderPassParameterFactory, RenderPassParameterReset, RenderPipeline, RenderPipelineBufferDescriptor, RenderPipelineCapabilities, RenderPipelineCapabilityName, RenderPipelineColorAttachment, RenderPipelineContext, RenderPipelineCreateContext, RenderPipelineDepthStencilAttachment, RenderPipelineExtent, RenderPipelineFactory, RenderPipelineHistoryTextureDescriptor, RenderPipelineHistoryTextureResources, RenderPipelineLimits, RenderPipelineOutput, RenderPipelineOutputColorAttachment, RenderPipelineOutputDepthStencilAttachment, RenderPipelineOutputResources, RenderPipelinePersistentTargetDescriptor, RenderPipelinePersistentTextureUsage, RenderPipelineRequirements, RenderPipelineShadowResources, RenderPipelineTargetResources, RenderPipelineTextureAspect, RenderPipelineTextureDescriptor, RenderPipelineTextureDimension, RenderPipelineTextureFormat, RenderPipelineTextureRequirement, RenderPipelineTextureUse, RenderPipelineTextureViewDescriptor, RenderPipelineTextureViewDimension, RenderTarget, RenderTargetColor, RenderTargetColorAttachmentOptions, RenderTargetColorAttachmentReadback, RenderTargetColorFormat, RenderTargetCompareFunction, RenderTargetDepthStencilAttachmentOptions, RenderTargetDepthStencilFormat, RenderTargetLoadOp, RenderTargetParameters, RenderTargetPresentationOptions, RenderTargetReadColorAttachmentOptions, RenderTargetSampleCount, RenderTargetSelectionOptions, RenderTargetStoreOp, RendererAdapterPowerPreference, RendererAutoOptions, RendererBackend, RendererCommonOptions, RendererContextPowerPreference, RendererContract, RendererCreateOptions, RendererExplicitOptions, RendererFeatureName, RendererFrame, RendererFrameCallback, RendererListDescriptor, RendererListHandle, RendererListQueue, RendererListSorting, RendererOptions, RendererOptionsMap, RendererRenderingProfile, RendererResourceDiagnostics, RendererResourceManager, RendererScene, RendererSupportOptions, RendererViewport, RendererWebGL2Options, RendererWebGPUOptions, ResizableTextureImage, Resource, ResourceLoader, ResourceLoaderConstructor, ResourceRequestOptions, SceneRenderPassParameters, SceneStorageBufferBinding, SceneStorageShaderVariant, ScreenSpaceGlobalIlluminationOptions, ScreenSpaceReflectionsOptions, ScriptableRenderCommands, ScriptableRenderGraph, ScriptableRenderPass, ScriptableRenderPassBuilder, ScriptableRenderPassContext, ScriptableRenderPrepareContext, SemanticMaterial, SemanticMesh, SemanticRenderer, ShaderDefineValue, ShaderMaterialLoadRequest, ShaderMaterialParameters, ShaderMaterialRoleSource, ShaderMaterialTextureSlot, ShaderOptions, ShaderParameters, ShaderPrecision, ShaderPrecisionProvider, ShaderReadBinding, ShaderRenderer, ShaderTextureSampleType, ShaderTextureViewDimension, ShadowCameraParameters, ShadowCastingLightParameters, ShadowRenderPassParameters, Size, SkeletonParameters, SkinnedMeshParameters, SlicedSpriteInsets, SlicedSpriteParameters, SphereGeometryParameters, SpotLightInfo, SpotLightParameters, SpriteFrameParameters, SpriteFrameUpdateOptions, SpriteFramesUpdateOptions, SpriteMaterialParameters, SpriteParameters, StageBackend, StageBackendParameters, StageCommonParameters, StageParameters, StagePointerEvent, Std140ArrayValue, Std140FieldDefinition, Std140FieldLayout, Std140FieldValue, Std140MatrixType, Std140ScalarType, Std140Schema, Std140Type, Std140Value, Std140Values, Std140VectorType, StorageArrayDefinition, StorageBuffer, StorageBufferDescriptor, StorageBufferRange, StorageBufferReadback, StorageBufferRecoveryPolicy, StorageBufferUsage, StorageFieldLayout, StorageGraphicsShaderDescriptor, StorageMatrixType, StoragePrimitiveType, StoragePrimitiveValue, StorageScalarType, StorageSchema, StorageStructDefinition, StorageType, StorageValue, StorageValues, StorageVectorType, StorageWriteResult, SubDataUpdate, TemporalAAOptions, Text2DParameters, Text2DStyle, TextureBinding, TextureCompressionFormat, TextureCopyPassParameters, TextureCubeFace, TextureImageSource, TextureLoadRequest, TextureMipmap, TextureParameters, TexturePixelData, TextureSource, TextureSubImage, TextureUVChannel, TextureUpdateSnapshot, Tickable, ToneMappingMode, Triangle, TweenCompleteCallback, TweenEaseCollection, TweenEaseFunction, TweenEaseNoneObject, TweenEaseObject, TweenParameters, TweenProperties, TweenStartCallback, TweenUpdateCallback, TypedArray$1 as TypedArray, TypedArrayConstructor$1 as TypedArrayConstructor, UV, UiButtonFrames, UiButtonParameters, UiButtonState, UniformBufferDirtyRange, UniformBufferRange, VolumetricBoxFogVolume, VolumetricCloudOptions, VolumetricFogVolume, VolumetricLightingDebugView, VolumetricLightingOptions, VolumetricLightingQuality, VolumetricSphereFogVolume, XYZObject };
15021
+ export { AmbientLight, Animation, AnimationStates, AreaLight, AtmosphereWeatherState, AutoExposure, AxisHelper, AxisNetHelper, BUILTIN_UNIFORM_BLOCK_BINDING_COUNT, BasicLoader, BasicMaterial, Bloom, BoxGeometry, Cache, Camera, Camera2D, CameraHelper, ClusteredForwardPlusPipelineFactory, Color, ColorUber, ComputeKernel, ComputeRenderPass, ComputeSampler, ComputeShader, CubeTexture, CubeTextureLoader, DEFAULT_2D_LAYER, DEFAULT_MATERIAL_PIPELINE_STATE, DEFAULT_MATERIAL_TEXTURE_CHANNELS, DataTexture, DirectionalLight, Euler, EulerNotifier, EventDispatcher, Fog, ForwardRenderPipelineFactory, Frustum, FullscreenRenderPass, GLTFExtensions_d as GLTFExtensions, GLTFLoader, GLTFParser, GPUDrivenRenderPass, Geometry, GeometryData, GeometryMaterial, GroundTruthAmbientOcclusion, HDRLoader, HiloEvent, KTXLoader, LazyTexture, Light, LightManager, LoadCache, LoadQueue, LoadState, Loader, LogLevel, Logger, MATERIAL_TEXTURE_SLOT_COUNT, MaterialAttributeSemantic, MaterialBlendPreset, MaterialCompiler, MaterialDefinition, MaterialInstance, MaterialTextureSemantic, MaterialTextureSlot, MaterialUniformSemantic, Matrix3, Matrix4, Matrix4Notifier, Mesh, MeshPicker, MorphGeometry, Node, OrbitControls, OrthographicCamera, PBRMaterial, PBRMaterialBuilder, PerspectiveCamera, Plane, PlaneGeometry, PointLight, PostProcessRenderPipelineFactory, PresentRenderPass, Quaternion, QuaternionNotifier, RENDER_NODE_EXTENSION, Ray, RenderInfo, RenderPassParameterPool, Renderer, SCENE_STORAGE_BIND_GROUP, STAGE_SYSTEM_API_VERSION, STATE_TYPES, SceneRenderPass, ScreenSpaceGlobalIllumination, Shader, ShaderMaterial, ShaderMaterialLoader, ShadowRenderPass, Skeleton, SkinnedMesh, SlicedSprite, Sphere, SphereGeometry, SphericalHarmonics3, SpotLight, Sprite, SpriteFrame, SpriteMaterial, Stage, StageSystemRegistry, StageSystemService, Std140Layout, StorageGraphicsShader, StorageLayout, TRIANGLES, TemporalAA, Text2D, Texture, TextureCopyPass, TextureLoader, Ticker, Tween, UNIFORM_BLOCK_BINDINGS, UiButton, UniformBuffer, Vector2, Vector3, Vector3Notifier, Vector4, WebGLSupport, browser, collectionEntries, constants, createEmptyGLTFRoot, createStageSystemService, createStd140Layout, createStorageGraphicsShaderFromPortable, createStorageLayout, detectBrowserFeatures, detectWebGLSupport, Hilo as engineConstants, getCollectionItem, getRenderNodeExtension, getUniformBlockBinding, isArrayCollection, isGLTFRoot, log, math, parseRadianceHDR, registerUniformBlockBinding, resolveMaterialPassDefinition, resolveMaterialPassState, semantic, util_d as util, version, webgl2 as webgl2Constants, webgl as webglConstants, webglExtensions as webglExtensionConstants };
15022
+ export type { AccessorArray, AmbientLightParameters, AnimationClip, AnimationInterpolationType, AnimationParameters, AnimationStateHandler, AnimationStateType, AnimationStatesParameters, AnimationTimeRange, AreaLightInfo, AreaLightParameters, AtmosphereWeatherDebugView, AtmosphereWeatherOptions, AtmosphereWeatherQuality, AutoExposureDiagnostics, AutoExposureMeteringMode, AutoExposureOptions, AxisAlignedBox, AxisHelperParameters, AxisNetHelperParameters, BackEaseObject, BasicLightType, BasicLoadRequest, BasicLoaderResource, BasicMaterialParameters, BasicResource, BasicResourceType, BloomOptions, Bounds, BoxGeometryParameters, BrowserFeatures, BuiltInAnimationStateType, BuiltInMaterialTextureSlotName, Camera2DParameters, CameraDepthMode, CameraHelperParameters, CameraParameters, ClusteredForwardPlusDiagnostics, ClusteredForwardPlusPipelineOptions, ClusteredMaterialVariantManifest, ClusteredMaterialVariantManifestEntry, ColorUberOptions, ComputeBufferBinding, ComputeDispatch, ComputeKernelDescriptor, ComputePipelineConstant, ComputeRenderPassParameters, ComputeSamplerAddressMode, ComputeSamplerDescriptor, ComputeSamplerFilterMode, ComputeShaderBinding, ComputeShaderDescriptor, ComputeStorageBufferAccess, ComputeStorageTextureFormat, ComputeStorageTextureViewDimension, ComputeTextureBinding, ComputeTextureSampleType, ComputeTextureViewDimension, ComputeUniformBufferBinding, CubeTextureImage, CubeTextureLoadRequest, CubeTextureParameters, CullingOptions, CullingResultsHandle, DataTextureParameters, DirectionalLightInfo, DirectionalLightParameters, DirectionalLightShadowOptions, DispatchEvent, DynamicResolutionDiagnostics, DynamicResolutionOptions, ElasticEaseObject, EulerOrder, EventListener, FogMode, FogParameters, ForwardRenderFeatureContext, ForwardRenderFeatureRequirements, ForwardRenderInjectionPoint, ForwardRenderPipelineFactoryOptions, ForwardRenderPipelineFeature, ForwardRenderPipelineFeatureRuntime, ForwardRenderPipelineResources, FullscreenRenderPassOptions, FullscreenRenderPassParameters, GLTFAccessor, GLTFAccessorResult, GLTFAccessorType, GLTFAnimation, GLTFAnimationChannel, GLTFAnimationClipsExtension, GLTFAnimationSampler, GLTFAnimationTarget, GLTFAnisotropyExtension, GLTFAsset, GLTFBoundingBoxExtension, GLTFBounds, GLTFBuffer, GLTFBufferView, GLTFBufferViewRuntime, GLTFCamera, GLTFClearcoatExtension, GLTFCollection, GLTFComponentType, GLTFExtensionHandler, GLTFExtensionHandlerRegistry, GLTFExtensionMap, GLTFExtensionMethodName, GLTFExtensionOptions, GLTFImage, GLTFIndex, GLTFIorExtension, GLTFIridescenceExtension, GLTFLoadRequest, GLTFMaterial, GLTFMaterialValue, GLTFMaterialsCommonExtension, GLTFMesh, GLTFModel, GLTFMorphTarget, GLTFNode, GLTFOrthographicCamera, GLTFPBRMetallicRoughness, GLTFPBRSpecularGlossinessExtension, GLTFParserParameters, GLTFPerspectiveCamera, GLTFPrimitive, GLTFProgram, GLTFProgressivePrimitiveState, GLTFProperty, GLTFPunctualLight, GLTFPunctualLightNodeExtension, GLTFPunctualLightsExtension, GLTFPunctualSpotLight, GLTFQuantizedAttributesExtension, GLTFResourceLoader, GLTFRoot, GLTFSampler, GLTFScene, GLTFShader, GLTFSkin, GLTFSparseAccessor, GLTFSparseIndices, GLTFSparseValues, GLTFTechnique, GLTFTechniqueBinding, GLTFTechniqueStates, GLTFTexture, GLTFTextureInfo, GLTFTextureTransformExtension, GLTFTransmissionExtension, GLTFVolumeExtension, GPUDrivenDraw, GPUDrivenRenderPassOptions, GPUDrivenRenderPassParameters, GPUDrivenVertexAttribute, GPUDrivenVertexBufferLayout, GPUDrivenVertexFormat, GPUSceneBucket, GPUSceneLOD, GeometryAttributeValue, GeometryComponentSize, GeometryDataComponentCallback, GeometryDataLike, GeometryDataParameters, GeometryDataTraverseCallback, GeometryMaterialParameters, GeometryParameters, GeometryVertexType, GroundTruthAmbientOcclusionNormalSource, GroundTruthAmbientOcclusionOptions, GroundTruthAmbientOcclusionQuality, HDRLoadRequest, ImageCrossOrigin, InstancedUniform, InterpolatedValue, InterpolationFunction, JsonPrimitive, JsonValue, KTXLoadRequest, KTXTextureOptions, LazyTextureParameters, LightGroupName, LightInfo, LightManagerParameters, LightParameters, LightShadowOptions, ListenerEntry, ListenerMap, LoadCacheFile, LoadQueueItem, LoadQueueSource, LoadStateValue, LoaderRequest, LoaderTextureOptions, LogLevelValue, MaterialAttributeSemanticName, MaterialBinding, MaterialBindingInfo, MaterialBindingMap, MaterialBlendComponent, MaterialBlendFactor, MaterialBlendOperation, MaterialBlendState, MaterialColorOrTextureInput, MaterialCompareFunction, MaterialCompileRequest, MaterialCompositing, MaterialCoverage, MaterialCullMode, MaterialDefinitionParameters, MaterialFamily, MaterialFragmentOutput, MaterialFrontFace, MaterialInstanceParameters, MaterialPassDefinition, MaterialPassFallback, MaterialPassRole, MaterialPipelineState, MaterialRenderingProfile, MaterialSemanticName, MaterialShaderModule, MaterialStencilFaceState, MaterialStencilOperation, MaterialStencilState, MaterialSurfaceDomain, MaterialTargetSignature, MaterialTexture, MaterialTextureChannel, MaterialTextureEncoding, MaterialTextureSemanticName, MaterialTextureSlotBinding, MaterialTextureSlotDefinition, MaterialTextureSlotInput, MaterialTextureValue, MaterialUniformSemanticName, MeshParameters, MeshPickerParameters, MorphGeometryParameters, MorphTargets, MutableArrayLike, MutableNumberArray, MutablePBRMaterialParameters, NetworkResourceType, NodeGetChildByCallback, NodeParameters, NodePointerEvent, NodeRaycastInfo, NodeTraverseCallback, NodeTraverseResult, NormalizedComputeWorkgroupSize, OrbitControlsOptions, OrthographicCameraParameters, PBRMaterialParameters, PBRMaterialTextureInput, PerspectiveCameraParameters, PhysicalAtmosphereOptions, PlaneGeometryParameters, Point2, Point3, PointLightInfo, PointLightParameters, PointLightShadowOptions, PointShadowCameraParameters, PostProcessRenderPipelineOptions, PreparedMaterialVariant, ProgramBindingInfo, RGPassTimestampKind, RadianceHDRImage, RayCamera, RayParameters, RenderColorEncoding, RenderGraphBufferHandle, RenderGraphBufferReadUse, RenderGraphBufferWriteUse, RenderGraphFramePlan, RenderGraphGPUTimelineStatus, RenderGraphPassHandle, RenderGraphPassTimelineSnapshot, RenderGraphResourceLifetimeSnapshot, RenderGraphTextureAccessHandle, RenderGraphTextureHandle, RenderGraphTextureViewHandle, RenderGraphTimelineSnapshot, RenderNodeExtension, RenderNodeGPUExtension, RenderPassParameterFactory, RenderPassParameterReset, RenderPipeline, RenderPipelineBufferDescriptor, RenderPipelineCapabilities, RenderPipelineCapabilityName, RenderPipelineColorAttachment, RenderPipelineContext, RenderPipelineCreateContext, RenderPipelineDepthStencilAttachment, RenderPipelineExtent, RenderPipelineFactory, RenderPipelineHistoryTextureDescriptor, RenderPipelineHistoryTextureResources, RenderPipelineLimits, RenderPipelineOutput, RenderPipelineOutputColorAttachment, RenderPipelineOutputDepthStencilAttachment, RenderPipelineOutputResources, RenderPipelinePersistentTargetDescriptor, RenderPipelinePersistentTextureUsage, RenderPipelineRequirements, RenderPipelineShadowOptions, RenderPipelineShadowPageRegion, RenderPipelineShadowResources, RenderPipelineShadowSlice, RenderPipelineTargetResources, RenderPipelineTextureAspect, RenderPipelineTextureDescriptor, RenderPipelineTextureDimension, RenderPipelineTextureFormat, RenderPipelineTextureRequirement, RenderPipelineTextureUse, RenderPipelineTextureViewDescriptor, RenderPipelineTextureViewDimension, RenderTarget, RenderTargetColor, RenderTargetColorAttachmentOptions, RenderTargetColorAttachmentReadback, RenderTargetColorFormat, RenderTargetCompareFunction, RenderTargetDepthStencilAttachmentOptions, RenderTargetDepthStencilFormat, RenderTargetLoadOp, RenderTargetParameters, RenderTargetPresentationOptions, RenderTargetReadColorAttachmentOptions, RenderTargetSampleCount, RenderTargetSelectionOptions, RenderTargetStoreOp, RendererAdapterPowerPreference, RendererAutoOptions, RendererBackend, RendererCommonOptions, RendererContextPowerPreference, RendererContract, RendererCreateOptions, RendererExplicitOptions, RendererFeatureName, RendererFrame, RendererFrameCallback, RendererListDescriptor, RendererListHandle, RendererListQueue, RendererListSorting, RendererOptions, RendererOptionsMap, RendererRenderingProfile, RendererResourceDiagnostics, RendererResourceManager, RendererScene, RendererShadowUpdateMode, RendererSupportOptions, RendererViewport, RendererWebGL2Options, RendererWebGPUOptions, ResizableTextureImage, Resource, ResourceLoader, ResourceLoaderConstructor, ResourceRequestOptions, SceneRenderPassParameters, SceneStorageBufferBinding, SceneStorageShaderVariant, ScreenSpaceGlobalIlluminationOptions, ScreenSpaceReflectionsOptions, ScriptableRenderCommands, ScriptableRenderGraph, ScriptableRenderPass, ScriptableRenderPassBuilder, ScriptableRenderPassContext, ScriptableRenderPrepareContext, SemanticMaterial, SemanticMesh, SemanticRenderer, ShaderDefineValue, ShaderMaterialLoadRequest, ShaderMaterialParameters, ShaderMaterialRoleSource, ShaderMaterialTextureSlot, ShaderOptions, ShaderParameters, ShaderPrecision, ShaderPrecisionProvider, ShaderReadBinding, ShaderRenderer, ShaderTextureSampleType, ShaderTextureViewDimension, ShadowCameraParameters, ShadowCastingLightParameters, ShadowRenderPassParameters, Size, SkeletonParameters, SkinnedMeshParameters, SlicedSpriteInsets, SlicedSpriteParameters, SphereGeometryParameters, SpotLightCookie, SpotLightIESProfile, SpotLightInfo, SpotLightParameters, SpriteFrameParameters, SpriteFrameUpdateOptions, SpriteFramesUpdateOptions, SpriteMaterialParameters, SpriteParameters, StageBackend, StageBackendParameters, StageCommonParameters, StageParameters, StagePointerEvent, StageSystem, StageSystemDescriptor, StageSystemRuntime, StageSystemSetupContext, Std140ArrayValue, Std140FieldDefinition, Std140FieldLayout, Std140FieldValue, Std140MatrixType, Std140ScalarType, Std140Schema, Std140Type, Std140Value, Std140Values, Std140VectorType, StorageArrayDefinition, StorageBuffer, StorageBufferDescriptor, StorageBufferRange, StorageBufferReadback, StorageBufferRecoveryPolicy, StorageBufferUsage, StorageFieldLayout, StorageGraphicsShaderDescriptor, StorageMatrixType, StoragePrimitiveType, StoragePrimitiveValue, StorageScalarType, StorageSchema, StorageStructDefinition, StorageType, StorageValue, StorageValues, StorageVectorType, StorageWriteResult, SubDataUpdate, TemporalAAOptions, Text2DParameters, Text2DStyle, TextureBinding, TextureCompressionFormat, TextureCopyPassParameters, TextureCubeFace, TextureImageSource, TextureLoadRequest, TextureMipmap, TextureParameters, TexturePixelData, TextureSource, TextureSubImage, TextureUVChannel, TextureUpdateSnapshot, Tickable, ToneMappingMode, Triangle, TweenCompleteCallback, TweenEaseCollection, TweenEaseFunction, TweenEaseNoneObject, TweenEaseObject, TweenParameters, TweenProperties, TweenStartCallback, TweenUpdateCallback, TypedArray$1 as TypedArray, TypedArrayConstructor$1 as TypedArrayConstructor, UV, UiButtonFrames, UiButtonParameters, UiButtonState, UniformBufferDirtyRange, UniformBufferRange, VirtualShadowMapDiagnostics, VirtualShadowMapOptions, VolumetricBoxFogVolume, VolumetricCloudOptions, VolumetricFogVolume, VolumetricLightingDebugView, VolumetricLightingOptions, VolumetricLightingQuality, VolumetricSphereFogVolume, XYZObject };
15835
15023
  //# sourceMappingURL=Hilo3d.d.ts.map