Expand description
Procedural trees. A Tree grows a trunk with branches (tapered tubes) and clusters of leaf
cards at the twigs. Bark and leaves are two Transient child meshes drawn with the built-in
builtin:bark and builtin:foliage shaders: leaves are cut out in the shader and sway in the
wind on the GPU, so the meshes are built only when a parameter changes.
use kvas_engine::tree::{Tree, build};
let (bark, leaves) = build(&Tree::default());
assert!(!bark.indices.is_empty() && !leaves.indices.is_empty());Structs§
- Tree
- A seeded procedural tree. Change any field in the Inspector and the tree regrows.
- Tree
Part - Marks a child mesh created for a tree (bark or leaves).
Enums§
- Tree
Style - Overall shape of a tree: Broadleaf (oak), Conifer (pine), Palm, or Bush.