Reference update()

update()

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

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

Replaces the contents of the list with new data from JavaScript, updating the element count to match.

For a list of numbers, update takes in an array of numbers (or a Float32Array.) For a list of objects, pass an array of plain objects with the same properties present as when you created the list.

Examples

Syntax

update(data)

Parameters

data
Number[]|Float32Array|Object[]: The new data to write.

Related References