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

Core: Switch to this.is* = true. #24047

Merged
merged 6 commits into from May 20, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions src/animation/AnimationObjectGroup.js
Expand Up @@ -34,6 +34,8 @@ class AnimationObjectGroup {

constructor() {

this.isAnimationObjectGroup = true;

this.uuid = MathUtils.generateUUID();

// cached objects followed by the active ones
Expand Down Expand Up @@ -382,6 +384,4 @@ class AnimationObjectGroup {

}

AnimationObjectGroup.prototype.isAnimationObjectGroup = true;

export { AnimationObjectGroup };
5 changes: 2 additions & 3 deletions src/cameras/ArrayCamera.js
Expand Up @@ -6,13 +6,12 @@ class ArrayCamera extends PerspectiveCamera {

super();

this.isArrayCamera = true;

this.cameras = array;

}

}

ArrayCamera.prototype.isArrayCamera = true;


export { ArrayCamera };
4 changes: 2 additions & 2 deletions src/cameras/Camera.js
Expand Up @@ -7,6 +7,8 @@ class Camera extends Object3D {

super();

this.isCamera = true;

this.type = 'Camera';

this.matrixWorldInverse = new Matrix4();
Expand Down Expand Up @@ -63,6 +65,4 @@ class Camera extends Object3D {

}

Camera.prototype.isCamera = true;

export { Camera };
4 changes: 2 additions & 2 deletions src/cameras/OrthographicCamera.js
Expand Up @@ -6,6 +6,8 @@ class OrthographicCamera extends Camera {

super();

this.isOrthographicCamera = true;

this.type = 'OrthographicCamera';

this.zoom = 1;
Expand Down Expand Up @@ -131,6 +133,4 @@ class OrthographicCamera extends Camera {

}

OrthographicCamera.prototype.isOrthographicCamera = true;

export { OrthographicCamera };
4 changes: 2 additions & 2 deletions src/cameras/PerspectiveCamera.js
Expand Up @@ -7,6 +7,8 @@ class PerspectiveCamera extends Camera {

super();

this.isPerspectiveCamera = true;

this.type = 'PerspectiveCamera';

this.fov = fov;
Expand Down Expand Up @@ -228,6 +230,4 @@ class PerspectiveCamera extends Camera {

}

PerspectiveCamera.prototype.isPerspectiveCamera = true;

export { PerspectiveCamera };
7 changes: 4 additions & 3 deletions src/core/BufferAttribute.js
Expand Up @@ -17,6 +17,8 @@ class BufferAttribute {

}

this.isBufferAttribute = true;

this.name = '';

this.array = array;
Expand Down Expand Up @@ -399,8 +401,6 @@ class BufferAttribute {

}

BufferAttribute.prototype.isBufferAttribute = true;

//

class Int8BufferAttribute extends BufferAttribute {
Expand Down Expand Up @@ -479,11 +479,12 @@ class Float16BufferAttribute extends BufferAttribute {

super( new Uint16Array( array ), itemSize, normalized );

this.isFloat16BufferAttribute = true;

}

}

Float16BufferAttribute.prototype.isFloat16BufferAttribute = true;

class Float32BufferAttribute extends BufferAttribute {

Expand Down
4 changes: 2 additions & 2 deletions src/core/BufferGeometry.js
Expand Up @@ -25,6 +25,8 @@ class BufferGeometry extends EventDispatcher {

super();

this.isBufferGeometry = true;

Object.defineProperty( this, 'id', { value: _id ++ } );

this.uuid = MathUtils.generateUUID();
Expand Down Expand Up @@ -1125,6 +1127,4 @@ class BufferGeometry extends EventDispatcher {

}

BufferGeometry.prototype.isBufferGeometry = true;

export { BufferGeometry };
4 changes: 2 additions & 2 deletions src/core/GLBufferAttribute.js
Expand Up @@ -2,6 +2,8 @@ class GLBufferAttribute {

constructor( buffer, type, itemSize, elementSize, count ) {

this.isGLBufferAttribute = true;

this.buffer = buffer;
this.type = type;
this.itemSize = itemSize;
Expand Down Expand Up @@ -53,6 +55,4 @@ class GLBufferAttribute {

}

GLBufferAttribute.prototype.isGLBufferAttribute = true;

export { GLBufferAttribute };
4 changes: 2 additions & 2 deletions src/core/InstancedBufferAttribute.js
Expand Up @@ -16,6 +16,8 @@ class InstancedBufferAttribute extends BufferAttribute {

super( array, itemSize, normalized );

this.isInstancedBufferAttribute = true;

this.meshPerAttribute = meshPerAttribute;

}
Expand Down Expand Up @@ -44,6 +46,4 @@ class InstancedBufferAttribute extends BufferAttribute {

}

InstancedBufferAttribute.prototype.isInstancedBufferAttribute = true;

export { InstancedBufferAttribute };
4 changes: 2 additions & 2 deletions src/core/InstancedBufferGeometry.js
Expand Up @@ -6,6 +6,8 @@ class InstancedBufferGeometry extends BufferGeometry {

super();

this.isInstancedBufferGeometry = true;

this.type = 'InstancedBufferGeometry';
this.instanceCount = Infinity;

Expand Down Expand Up @@ -41,6 +43,4 @@ class InstancedBufferGeometry extends BufferGeometry {

}

InstancedBufferGeometry.prototype.isInstancedBufferGeometry = true;

export { InstancedBufferGeometry };
4 changes: 2 additions & 2 deletions src/core/InstancedInterleavedBuffer.js
Expand Up @@ -6,6 +6,8 @@ class InstancedInterleavedBuffer extends InterleavedBuffer {

super( array, stride );

this.isInstancedInterleavedBuffer = true;

this.meshPerAttribute = meshPerAttribute;

}
Expand Down Expand Up @@ -43,6 +45,4 @@ class InstancedInterleavedBuffer extends InterleavedBuffer {

}

InstancedInterleavedBuffer.prototype.isInstancedInterleavedBuffer = true;

export { InstancedInterleavedBuffer };
4 changes: 2 additions & 2 deletions src/core/InterleavedBuffer.js
Expand Up @@ -5,6 +5,8 @@ class InterleavedBuffer {

constructor( array, stride ) {

this.isInterleavedBuffer = true;

this.array = array;
this.stride = stride;
this.count = array !== undefined ? array.length / stride : 0;
Expand Down Expand Up @@ -140,6 +142,4 @@ class InterleavedBuffer {

}

InterleavedBuffer.prototype.isInterleavedBuffer = true;

export { InterleavedBuffer };
4 changes: 2 additions & 2 deletions src/core/InterleavedBufferAttribute.js
Expand Up @@ -7,6 +7,8 @@ class InterleavedBufferAttribute {

constructor( interleavedBuffer, itemSize, offset, normalized = false ) {

this.isInterleavedBufferAttribute = true;

this.name = '';

this.data = interleavedBuffer;
Expand Down Expand Up @@ -276,7 +278,5 @@ class InterleavedBufferAttribute {

}

InterleavedBufferAttribute.prototype.isInterleavedBufferAttribute = true;


export { InterleavedBufferAttribute };
4 changes: 2 additions & 2 deletions src/core/Object3D.js
Expand Up @@ -31,6 +31,8 @@ class Object3D extends EventDispatcher {

super();

this.isObject3D = true;

Object.defineProperty( this, 'id', { value: _object3DId ++ } );

this.uuid = MathUtils.generateUUID();
Expand Down Expand Up @@ -922,6 +924,4 @@ class Object3D extends EventDispatcher {
Object3D.DefaultUp = new Vector3( 0, 1, 0 );
Object3D.DefaultMatrixAutoUpdate = true;

Object3D.prototype.isObject3D = true;

export { Object3D };
4 changes: 2 additions & 2 deletions src/extras/curves/ArcCurve.js
Expand Up @@ -6,12 +6,12 @@ class ArcCurve extends EllipseCurve {

super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );

this.isArcCurve = true;

this.type = 'ArcCurve';

}

}

ArcCurve.prototype.isArcCurve = true;

export { ArcCurve };
4 changes: 2 additions & 2 deletions src/extras/curves/CatmullRomCurve3.js
Expand Up @@ -87,6 +87,8 @@ class CatmullRomCurve3 extends Curve {

super();

this.isCatmullRomCurve3 = true;

this.type = 'CatmullRomCurve3';

this.points = points;
Expand Down Expand Up @@ -248,6 +250,4 @@ class CatmullRomCurve3 extends Curve {

}

CatmullRomCurve3.prototype.isCatmullRomCurve3 = true;

export { CatmullRomCurve3 };
4 changes: 2 additions & 2 deletions src/extras/curves/CubicBezierCurve.js
Expand Up @@ -8,6 +8,8 @@ class CubicBezierCurve extends Curve {

super();

this.isCubicBezierCurve = true;

this.type = 'CubicBezierCurve';

this.v0 = v0;
Expand Down Expand Up @@ -73,6 +75,4 @@ class CubicBezierCurve extends Curve {

}

CubicBezierCurve.prototype.isCubicBezierCurve = true;

export { CubicBezierCurve };
4 changes: 2 additions & 2 deletions src/extras/curves/CubicBezierCurve3.js
Expand Up @@ -8,6 +8,8 @@ class CubicBezierCurve3 extends Curve {

super();

this.isCubicBezierCurve3 = true;

this.type = 'CubicBezierCurve3';

this.v0 = v0;
Expand Down Expand Up @@ -74,6 +76,4 @@ class CubicBezierCurve3 extends Curve {

}

CubicBezierCurve3.prototype.isCubicBezierCurve3 = true;

export { CubicBezierCurve3 };
4 changes: 2 additions & 2 deletions src/extras/curves/EllipseCurve.js
Expand Up @@ -7,6 +7,8 @@ class EllipseCurve extends Curve {

super();

this.isEllipseCurve = true;

this.type = 'EllipseCurve';

this.aX = aX;
Expand Down Expand Up @@ -151,6 +153,4 @@ class EllipseCurve extends Curve {

}

EllipseCurve.prototype.isEllipseCurve = true;

export { EllipseCurve };
4 changes: 2 additions & 2 deletions src/extras/curves/LineCurve.js
Expand Up @@ -7,6 +7,8 @@ class LineCurve extends Curve {

super();

this.isLineCurve = true;

this.type = 'LineCurve';

this.v1 = v1;
Expand Down Expand Up @@ -85,6 +87,4 @@ class LineCurve extends Curve {

}

LineCurve.prototype.isLineCurve = true;

export { LineCurve };
3 changes: 2 additions & 1 deletion src/extras/curves/LineCurve3.js
Expand Up @@ -7,9 +7,10 @@ class LineCurve3 extends Curve {

super();

this.type = 'LineCurve3';
this.isLineCurve3 = true;

this.type = 'LineCurve3';

this.v1 = v1;
this.v2 = v2;

Expand Down
4 changes: 2 additions & 2 deletions src/extras/curves/QuadraticBezierCurve.js
Expand Up @@ -8,6 +8,8 @@ class QuadraticBezierCurve extends Curve {

super();

this.isQuadraticBezierCurve = true;

this.type = 'QuadraticBezierCurve';

this.v0 = v0;
Expand Down Expand Up @@ -69,6 +71,4 @@ class QuadraticBezierCurve extends Curve {

}

QuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;

export { QuadraticBezierCurve };
4 changes: 2 additions & 2 deletions src/extras/curves/QuadraticBezierCurve3.js
Expand Up @@ -8,6 +8,8 @@ class QuadraticBezierCurve3 extends Curve {

super();

this.isQuadraticBezierCurve3 = true;

this.type = 'QuadraticBezierCurve3';

this.v0 = v0;
Expand Down Expand Up @@ -70,6 +72,4 @@ class QuadraticBezierCurve3 extends Curve {

}

QuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;

export { QuadraticBezierCurve3 };
4 changes: 2 additions & 2 deletions src/extras/curves/SplineCurve.js
Expand Up @@ -8,6 +8,8 @@ class SplineCurve extends Curve {

super();

this.isSplineCurve = true;

this.type = 'SplineCurve';

this.points = points;
Expand Down Expand Up @@ -92,6 +94,4 @@ class SplineCurve extends Curve {

}

SplineCurve.prototype.isSplineCurve = true;

export { SplineCurve };