Skip to content

Commit

Permalink
BufferAttribute: warnOnce for deprecated methods (#27595)
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Jan 19, 2024
1 parent fe3a039 commit 597b839
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/BufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Vector2 } from '../math/Vector2.js';
import { denormalize, normalize } from '../math/MathUtils.js';
import { StaticDrawUsage, FloatType } from '../constants.js';
import { fromHalfFloat, toHalfFloat } from '../extras/DataUtils.js';
import { warnOnce } from '../utils.js';

const _vector = /*@__PURE__*/ new Vector3();
const _vector2 = /*@__PURE__*/ new Vector2();
Expand Down Expand Up @@ -45,7 +46,7 @@ class BufferAttribute {

get updateRange() {

console.warn( 'THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159
warnOnce( 'THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159
return this._updateRange;

}
Expand Down
3 changes: 2 additions & 1 deletion src/core/InterleavedBuffer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as MathUtils from '../math/MathUtils.js';
import { StaticDrawUsage } from '../constants.js';
import { warnOnce } from '../utils.js';

class InterleavedBuffer {

Expand Down Expand Up @@ -31,7 +32,7 @@ class InterleavedBuffer {

get updateRange() {

console.warn( 'THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159
warnOnce( 'THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159
return this._updateRange;

}
Expand Down

0 comments on commit 597b839

Please sign in to comment.