Skip to content

passing a destination array in field.toArray ? #24

Description

@mreinstein

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions