Reference read()

read()

This feature requires the p5.webgpu.js addon.
This API is experimental

Its behavior may change in a future version of p5.js.

Reads the current contents of the list back to JavaScript.

It returns a Float32Array for float lists, or an array of plain objects for struct lists.

Note: This is a GPU-to-CPU read. Calling it frequently can be slow.

Examples

Syntax

read()

Parameters

Returns

Promise<Float32Array|Object[]>:

Related References