Then to dynamically change the color of a node, you merely store a
"ui.color" attribute on the node with a real number between 0 and 1, the
value being interpolated between the colors described by fill-color. If
you have two colors, 0.5 is a mix of the two colors, 0 is the first
color and 1 the second color. If you have 3 colors, increments of 0.5
(0, 0.5, 1) give you each exact color and values in between give you a
mix of the two closest colors... etc.
To change dynamically the size of an object, you can use the "size-mode"
CSS property:
node.changingSize {
size-mode: dyn-size;
}
Then to change its size you can use the "ui.size" attribute, giving it
Archives gérées par MHonArc 2.6.16.