@hology/webgpu-renderer 0.1.13 → 0.1.14

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
@@ -302,6 +302,18 @@ interface RendererOptions {
302
302
  renderGraphProfiling?: boolean;
303
303
  /** Internal scene resolution relative to the presentation resolution. Defaults to 1. */
304
304
  renderScale?: number;
305
+ /**
306
+ * Experimental native bridge invoked after the scene command buffer is
307
+ * submitted. The callback may enqueue native work and a final presentation
308
+ * command buffer using the retained surface view.
309
+ */
310
+ nativePostSubmit?: (context: {
311
+ readonly device: GPUDevice;
312
+ readonly presentationView: GPUTextureView;
313
+ readonly presentationWidth: number;
314
+ readonly presentationHeight: number;
315
+ present(sourceView: GPUTextureView): void;
316
+ }) => void;
305
317
  /** Material used when a mesh does not already use WGSLShaderMaterial. */
306
318
  fallbackMaterial?: WGSLShaderMaterial;
307
319
  /** Optional bridge for graph/material systems layered on top of Three. */
@@ -873,6 +885,7 @@ declare class WebGpuRenderer {
873
885
  private readonly defaultInstanceAttributeBuffers;
874
886
  private readonly textureManager;
875
887
  private readonly renderGraph;
888
+ private readonly nativePostSubmit;
876
889
  private readonly directionalShadowCameras;
877
890
  private readonly pointShadowCameras;
878
891
  private readonly spotShadowCameras;
@@ -981,7 +994,7 @@ declare class WebGpuRenderer {
981
994
  private resolveLineBasicMaterial;
982
995
  private resolveSkinnedMaterial;
983
996
  private hasRenderCallbacks;
984
- initialize(): Promise<void>;
997
+ initialize(providedAdapter?: GPUAdapter): Promise<void>;
985
998
  createComputeKernel(descriptor: ComputeKernelDescriptor): ComputeKernel;
986
999
  getDevice(): GPUDevice | null;
987
1000
  setRenderGraphBuilder(builder: RendererGraphBuilder): void;