SpatialButton class
A clickable 3D button in VR space.
Constructors
- SpatialButton({String name = 'button', required Transform3D? transform, required String label, required dynamic panel, Color labelColor = const Color(0xFFFFFFFF), Color idleColor = const Color(0xE0161B22), Color hoverColor = const Color(0xE01C2333), Color pressColor = const Color(0xE02E90FA), void onPress(Node)?})
Properties
- childCount → int
-
no setterinherited
-
children
→ List<
Node> -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverColor ↔ Color
-
getter/setter pair
- idleColor ↔ Color
-
getter/setter pair
- label ↔ String
-
getter/setter pair
- labelColor ↔ Color
-
getter/setter pair
- localAabb → Aabb
-
Override to provide local-space bounding box.
no setterinherited
- localMatrix → Matrix4
-
Local transform matrix.
no setterinherited
- name ↔ String
-
getter/setter pairinherited
- parent → Node?
-
no setterinherited
- pointable ↔ Pointable
-
latefinal
- pressColor ↔ Color
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transform → Transform3D
-
finalinherited
- visible ↔ bool
-
getter/setter pairinherited
- worldAabb → Aabb
-
Computes the AABB of this node in world space.
no setterinherited
- worldMatrix → Matrix4
-
World transform matrix (accumulated from root).
no setterinherited
- worldPosition → Vector3
-
World position extracted from world matrix.
no setterinherited
Methods
-
addChild(
Node child) → void -
inherited
-
collectVisible(
) → List< Node> -
Collects all visible nodes in the tree.
inherited
-
findChild(
String name) → Node? -
Finds a child by name recursively.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRender(
Canvas canvas, Matrix4 viewProjection) → void -
Override for custom rendering.
inherited
-
onTransformChanged(
) → void -
Called when any transform property changes.
inherited
-
onUpdate(
double dt) → void -
Override for custom per-frame logic.
inherited
-
removeChild(
Node child) → void -
inherited
-
removeFromParent(
) → void -
inherited
-
render(
Canvas canvas, Matrix4 viewProjection) → void -
Renders this node and children to the canvas.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
traverse(
void visitor(Node child)) → void -
Traverses the tree depth-first, calling visitor for each node.
inherited
-
update(
double dt) → void -
Called once per frame before rendering.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited