index

This feature requires the p5.webgpu.js addon.
이 API는 실험적입니다

향후 p5.js 버전에서 동작이 변경될 수 있습니다.

Information about the current iteration of a compute shader.

Use it inside a buildComputeShader() function to write a loop that runs in parallel on the GPU.

index is a three-component vector with the current index across all dimensions passed to compute(). For example, use index.x to get the index when looping in one dimension.


관련 레퍼런스