dioxus_spline/lib.rs
1//! This crate provides a simple [dioxus] component for rendering [Spline] scenes in web.
2//! It also exposes interfaces to `SPEObject` and Spline `Application` from @splinetool/runtime.
3//! Currently, it is highly experimental and a lot of functionality is untested, but rendering
4//! Scenes and simple callbacks should work just fine!
5//!
6//! 🌈 Spline is a friendly 3d collaborative design tool for the web.
7//!
8//! [dioxus]: https://dioxuslabs.com/
9//! [Spline]: https://spline.design/
10//!
11//! # Usage
12//!
13//! First, add this to your Cdargo.toml
14//!
15//! ```toml
16//! [dependencies]
17//! dioxus-spline = "0.2.0"
18//! ```
19//!
20//! Next add the `Spline` component to your dioxus `App`:
21//!
22//! ```
23//! fn App() -> Element {
24//! rsx! {
25//! Spline { scene: String::from("https://prod.spline.design/PWOr9wT1pcAkbAA7/scene.splinecode") }
26//! }
27//! }
28//! ```
29//!
30//! You should see your scene now!
31
32/// The runtime with `SplineApplication` and `SplineEvent`
33pub mod runtime;
34/// The wrapper around JS `SPEObject`
35pub mod speobject;
36/// The `Spline` component itself
37pub mod spline;
38
39pub use runtime::{SplineApplication, SplineEvent, SplineEventName};
40pub use speobject::SPEObject;
41pub use spline::Spline;