map

inline suspend fun GPUBuffer.map(mode: GPUMapModeFlags)(source)
inline suspend fun GPUBuffer.map(mode: GPUMapModeFlags, offset: GPUSize64)(source)
inline suspend fun GPUBuffer.map(mode: GPUMapModeFlags, offset: GPUSize64, size: GPUSize64)(source)

The mapAsync() method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands.

MDN Reference