Skip to main content

Module node_builder

Module node_builder 

Source
Expand description

the NodeBuilder is used to help create and build nodes within a scene. instead of having tons of parameters NodeBuilder splits node properties into different methods which decreases tedious code and increases readability

§Example

use maple::components::Event;
use maple::math;
use maple::nodes::{Buildable, Builder, Container, Empty, Node};

let node = Empty::builder()
    // Modify the node's initial transform
    .position((10.0, 0.0, 0.0))
    .scale_factor(10.0)
    .build();

Structs§

NodePrototype
a prototype node contains all the components that all nodes have but nothing else

Traits§

Buildable
Buildable nodes have a builder to configure nodes before they are added into a scene
Builder
the builder trait contains a bunch of default building methods for a builable node.