Expand description
Dioxus Three - A Three.js component for Dioxus
Provides a simple component for embedding interactive 3D scenes using Three.js within Dioxus applications.
§Platform Support
- Desktop (Windows, macOS, Linux): Uses WebView with iframe
- Web (WASM): Renders directly to canvas element
- Mobile (iOS, Android): Uses WebView (similar to desktop)
Supports multiple 3D formats: OBJ, FBX, GLTF, GLB, STL, PLY, and more. Also supports custom GLSL shaders for advanced visual effects.
Re-exports§
pub use gizmos::Gizmo;pub use gizmos::GizmoEvent;pub use gizmos::GizmoMode;pub use gizmos::GizmoSpace;pub use gizmos::GizmoTransform;pub use input::Camera;pub use input::CursorStyle;pub use input::EntityId;pub use input::GestureEvent;pub use input::HitInfo;pub use input::MouseButton;pub use input::PointerDragEvent;pub use input::PointerEvent;pub use input::RaycastConfig;pub use input::Raycaster;pub use input::Vector2;pub use input::Vector3;pub use selection::Selection;pub use selection::SelectionMode;pub use selection::SelectionStyle;
Modules§
- gizmos
- Gizmos and transform manipulators for Dioxus Three
- input
- Input handling and raycasting support for Dioxus Three
- selection
- Selection management for Dioxus Three
Structs§
- Model
Config - Configuration for a single model in a multi-model scene
- Shader
Config - Custom shader configuration
- Three
View Props - Properties for the ThreeView component
Enums§
- Model
Format - 3D model format types
- Shader
Preset - Built-in shader presets
Functions§
- Three
View - A Three.js 3D viewer component for Dioxus Desktop
- build_
loader_ scripts_ for_ models - Build loader scripts for multiple models
- build_
loader_ scripts_ single - Build loader scripts for single model
- build_
multi_ model_ loading_ interactive - Build JavaScript code for loading multiple models (interactive version with entity IDs)
- build_
shader_ code - Build shader code for the Three.js scene
- build_
single_ model_ loading_ interactive - Build JavaScript code for loading a single model (interactive version with entity ID)
- generate_
three_ js_ html - Generate the HTML with embedded Three.js Includes full raycasting, selection, and gizmo interaction support
- models_
to_ json - Serialize model configs to JSON for postMessage updates (desktop iframe)