瀏覽代碼

Matrix4.multipleList - easy multiplication of an array of Matrix4. Useful for hierarchies.

Ben Houston 10 年之前
父節點
當前提交
8d503f3b1b
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      src/math/Matrix4.js

+ 13 - 0
src/math/Matrix4.js

@@ -441,6 +441,19 @@ THREE.Matrix4.prototype = {
 
 	},
 
+
+	multiplyList: function ( listOfMatrices ) {
+
+		for (var i = 0, il = listOfMatrices.length; i < il ; i++) {
+
+		  this.multiplyMatrices( this, listOfMatrices[ i ] );
+
+		}
+
+		return this;
+
+	},
+
 	multiplyToArray: function ( a, b, r ) {
 
 		var te = this.elements;