Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for partial I/O operations #800

Open
reczkok opened this issue Jan 20, 2025 · 1 comment
Open

Allow for partial I/O operations #800

reczkok opened this issue Jan 20, 2025 · 1 comment
Assignees

Comments

@reczkok
Copy link
Collaborator

reczkok commented Jan 20, 2025

No description provided.

@iwoplaza
Copy link
Collaborator

Sparse/Partial write proposal

const Boid = struct({
  pos: vec2f,
  vel: vec2f,
});

const buffer = root.createBuffer(arrayOf(Boid, 100));

buffer.write(/* { pos: v2f, vel: v2f }[] */);
buffer.writePartial(/* Record<number, { pos?: v2f | undefined, vel?: v2f | undefined }> */);

// Updating only the position of the 5th boid.
buffer.writePartial({
  5: { pos: vec2f(1, 2) },
});

@reczkok reczkok self-assigned this Jan 22, 2025
@reczkok reczkok mentioned this issue Jan 22, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants