Hilo3d API - v2.0.0
    Preparing search index...

    Interface StorageBuffer

    Renderer-owned persistent storage buffer shared by compute, copy, and GPU-driven raster passes.

    The object exposes no native WebGPU handle. Import it through the active Scriptable Render Graph before using it in a pass.

    interface StorageBuffer {
        backend: RendererBackend;
        byteLength: number;
        isDestroyed: boolean;
        label: string;
        recovery: StorageBufferRecoveryPolicy;
        usage: ReadonlySet<StorageBufferUsage>;
        destroy(): void;
        range(byteOffset: number, byteLength: number): StorageBufferRange;
        read(
            byteOffset?: number,
            byteLength?: number,
        ): Promise<StorageBufferReadback>;
        write(byteOffset: number, data: ArrayBufferView): void;
    }
    Index

    Backend that owns the resource. Storage buffers are currently WebGPU-only.

    byteLength: number

    Allocation size in bytes.

    isDestroyed: boolean

    Whether StorageBuffer.destroy has released this public identity.

    label: string

    Stable diagnostic label.

    Device-loss content policy.

    usage: ReadonlySet<StorageBufferUsage>

    Immutable set of roles declared at creation.

    • Release the renderer-owned resource. Destruction is idempotent and submission-aware.

      Returns void

    • Read a four-byte-aligned range after the next valid submission.

      A renderer accepts one pending storage-buffer readback at a time. Await this promise before starting another read from any storage buffer owned by the same renderer.

      Parameters

      • OptionalbyteOffset: number
      • OptionalbyteLength: number

      Returns Promise<StorageBufferReadback>

    • Queue a four-byte-aligned CPU update for the next frame that imports the buffer.

      Parameters

      • byteOffset: number
      • data: ArrayBufferView

      Returns void