提交 7b164843 编写于 作者: M Mr.doob

Updated builds.

上级 bc6d76bc
......@@ -8869,21 +8869,6 @@
onUploadCallback: function () {},
setArray: function ( array ) {
if ( Array.isArray( array ) ) {
throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
}
this.count = array !== undefined ? array.length / this.itemSize : 0;
this.array = array;
return this;
},
setDynamic: function ( value ) {
this.dynamic = value;
......@@ -9635,9 +9620,7 @@
}
this.attributes[ name ] = attribute;
return this;
return this.setAttribute( name, attribute );
},
......@@ -9647,6 +9630,14 @@
},
setAttribute: function ( name, attribute ) {
this.attributes[ name ] = attribute;
return this;
},
removeAttribute: function ( name ) {
delete this.attributes[ name ];
......@@ -25993,21 +25984,6 @@
onUploadCallback: function () {},
setArray: function ( array ) {
if ( Array.isArray( array ) ) {
throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
}
this.count = array !== undefined ? array.length / this.stride : 0;
this.array = array;
return this;
},
setDynamic: function ( value ) {
this.dynamic = value;
......@@ -48169,11 +48145,26 @@
return this.array.length;
}
},
}
} );
Object.assign( BufferAttribute.prototype, {
copyIndicesArray: function ( /* indices */ ) {
console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
},
setArray: function ( array ) {
console.warn( 'THREE.BufferAttribute: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
this.count = array !== undefined ? array.length / this.itemSize : 0;
this.array = array;
return this;
}
} );
......@@ -48237,6 +48228,21 @@
} );
Object.assign( InterleavedBuffer.prototype, {
setArray: function ( array ) {
console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
this.count = array !== undefined ? array.length / this.stride : 0;
this.array = array;
return this;
}
} );
//
Object.assign( ExtrudeBufferGeometry.prototype, {
此差异已折叠。
......@@ -8863,21 +8863,6 @@ Object.assign( BufferAttribute.prototype, {
onUploadCallback: function () {},
setArray: function ( array ) {
if ( Array.isArray( array ) ) {
throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
}
this.count = array !== undefined ? array.length / this.itemSize : 0;
this.array = array;
return this;
},
setDynamic: function ( value ) {
this.dynamic = value;
......@@ -9629,9 +9614,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
}
this.attributes[ name ] = attribute;
return this;
return this.setAttribute( name, attribute );
},
......@@ -9641,6 +9624,14 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
},
setAttribute: function ( name, attribute ) {
this.attributes[ name ] = attribute;
return this;
},
removeAttribute: function ( name ) {
delete this.attributes[ name ];
......@@ -25982,21 +25973,6 @@ Object.assign( InterleavedBuffer.prototype, {
onUploadCallback: function () {},
setArray: function ( array ) {
if ( Array.isArray( array ) ) {
throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
}
this.count = array !== undefined ? array.length / this.stride : 0;
this.array = array;
return this;
},
setDynamic: function ( value ) {
this.dynamic = value;
......@@ -48160,11 +48136,26 @@ Object.defineProperties( BufferAttribute.prototype, {
return this.array.length;
}
},
}
} );
Object.assign( BufferAttribute.prototype, {
copyIndicesArray: function ( /* indices */ ) {
console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
},
setArray: function ( array ) {
console.warn( 'THREE.BufferAttribute: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
this.count = array !== undefined ? array.length / this.itemSize : 0;
this.array = array;
return this;
}
} );
......@@ -48228,6 +48219,21 @@ Object.defineProperties( BufferGeometry.prototype, {
} );
Object.assign( InterleavedBuffer.prototype, {
setArray: function ( array ) {
console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
this.count = array !== undefined ? array.length / this.stride : 0;
this.array = array;
return this;
}
} );
//
Object.assign( ExtrudeBufferGeometry.prototype, {
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册