Well, there are several ways you could do it:
- Use
addData()
or replaceData()
to change the underlying node data;
- Use
getNode()
, then change values on the node's .data
property (note - don't change the properties on the node itself - those get recalculated every frame). Then call updateStyle()
.
- Use a
nodeStyleFunction
that always sets all the values, and when something changes call updateStyle()
.
In graph editor we use the 3rd option, but they are all valid - choose the one which best fits your coding style.