ModelComponent class
Draws a 3-D model (glTF 2.0, .glb or .gltf) at its entity's
transform. The model's own +Y-up axes are turned into the engine's.
Constructors
Properties
- bounds → Aabb3
-
The loaded model's bounds in the entity's own space (engine axes), or
empty until it has loaded. Runtime only, never saved.
final
- castShadows ↔ bool
-
Whether it casts shadows (where shadows are on).
getter/setter pair
- componentType → Type
-
Type identifier for this component
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
materials
↔ Map<
String, String> -
Material files (
*.material.json) drawn instead of the model's own materials: by a material's name, by#and its index (#0), or*for every one. Empty draws the model as it is.getter/setter pair - model ↔ String
-
Asset path, for example
assets/models/crate.glb. Empty draws nothing.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- visible ↔ bool
-
Whether it is drawn.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAttach(
EntityId entityId) → void -
Called when this component is added to an entity.
inherited
-
onDetach(
EntityId entityId) → void -
Called when this component is removed from an entity.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited