Browse Source

prevent allocation of hxd.Quat

ShiroSmith 6 years ago
parent
commit
f28b501c14
1 changed files with 3 additions and 1 deletions
  1. 3 1
      h3d/anim/SmoothTarget.hx

+ 3 - 1
h3d/anim/SmoothTarget.hx

@@ -87,11 +87,13 @@ class SmoothTarget extends Animation {
 		return cast objects;
 	}
 
+
+	var q1 : Quat = new h3d.Quat();
+	var qout : Quat = new h3d.Quat();
 	@:noDebug
 	override function sync( decompose = false ) {
 		if( decompose ) throw "assert";
 		var objects = getSmoothObjects();
-		var q1 = new h3d.Quat(), qout = new h3d.Quat();
 		target.sync(true);
 		for( o in objects ) {
 			var m = @:privateAccess if( o.targetSkin != null ) o.targetSkin.currentRelPose[o.targetJoint] else if( o.targetObject != null ) o.targetObject.defaultTransform else null;