-
Notifications
You must be signed in to change notification settings - Fork 0
Component
Shaye Garg edited this page Sep 29, 2021
·
1 revision
Components are the building blocks of ModelBehaviors. This directly maps to XML's <Component>
.
You create components like:
component <name: expr> {}
component <name: expr> on <node: expr> {}
// Which becomes:
component "MyComponent" {}
component "MyComponent" on "MyNode" {}
name
: The name of the component, which is a unique ID that will be used to refer to it elsewhere.
node
: An optional GLTF node that this component is situated on.
Behavior expressions like interaction
, emissive
, and visible
will control the node
of the component they are situated on.
Inside component
s, you can put anything you would put inside a template
.