Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BufferAttribute: warnOnce for deprecated methods #27595

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/core/BufferAttribute.js
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
@@ -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