This feature requires the p5.webgpu.js addon.
此 API 是实验性的
其行为可能在 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.
示例
语法
update(data)
参数
data
Number[]|Float32Array|Object[]: The new data to write.
Notice any errors or typos? Please let us know. Please feel free to edit src/webgpu/p5.RendererWebGPU.js and open a pull request!