Search…
Rive Actor & Node
Accessing Properties of a Node
This is the manual for the old version of Rive (formerly Flare). Visit the Help Center for the new Rive here.
implements ActorNode class
The Actor is the container for the 'Artboards' and assets. You can access a node through the 'Artboard' to get and set its properties at runtime.

Properties

Translates the Node's local 'x' and 'y' axis relative to the parent.

Scale X & Y

The local scale value of the Node in the 'x' and 'y' axis. Changing this scales the node and all of its children.

Rotation

The local rotation of an Node in radians relative to the parent. It also rotates any of the nodes children respectively.

Opacity

The transparency of an Node on a scale of 0 to 1. The children are also affected by this opacity.
Flutter Sample
Swift Sample
React Sample
JS Sample
C++ Sample
1
import 'package:flare_flutter/flare_actor.dart';
2
...
3
void initialize(FlutterActorArtboard artboard) {
4
_artboard = artboard;
5
ActorNode myNode = _artboard.getNode("nodeString");
6
myNode.y = 0.00;
7
myNode.x = 0.00;
8
myNode.scaleX = 0.00;
9
myNode.scaleY = 0.00;
10
myNode.rotation = 0.00;
11
myNode.opacity = 0.00;
12
}
Copied!
1
let myNode = artboard?.getNode(name: "Face")
2
print(myNode?.x)
3
print(myNode?.y)
4
print(myNode?.scaleX)
5
print(myNode?.scaleY)
6
print(myNode?.rotation)
7
print(myNode?.opacity)
Copied!
1
import FlareComponent from 'flare-react';
2
3
initialize(artboard)
4
{
5
...
6
this._MyNode = artboard.getNode("nodeString");
7
this._MyNode.x = 0;
8
this._MyNode.y = 0;
9
this._MyNode.scaleX = 0;
10
this._MyNode.scaleY = 0;
11
this._MyNode.rotation = 0;
12
this._MyNode.opacity = 1;
13
...
14
}
Copied!
1
...
2
actorInstance.initialize(this._Graphics);
3
4
this._MyNode = actorInstance.getNode("NodeString");
5
console.log(this._MyNode.x);
6
console.log(this._MyNode.x);
7
console.log(this._MyNode.y);
8
console.log(this._MyNode.scaleX);
9
console.log(this._MyNode.scaleY);
10
console.log(this._MyNode.rotation);
11
console.log(this._MyNode.opacity);
12
...
Copied!
1
...
2
flare::ActorNode* myNode = static_cast<flare::ActorNode*>(artboard->component("NodeName"));
3
printf("node's x %f\n", myNode->x());
4
printf("node's y %f\n", myNode->y());
5
printf("node's scale x %f\n", myNode->scaleX());
6
printf("node's scale y %f\n", myNode->scaleY());
7
printf("node's rotation %f\n", myNode->rotation());
8
printf("node's opactiy %f\n", myNode->opacity());
9
...
Copied!
Last modified 6mo ago
Copy link
Contents
Properties