@hology/webgpu-renderer 0.1.24 → 0.1.25

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/index.d.ts CHANGED
@@ -280,6 +280,8 @@ interface RendererOptions {
280
280
  invokeObjectRenderCallbacks?: boolean;
281
281
  }
282
282
  interface StaticDrawSetOptions {
283
+ /** Retain source instance IDs for explicit transform/visibility refreshes. Topology stays fixed. */
284
+ mutableTransforms?: boolean;
283
285
  /** Defaults inherited by objects without overrides. Frozen at registration. */
284
286
  detailCulling?: DetailCullingSettings;
285
287
  label?: string;
@@ -296,6 +298,8 @@ interface StaticDrawSet {
296
298
  readonly drawCount: number;
297
299
  readonly instanceCount: number;
298
300
  enabled: boolean;
301
+ /** Refresh resident transforms/instance visibility. Requires mutableTransforms; topology stays fixed. */
302
+ updateTransforms(): void;
299
303
  dispose(): void;
300
304
  }
301
305
  interface RendererGraphBuilderContext {
@@ -384,10 +388,15 @@ interface RendererSceneCapturePostProcessContext {
384
388
  }
385
389
  /** Non-temporal, unshadowed scene view sharing the renderer's GPU resources. */
386
390
  interface RendererSceneCapture {
391
+ /** Display-space output format, for preparing a custom postProcess pipeline. */
392
+ readonly format: GPUTextureFormat;
387
393
  /** Triangles submitted by the most recent capture, before raster clipping. */
388
394
  readonly triangleCount: number;
389
395
  /** Persistent display-space output when created without a canvas. Owned by the capture. */
390
396
  readonly textureView?: GPUTextureView;
397
+ /** Prepare this view's material variants without blocking on synchronous pipeline creation.
398
+ * Does not submit a capture or prepare a custom postProcess callback. */
399
+ prepareAsync(scene: three.Scene, camera: PerspectiveCamera | OrthographicCamera, options?: RendererSceneCaptureOptions): Promise<void>;
391
400
  capture(scene: three.Scene, camera: PerspectiveCamera | OrthographicCamera, options?: RendererSceneCaptureOptions): void;
392
401
  dispose(): void;
393
402
  }
@@ -893,7 +902,8 @@ declare class SDFGI {
893
902
  /** Capture one all-layer projection per frame, before main-view extraction. */
894
903
  prepare(scene: Scene, camera: Camera): void;
895
904
  private updateLights;
896
- addPasses(graph: FrameGraphBuilder): void;
905
+ /** Returns whether the update pass was added, for dependent material passes. */
906
+ addPasses(graph: FrameGraphBuilder): boolean;
897
907
  /** Records the same production path used by the renderer; useful to GPU checks. */
898
908
  encode(encoder: GPUCommandEncoder, timeSeconds?: number): void;
899
909
  private encodeVolume;
@@ -1266,8 +1276,10 @@ declare class WebGpuRenderer {
1266
1276
  * upload buffers, but never advances gameplay motion/visibility history.
1267
1277
  */
1268
1278
  createSceneCapture(canvas: HTMLCanvasElement | null, width?: number, height?: number): RendererSceneCapture;
1279
+ private prepareSceneCaptureAsync;
1269
1280
  compile(scene: Scene, camera: PerspectiveCamera | OrthographicCamera): void;
1270
1281
  compileAsync(scene: Scene, camera: PerspectiveCamera | OrthographicCamera): Promise<void>;
1282
+ prepareSceneGeometryAsync(scene: Scene, camera: Camera): Promise<void>;
1271
1283
  /**
1272
1284
  * Creates a Three-compatible CubeUV PMREM generator. Its output is a
1273
1285
  * HalfFloat Texture and can be assigned directly to a graph material's
@@ -1288,6 +1300,8 @@ declare class WebGpuRenderer {
1288
1300
  private disposeStaticDrawSetResource;
1289
1301
  private renderFrame;
1290
1302
  private recordPresentationOverlay;
1303
+ /** Present application UI without changing scene extraction, pipelines or temporal history. */
1304
+ renderPresentationOnly(): void;
1291
1305
  destroy(): void;
1292
1306
  private createStaticPipelines;
1293
1307
  private ensureTransmissionSnapshot;