Explorar o código

Can blend with SimpleBlend.hx. SimpleBlend.hx decompose support.

clementlandrin hai 2 semanas
pai
achega
26dd30a417
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  1. 14 0
      h3d/anim/SimpleBlend.hx

+ 14 - 0
h3d/anim/SimpleBlend.hx

@@ -18,9 +18,23 @@ class SimpleBlend extends Transition {
 		for( o in anim2.objects.copy() )
 		for( o in anim2.objects.copy() )
 			if( !objectsMap.get(o.objectName) )
 			if( !objectsMap.get(o.objectName) )
 				anim2.unbind(o.objectName);
 				anim2.unbind(o.objectName);
+		objects = [];
+		objects = objects.concat(anim1.getObjects());
+		objects = objects.concat(anim2.getObjects());
 		isInstance = true;
 		isInstance = true;
 	}
 	}
 
 
+	override function sync( decompose : Bool = false ) {
+		if ( !decompose )
+			super.sync(false);
+		else {
+			// decompose is naturally supported
+			anim1.isSync = anim2.isSync = false;
+			anim1.sync(true);
+			anim2.sync(true);
+		}
+	}
+
 	override function clone(?a : Animation) : Animation {
 	override function clone(?a : Animation) : Animation {
 		var a : SimpleBlend = cast a;
 		var a : SimpleBlend = cast a;
 		if( a == null )
 		if( a == null )