random color node fix
This commit is contained in:
parent
b9a220fbcb
commit
50a1994867
|
@ -4,18 +4,17 @@ import iron.math.Vec4;
|
||||||
|
|
||||||
class RandomColorNode extends LogicNode {
|
class RandomColorNode extends LogicNode {
|
||||||
|
|
||||||
var v = new Vec4();
|
|
||||||
|
|
||||||
public function new(tree: LogicTree) {
|
public function new(tree: LogicTree) {
|
||||||
super(tree);
|
super(tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
override function get(from: Int): Dynamic {
|
override function get(from: Int): Dynamic {
|
||||||
|
|
||||||
var r = Math.random();
|
var r = Math.random();
|
||||||
var g = Math.random();
|
var g = Math.random();
|
||||||
var b = Math.random();
|
var b = Math.random();
|
||||||
// var a = Math.random();
|
// var a = Math.random();
|
||||||
v.set(r, g, b);
|
var v = new Vec4(r, g, b);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue