Build and run an example, in this case the triangle
example:
$ cargo run --release --example triangle
See web/README.md
.
All of the examples builds to both native (desktop, mobile or whatever target specified) and WebAssembly (wasm) that can be run in a browser.
Because they should run in a browser and to keep the same code for native and wasm, all loading happens async.
If your application is native only, you can avoid the async runtime (tokio
or async-std
) and use three_d_asset::load
instead of three_d_asset::load_async
.
This is the recommended starting point for a gentle introduction to three-d
.
This is the same as the Triangle
example, except it only uses the core module and not the renderer module.
This example shows how depth ordering is currently working for InstancedMesh
objects with transparency.
Shows how to easily combine a custom winit window with three-d
rendering.
Shows how to create multiple winit windows and render with three-d
.
Headless [code]
This example does not create a window but render directly to a render target and saves the result to disk. Therefore, this example does not work on web.