|
@@ -5,7 +5,11 @@
|
|
|
import { Audio } from './audio/Audio.js';
|
|
|
import { AudioAnalyser } from './audio/AudioAnalyser.js';
|
|
|
import { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
|
|
|
-import { FlatShading } from './constants.js';
|
|
|
+import {
|
|
|
+ FlatShading,
|
|
|
+ StaticDrawUsage,
|
|
|
+ DynamicDrawUsage
|
|
|
+} from './constants.js';
|
|
|
import {
|
|
|
Float64BufferAttribute,
|
|
|
Float32BufferAttribute,
|
|
@@ -1163,13 +1167,33 @@ Object.defineProperties( BufferAttribute.prototype, {
|
|
|
console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );
|
|
|
return this.array.length;
|
|
|
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dynamic: {
|
|
|
+ get: function () {
|
|
|
+
|
|
|
+ console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
|
|
|
+ return this.usage === DynamicDrawUsage;
|
|
|
+
|
|
|
+ },
|
|
|
+ set: function ( value ) {
|
|
|
+
|
|
|
+ console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
|
|
|
+ this.setUsage( value );
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} );
|
|
|
|
|
|
Object.assign( BufferAttribute.prototype, {
|
|
|
+ setDynamic: function ( value ) {
|
|
|
+
|
|
|
+ console.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );
|
|
|
+ this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
|
|
|
+ return this;
|
|
|
|
|
|
+ },
|
|
|
copyIndicesArray: function ( /* indices */ ) {
|
|
|
|
|
|
console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
|
|
@@ -1185,7 +1209,6 @@ Object.assign( BufferAttribute.prototype, {
|
|
|
return this;
|
|
|
|
|
|
}
|
|
|
-
|
|
|
} );
|
|
|
|
|
|
Object.assign( BufferGeometry.prototype, {
|
|
@@ -1247,8 +1270,33 @@ Object.defineProperties( BufferGeometry.prototype, {
|
|
|
|
|
|
} );
|
|
|
|
|
|
+Object.defineProperties( InterleavedBuffer.prototype, {
|
|
|
+
|
|
|
+ dynamic: {
|
|
|
+ get: function () {
|
|
|
+
|
|
|
+ console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
|
|
|
+ return this.usage === DynamicDrawUsage;
|
|
|
+
|
|
|
+ },
|
|
|
+ set: function ( value ) {
|
|
|
+
|
|
|
+ console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
|
|
|
+ this.setUsage( value );
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+} );
|
|
|
+
|
|
|
Object.assign( InterleavedBuffer.prototype, {
|
|
|
+ setDynamic: function ( value ) {
|
|
|
|
|
|
+ console.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' );
|
|
|
+ this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
setArray: function ( array ) {
|
|
|
|
|
|
console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
|
|
@@ -1259,7 +1307,6 @@ Object.assign( InterleavedBuffer.prototype, {
|
|
|
return this;
|
|
|
|
|
|
}
|
|
|
-
|
|
|
} );
|
|
|
|
|
|
//
|