2
0
Эх сурвалжийг харах

Utils: Added DynamicBufferAttribute to includes.

Mr.doob 10 жил өмнө
parent
commit
8930e5bd95

+ 3 - 2
src/core/BufferAttribute.js

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

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

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