# Yew Spline Yew Spline is a Spline runtime component for Yew based on the [@splinetool/runtime NPM package](https://www.npmjs.com/package/@splinetool/runtime), so you can display Spline scenes in Yew. Spline is a 3d editor that let's you make interactive 3d scenes to be viewed on the web. For more information visit [https://spline.design/](https://spline.design/). ## How to use First you add `yew_spline` to your cargo.toml ```toml [dependencies] yew = "0.19.3^" yew_spline = "..." ``` Then you use the component in your Html. ## Examples __Use the splinecode URL__ ```rust use yew::prelude::*; use yew_spline::spline::Spline; #[function_component(App)] pub fn app() -> Html { html! { } } ``` --- __Use a local splinecode file__ If you download a splinecode file to use locally instead of loading it in from the Spline servers, you have to link the directory it's in, in the `index.html` file. ```html Yew Spline ``` In this example I have the standard src folder, but I have an assets folder with a spline folder nested inside. ```rust use yew::prelude::*; use yew_spline::spline::Spline; #[function_component(App)] pub fn app() -> Html { html! { } } ``` ## License Yew Spline is MIT licensed. See [license](LICENSE)