Преглед на файлове

Utils: Added DynamicBufferAttribute to includes.

Mr.doob преди 10 години
родител
ревизия
8930e5bd95
променени са 3 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 3 2
      src/core/BufferAttribute.js
  2. 1 1
      src/core/DynamicBufferAttribute.js
  3. 1 0
      utils/build/includes/common.json

+ 3 - 2
src/core/BufferAttribute.js

@@ -36,7 +36,8 @@ THREE.BufferAttribute.prototype = {
 
 	set: function ( value, offset ) {
 
-		offset !== undefined ? offset : offset = 0;
+		if ( offset === undefined ) offset = 0;
+
 		this.array.set( value, offset );
 
 		return this;
@@ -102,7 +103,7 @@ THREE.BufferAttribute.prototype = {
 		return this;
 
 	},
-	
+
 	clone: function () {
 
 		return new THREE.BufferAttribute( new this.array.constructor( this.array ), this.itemSize );

+ 1 - 1
src/core/DynamicBufferAttribute.js

@@ -37,7 +37,7 @@ THREE.DynamicBufferAttribute.prototype = {
 
 	set: function ( value, offset ) {
 
-		offset !== undefined ? offset : offset = 0;
+		if ( offset === undefined ) offset = 0;
 
 		this.array.set( value, offset );
 

+ 1 - 0
utils/build/includes/common.json

@@ -25,6 +25,7 @@
 	"src/core/Face3.js",
 	"src/core/Face4.js",
 	"src/core/BufferAttribute.js",
+	"src/core/DynamicBufferAttribute.js",
 	"src/core/BufferGeometry.js",
 	"src/core/Geometry.js",
 	"src/cameras/Camera.js",