Repe [T3DU] and Moises Jpelaez updates

This commit is contained in:
2026-05-12 23:54:06 -07:00
parent 6b404f9da6
commit 39091e8db3
147 changed files with 5539 additions and 1750 deletions

View File

@ -1,5 +1,9 @@
package leenkx.logicnode;
import iron.math.Quat;
import iron.math.Vec4;
import iron.math.Mat4;
class RetainValueNode extends LogicNode {
var value: Dynamic = null;
@ -9,7 +13,19 @@ class RetainValueNode extends LogicNode {
}
override function run(from: Int) {
value = inputs[1].get();
var retainValue = inputs[1].get();
switch(Type.getClassName(Type.getClass(retainValue))){
case "iron.math.Vec4":
value = (cast retainValue: Vec4).clone();
case "iron.math.Mat4":
value = (cast retainValue: Mat4).clone();
case "iron.math.Quat":
var q: Quat = new Quat();
value = q.setFrom((cast retainValue: Quat));
default:
value = retainValue;
}
runOutput(0);
}