scena 1.7.2

A Rust-native scene-graph renderer with typed scene state, glTF assets, and explicit prepare/render lifecycles.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use wasm_bindgen::prelude::*;

use super::wasm::{SceneHost, js_error};

#[wasm_bindgen]
impl SceneHost {
    #[wasm_bindgen(js_name = renderIntrospectionJson)]
    pub fn render_introspection_json(&self, detail: bool) -> Result<String, JsValue> {
        let capture = self.capture_rgba8_for_wasm().map_err(js_error)?;
        self.core
            .render_introspection_json_from_capture(&capture, detail)
            .map_err(js_error)
    }
}