Interface GPUBuffer
__brand: "GPUBuffer";
label: string;
mapState: GPUBufferMapState;
size: number;
usage: number;
destroy(): undefined;
getMappedRange(offset?: number, size?: number): ArrayBuffer;
mapAsync(mode: number, offset?: number, size?: number): Promise<undefined>;
unmap(): undefined;
}
                 
                    
                  Hierarchy
              
              - GPUObjectBase- GPUBuffer (View Summary)
 
 Properties
Readonly Internal__brand
label
ReadonlymapState 
Readonlysize
Readonlyusage
 Methods
destroy
- destroy(): undefined
- Destroys the GPUBuffer. Note: It is valid to destroy a buffer multiple times. Note: Since no further operations can be enqueued using this buffer, implementations can free resource allocations, including mapped memory that was just unmapped. - Returns undefined
getMappedRange  
- getMappedRange(offset?: number, size?: number): ArrayBuffer
- Returns an ArrayBuffer with the contents of the GPUBuffer in the given mapped range. - Parameters- Optionaloffset: number- Offset in bytes into the buffer to return buffer contents from. 
- Optionalsize: number- Size in bytes of the ArrayBuffer to return. 
 - Returns ArrayBuffer
mapAsync 
- mapAsync(mode: number, offset?: number, size?: number): Promise<undefined>
- Maps the given range of the GPUBuffer and resolves the returned Promise when the GPUBuffer's content is ready to be accessed with GPUBuffer#getMappedRange. The resolution of the returned Promise only indicates that the buffer has been mapped. It does not guarantee the completion of any other operations visible to the content timeline, and in particular does not imply that any other Promise returned from () or GPUBuffer#mapAsync on other GPUBuffers have resolved. The resolution of the Promise returned from GPUQueue#onSubmittedWorkDone does imply the completion of GPUBuffer#mapAsync calls made prior to that call, on GPUBuffers last used exclusively on that queue. - Parameters- mode: numberWhether the buffer should be mapped for reading or writing. 
- Optionaloffset: number- Offset in bytes into the buffer to the start of the range to map. 
- Optionalsize: number- Size in bytes of the range to map. 
 - Returns Promise<undefined>
- mode: number
unmap
- unmap(): undefined
- Unmaps the mapped range of the GPUBuffer and makes its contents available for use by the GPU again. - Returns undefined
Nominal type branding. https://github.com/microsoft/TypeScript/pull/33038