Babylon.rs
A WebAssembly wrapper for Babylon.js in Rust.
This project is pre-alpha and the api is in active exploration. Current priorities:
- get a basic GLTF up
- get a camera
- get some sort of interaction
This project uses js_ffi
for javascript binding and lazy_static
for global static singletons fairly extensively.
Idioms
- Scenes hold 3D objects
- Materials determine how a 3D object looks
- When an 3D object drops it's removed from the scene
HelloWorld
use *;
extern crate lazy_static;
use Mutex;
lazy_static!
See this demo here ( be sure to play with mouse and arrow keys :arrow_left: :arrow_up: :arrow_down: :arrow_right:!)
Materials
let mut game = GAME.lock.unwrap;
for _ in 0..10
See this demo here ( be sure to play with mouse and arrow keys :arrow_left: :arrow_up: :arrow_down: :arrow_right:!)
Other Demos
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.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in babylon.rs
by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.