5 releases (3 breaking)
| 0.5.0 | Sep 27, 2025 |
|---|---|
| 0.4.0 | Sep 11, 2025 |
| 0.3.1 | Aug 9, 2025 |
| 0.3.0 | Aug 9, 2025 |
| 0.1.0 | Jul 10, 2025 |
#1103 in Graphics APIs
401 downloads per month
Used in threecrate
730KB
15K
SLoC
ThreeCrate Visualization
Real-time 3D visualization and interactive viewing for point clouds and meshes.
Features
- Interactive Viewer: Real-time 3D visualization with camera controls
- Point Cloud Rendering: GPU-accelerated point cloud display
- Mesh Rendering: Triangle mesh visualization with lighting
- Camera Controls: Orbit, pan, zoom, and reset functionality
- Cross-platform: Works on Windows, macOS, and Linux via winit and wgpu
Camera Controls
- Mouse Drag: Orbit around the scene
- Mouse Scroll: Zoom in/out
- Keyboard Shortcuts:
O: Switch to orbit modeP: Switch to pan modeZ: Switch to zoom modeR: Reset camera position
Usage
Add this to your Cargo.toml:
[dependencies]
threecrate-visualization = "0.1.0"
threecrate-core = "0.1.0"
Example
use threecrate_visualization::InteractiveViewer;
use threecrate_core::{PointCloud, Point3f};
// Create point cloud
let points = vec![
Point3f::new(0.0, 0.0, 0.0),
Point3f::new(1.0, 0.0, 0.0),
Point3f::new(0.0, 1.0, 0.0),
];
let cloud = PointCloud::from_points(points);
// Create and run viewer
let mut viewer = InteractiveViewer::new()?;
viewer.set_point_cloud(&cloud);
viewer.run()?;
Architecture
- Camera System: Flexible camera with spherical coordinates
- GPU Rendering: Hardware-accelerated rendering via wgpu
- Event Handling: Responsive input handling with winit
- Cross-platform: Native windowing and input across platforms
Requirements
- GPU: Modern graphics card with Vulkan, Metal, or DirectX 12 support
- RAM: Minimum 2GB for large point clouds
- OS: Windows 10+, macOS 10.15+, or Linux with graphics drivers
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Dependencies
~49–90MB
~1.5M SLoC