I'd like to play around with taking the output of an array field that is processed in a taichi kernel, store it as a TypedArray (probably Uint32Array) and blit that to the screen.
It seems like const arr = await scalarField.toArray() should work, but my concern is doing this super fast in a tight rendering loop. It's going to allocate a ton of memory.
Is there a way to pass in a predefined array and have that filled in? I'll always know the dimensions of the array before hand.
I'd like to play around with taking the output of an array field that is processed in a taichi kernel, store it as a TypedArray (probably Uint32Array) and blit that to the screen.
It seems like
const arr = await scalarField.toArray()should work, but my concern is doing this super fast in a tight rendering loop. It's going to allocate a ton of memory.Is there a way to pass in a predefined array and have that filled in? I'll always know the dimensions of the array before hand.