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

Cleaner API for saved/embedded visualizations + initial documentation #357

Merged
merged 11 commits into from
Jan 4, 2025

Conversation

brentyi
Copy link
Collaborator

@brentyi brentyi commented Dec 16, 2024

@brentyi
Copy link
Collaborator Author

brentyi commented Jan 4, 2025

Old API:

rec = server._start_scene_recording()
rec.set_loop_start()
for t in range(num_frames):
    # some updates here
    rec.insert_sleep(1 / 30)
data = rec.end_and_serialize()  # bytes

New API, for saving static 3D data:

data = server.get_scene_serializer().serialize() # bytes

New API, for saving dynamic data:

serializer = server.get_scene_serializer()
for t in range(num_frames):
    # some updates here
    # ...
    serializer.insert_sleep(1 / 30)
data = serializer.serialize()  # bytes

@brentyi brentyi changed the title Stable API for saved/embedded visualizations Cleaner API for saved/embedded visualizations + initial documentation Jan 4, 2025
@brentyi brentyi merged commit e7b5872 into main Jan 4, 2025
15 checks passed
@brentyi brentyi deleted the brent/stable_embed branch January 4, 2025 10:59
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 this pull request may close these issues.

1 participant