Ben Houston пре 10 година
родитељ
комит
56e20cb55a
1 измењених фајлова са 4 додато и 5 уклоњено
  1. 4 5
      src/animation/PropertyBinding.js

+ 4 - 5
src/animation/PropertyBinding.js

@@ -59,6 +59,7 @@ THREE.PropertyBinding.prototype = {
 
 
 	apply: function() {
 	apply: function() {
 
 
+		// for speed capture the setter pattern as a closure.
 		if( ! this.internalApply ) {
 		if( ! this.internalApply ) {
 
 
 			 //console.log( "PropertyBinding.set( " + value + ")" );
 			 //console.log( "PropertyBinding.set( " + value + ")" );
@@ -125,9 +126,6 @@ THREE.PropertyBinding.prototype = {
 					targetObject.matrixWorldNeedsUpdate = true;
 					targetObject.matrixWorldNeedsUpdate = true;
 				}
 				}
 			}
 			}
-			else {
-				this.triggerDirty = function() {};
-			}
 
 
 		}
 		}
 
 
@@ -137,9 +135,10 @@ THREE.PropertyBinding.prototype = {
 		}
 		}
 
 
 		this.internalApply();
 		this.internalApply();
-		this.triggerDirty();
-	
 
 
+		if( this.triggerDirty ) {
+			this.triggerDirty();
+		}
 	},
 	},
 
 
 	get: function() {
 	get: function() {