A collection of examples demonstrating the capabilities of Vuer, a powerful framework for building 3D visualization applications.
This repository contains individual example projects, each in its own git repository and included here as git submodules. Each example is self-contained with its own dependencies and documentation.
git clone --recursive https://github.com/your-org/vuer-examples.git
cd vuer-examplesIf you've already cloned without --recursive:
git submodule update --init --recursiveEach example is a standalone project. To run an example:
cd vuer-example-01_trimesh
pip install -r requirements.txt
python main.pyThen open your browser to http://localhost:8012 (or the port specified in the example).
Each example demonstrates different features of Vuer:
- 01_trimesh - Loading and rendering mesh files (OBJ, TriMesh)
- 02_pointcloud - Working with point cloud data
- 02_pointcloud_pcd - Loading PCD files
- 02_pointcloud_ply - Loading PLY files
- 03_urdf - Loading and displaying URDF robot models
- 04_imperative_api - Using Vuer's imperative API
- 05_collecting_render - Collecting rendered frames
- 05_pointcloud_animation - Animating point clouds
- 06_depth_texture - Working with depth textures
- 07_background_image - Setting background images
- 08_experimental_depth_image - Advanced depth rendering
- 11_coordinates_markers - Displaying coordinate frames
- 12_camera - Camera controls and positioning
- 13_plane_primitive - Using primitive shapes
- 14_obj - Loading OBJ files with materials
- 15_spline_frustum - Camera frustums and splines
- 16_arrows - Arrow visualizations
- 17_sky_ball - Skybox environments
- 18_movable - Interactive movable objects
- 19_hand_tracking - VR hand tracking
- 20_motion_controllers - VR motion controller support
- 25_body_tracking - Full body tracking
- 21_3D_movie - Playing 3D video content
- 22_3d_text - Rendering 3D text
- 23_spark - Spark/particle effects
- 24_mujoco_interactive_simulator - Interactive MuJoCo physics simulation
-
Create a new repository for your example:
mkdir vuer-example-my-feature cd vuer-example-my-feature git init -
Create the example structure:
vuer-example-my-feature/ ├── main.py # Main example code ├── README.md # Documentation ├── requirements.txt # Python dependencies ├── assets/ # Optional: asset files └── .gitignore -
Push to GitHub:
git add . git commit -m "Initial commit" git remote add origin https://github.com/your-org/vuer-example-my-feature.git git push -u origin main
-
Add as a submodule to this repository:
cd /path/to/vuer-examples git submodule add https://github.com/your-org/vuer-example-my-feature.git git commit -m "Add my-feature example"
If you have existing examples in vuer/docs/examples, use the provided migration script:
# Test first with dry-run
python setup_example_repos.py --dry-run
# Create individual repos for all examples
python setup_example_repos.py
# Or just one specific example
python setup_example_repos.py --example 01_trimeshAfter creating the individual repos and pushing them to GitHub:
# Edit add_submodules.sh to set your GitHub org
vim add_submodules.sh # Set GITHUB_ORG
# Add all as submodules
./add_submodules.sh
# Or add specific examples
./add_submodules.sh 01_trimesh 02_pointcloudHere's a minimal example structure:
# main.py
from vuer import Vuer
from vuer.schemas import DefaultScene, Sphere
app = Vuer()
@app.spawn(start=True)
async def main(session):
session.upsert @ DefaultScene(
Sphere(
key="my-sphere",
args=[0.5, 32, 32],
position=[0, 1, 0],
material={"color": "red"}
)
)
# Keep the session alive
while True:
await session.sleep(0.1)# requirements.txt
vuer>=0.1.0Each example maintains its own license. Please refer to individual example repositories for licensing information.
For questions or issues:
- Open an issue in the specific example repository
- Open an issue in the main Vuer repository
- Join the Vuer Discord community