A viser extension with out-of-the-box support for the time dimension
Project description
viser4d
viser4d is a small extension of viser
for recorded 3D scenes with a time dimension.
Features include:
- Record scene updates across discrete timesteps with
with server.at(t):. - Play, pause, scrub, and step through the timeline directly in the browser.
- Stream long recordings in chunks and preload nearby timeline blocks for responsive scrubbing.
- Keep playback client-local so different browser tabs can explore the same recording independently.
- Attach timeline-synced audio tracks.
- Export recordings as
.viserfiles or standalone HTML.
The goal is to keep viser's live scene API while adding a separate recorded timeline API for playback and export.
Installation
You can install viser4d with pip:
pip install viser4d
Quickstart
import numpy as np
import viser4d
server = viser4d.Viser4dServer(num_steps=10, fps=10)
server.scene.add_frame("/origin", axes_length=0.25)
server.scene.add_grid("/ground", width=10.0, height=10.0)
point_cloud = None
for t in range(10):
with server.at(t) as timeline:
points = np.random.uniform(-1.0, 1.0, size=(200, 3))
if point_cloud is None:
point_cloud = timeline.scene.add_point_cloud(
"/points",
points=points,
colors=(255, 200, 0),
)
else:
point_cloud.points = points
server.sleep_forever()
Open the viewer in your browser and use the built-in Playback controls to play, pause, scrub, and step through the recorded timeline.
Outside server.at(t), server.scene behaves like normal viser. Inside
server.at(t), writes to timeline.scene and timeline.audio are recorded
into the timeline.
More Examples
Export
blob = server.serialize()
html = server.as_html()
Use server.serialize() to export a .viser recording and server.as_html()
to export a self-contained HTML viewer.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file viser4d-0.16.0.tar.gz.
File metadata
- Download URL: viser4d-0.16.0.tar.gz
- Upload date:
- Size: 60.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3fa11af4252291a52313f03aa6341d5becd3599ef58265b53410542c22af9ec
|
|
| MD5 |
032b39dfee3b7324c5d86b524619d3f7
|
|
| BLAKE2b-256 |
64e7e1da04ec14a8c931a038b4fd1a9d8b3d60c440a3e748a94f8edc89b5deec
|
File details
Details for the file viser4d-0.16.0-py3-none-any.whl.
File metadata
- Download URL: viser4d-0.16.0-py3-none-any.whl
- Upload date:
- Size: 67.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d69a7fc14456702c972aa6289f6a5bf8e2afe63e1298eef380b6c0d372df57c
|
|
| MD5 |
a15b7e9008be0e95f3d2be438f0cfa00
|
|
| BLAKE2b-256 |
2e5c3dcda241f1f3c6239d7deaceae127ccff048157086fc8c8c4f2832a683dc
|