Browse Source

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

* Revert to this.is* = true

* Put back local variables

* Update tests

* Add missing this.is* property

* Update Color.js

Co-authored-by: Michael Herzog <[email protected]>
Marco Fugaro 3 years ago
parent
commit
6e897f9a42
100 changed files with 203 additions and 206 deletions
  1. 2 2
      src/animation/AnimationObjectGroup.js
  2. 2 3
      src/cameras/ArrayCamera.js
  3. 2 2
      src/cameras/Camera.js
  4. 2 2
      src/cameras/OrthographicCamera.js
  5. 2 2
      src/cameras/PerspectiveCamera.js
  6. 4 3
      src/core/BufferAttribute.js
  7. 2 2
      src/core/BufferGeometry.js
  8. 2 2
      src/core/GLBufferAttribute.js
  9. 2 2
      src/core/InstancedBufferAttribute.js
  10. 2 2
      src/core/InstancedBufferGeometry.js
  11. 2 2
      src/core/InstancedInterleavedBuffer.js
  12. 2 2
      src/core/InterleavedBuffer.js
  13. 2 2
      src/core/InterleavedBufferAttribute.js
  14. 2 2
      src/core/Object3D.js
  15. 2 2
      src/extras/curves/ArcCurve.js
  16. 2 2
      src/extras/curves/CatmullRomCurve3.js
  17. 2 2
      src/extras/curves/CubicBezierCurve.js
  18. 2 2
      src/extras/curves/CubicBezierCurve3.js
  19. 2 2
      src/extras/curves/EllipseCurve.js
  20. 2 2
      src/extras/curves/LineCurve.js
  21. 2 1
      src/extras/curves/LineCurve3.js
  22. 2 2
      src/extras/curves/QuadraticBezierCurve.js
  23. 2 2
      src/extras/curves/QuadraticBezierCurve3.js
  24. 2 2
      src/extras/curves/SplineCurve.js
  25. 2 1
      src/helpers/SkeletonHelper.js
  26. 2 2
      src/lights/AmbientLight.js
  27. 2 2
      src/lights/AmbientLightProbe.js
  28. 2 2
      src/lights/DirectionalLight.js
  29. 2 2
      src/lights/DirectionalLightShadow.js
  30. 2 2
      src/lights/HemisphereLight.js
  31. 2 2
      src/lights/HemisphereLightProbe.js
  32. 2 2
      src/lights/Light.js
  33. 2 2
      src/lights/LightProbe.js
  34. 2 2
      src/lights/PointLight.js
  35. 2 2
      src/lights/PointLightShadow.js
  36. 2 2
      src/lights/RectAreaLight.js
  37. 2 2
      src/lights/SpotLight.js
  38. 2 2
      src/lights/SpotLightShadow.js
  39. 2 2
      src/loaders/ImageBitmapLoader.js
  40. 2 2
      src/materials/LineBasicMaterial.js
  41. 2 2
      src/materials/LineDashedMaterial.js
  42. 2 2
      src/materials/Material.js
  43. 2 2
      src/materials/MeshBasicMaterial.js
  44. 2 2
      src/materials/MeshDepthMaterial.js
  45. 2 2
      src/materials/MeshDistanceMaterial.js
  46. 2 2
      src/materials/MeshLambertMaterial.js
  47. 2 2
      src/materials/MeshMatcapMaterial.js
  48. 2 2
      src/materials/MeshNormalMaterial.js
  49. 2 2
      src/materials/MeshPhongMaterial.js
  50. 2 2
      src/materials/MeshPhysicalMaterial.js
  51. 2 2
      src/materials/MeshStandardMaterial.js
  52. 2 2
      src/materials/MeshToonMaterial.js
  53. 2 2
      src/materials/PointsMaterial.js
  54. 2 2
      src/materials/RawShaderMaterial.js
  55. 2 2
      src/materials/ShaderMaterial.js
  56. 2 2
      src/materials/ShadowMaterial.js
  57. 2 2
      src/materials/SpriteMaterial.js
  58. 2 2
      src/math/Box2.js
  59. 2 2
      src/math/Box3.js
  60. 2 2
      src/math/Color.js
  61. 2 2
      src/math/Euler.js
  62. 2 2
      src/math/Matrix3.js
  63. 2 3
      src/math/Matrix4.js
  64. 2 2
      src/math/Plane.js
  65. 2 2
      src/math/Quaternion.js
  66. 2 2
      src/math/SphericalHarmonics3.js
  67. 2 2
      src/math/Vector2.js
  68. 2 3
      src/math/Vector3.js
  69. 2 2
      src/math/Vector4.js
  70. 2 2
      src/objects/Bone.js
  71. 2 2
      src/objects/Group.js
  72. 2 2
      src/objects/InstancedMesh.js
  73. 2 3
      src/objects/Line.js
  74. 2 2
      src/objects/LineLoop.js
  75. 2 2
      src/objects/LineSegments.js
  76. 2 2
      src/objects/Mesh.js
  77. 2 2
      src/objects/Points.js
  78. 2 2
      src/objects/SkinnedMesh.js
  79. 2 2
      src/objects/Sprite.js
  80. 2 2
      src/renderers/WebGL3DRenderTarget.js
  81. 2 2
      src/renderers/WebGLArrayRenderTarget.js
  82. 2 2
      src/renderers/WebGLCubeRenderTarget.js
  83. 2 2
      src/renderers/WebGLMultipleRenderTargets.js
  84. 2 2
      src/renderers/WebGLRenderTarget.js
  85. 2 2
      src/renderers/WebGLRenderer.js
  86. 2 2
      src/scenes/Fog.js
  87. 2 2
      src/scenes/FogExp2.js
  88. 2 2
      src/scenes/Scene.js
  89. 2 2
      src/textures/CanvasTexture.js
  90. 2 2
      src/textures/CompressedTexture.js
  91. 2 2
      src/textures/CubeTexture.js
  92. 2 2
      src/textures/Data3DTexture.js
  93. 2 2
      src/textures/DataArrayTexture.js
  94. 2 2
      src/textures/DataTexture.js
  95. 2 2
      src/textures/DepthTexture.js
  96. 2 2
      src/textures/FramebufferTexture.js
  97. 2 2
      src/textures/Source.js
  98. 2 2
      src/textures/Texture.js
  99. 2 2
      src/textures/VideoTexture.js
  100. 3 5
      test/unit/src/core/Object3D.tests.js

+ 2 - 2
src/animation/AnimationObjectGroup.js

@@ -34,6 +34,8 @@ class AnimationObjectGroup {
 
 	constructor() {
 
+		this.isAnimationObjectGroup = true;
+
 		this.uuid = MathUtils.generateUUID();
 
 		// cached objects followed by the active ones
@@ -382,6 +384,4 @@ class AnimationObjectGroup {
 
 }
 
-AnimationObjectGroup.prototype.isAnimationObjectGroup = true;
-
 export { AnimationObjectGroup };

+ 2 - 3
src/cameras/ArrayCamera.js

@@ -6,13 +6,12 @@ class ArrayCamera extends PerspectiveCamera {
 
 		super();
 
+		this.isArrayCamera = true;
+
 		this.cameras = array;
 
 	}
 
 }
 
-ArrayCamera.prototype.isArrayCamera = true;
-
-
 export { ArrayCamera };

+ 2 - 2
src/cameras/Camera.js

@@ -7,6 +7,8 @@ class Camera extends Object3D {
 
 		super();
 
+		this.isCamera = true;
+
 		this.type = 'Camera';
 
 		this.matrixWorldInverse = new Matrix4();
@@ -63,6 +65,4 @@ class Camera extends Object3D {
 
 }
 
-Camera.prototype.isCamera = true;
-
 export { Camera };

+ 2 - 2
src/cameras/OrthographicCamera.js

@@ -6,6 +6,8 @@ class OrthographicCamera extends Camera {
 
 		super();
 
+		this.isOrthographicCamera = true;
+
 		this.type = 'OrthographicCamera';
 
 		this.zoom = 1;
@@ -131,6 +133,4 @@ class OrthographicCamera extends Camera {
 
 }
 
-OrthographicCamera.prototype.isOrthographicCamera = true;
-
 export { OrthographicCamera };

+ 2 - 2
src/cameras/PerspectiveCamera.js

@@ -7,6 +7,8 @@ class PerspectiveCamera extends Camera {
 
 		super();
 
+		this.isPerspectiveCamera = true;
+
 		this.type = 'PerspectiveCamera';
 
 		this.fov = fov;
@@ -228,6 +230,4 @@ class PerspectiveCamera extends Camera {
 
 }
 
-PerspectiveCamera.prototype.isPerspectiveCamera = true;
-
 export { PerspectiveCamera };

+ 4 - 3
src/core/BufferAttribute.js

@@ -17,6 +17,8 @@ class BufferAttribute {
 
 		}
 
+		this.isBufferAttribute = true;
+
 		this.name = '';
 
 		this.array = array;
@@ -399,8 +401,6 @@ class BufferAttribute {
 
 }
 
-BufferAttribute.prototype.isBufferAttribute = true;
-
 //
 
 class Int8BufferAttribute extends BufferAttribute {
@@ -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 {
 

+ 2 - 2
src/core/BufferGeometry.js

@@ -25,6 +25,8 @@ class BufferGeometry extends EventDispatcher {
 
 		super();
 
+		this.isBufferGeometry = true;
+
 		Object.defineProperty( this, 'id', { value: _id ++ } );
 
 		this.uuid = MathUtils.generateUUID();
@@ -1125,6 +1127,4 @@ class BufferGeometry extends EventDispatcher {
 
 }
 
-BufferGeometry.prototype.isBufferGeometry = true;
-
 export { BufferGeometry };

+ 2 - 2
src/core/GLBufferAttribute.js

@@ -2,6 +2,8 @@ class GLBufferAttribute {
 
 	constructor( buffer, type, itemSize, elementSize, count ) {
 
+		this.isGLBufferAttribute = true;
+
 		this.buffer = buffer;
 		this.type = type;
 		this.itemSize = itemSize;
@@ -53,6 +55,4 @@ class GLBufferAttribute {
 
 }
 
-GLBufferAttribute.prototype.isGLBufferAttribute = true;
-
 export { GLBufferAttribute };

+ 2 - 2
src/core/InstancedBufferAttribute.js

@@ -16,6 +16,8 @@ class InstancedBufferAttribute extends BufferAttribute {
 
 		super( array, itemSize, normalized );
 
+		this.isInstancedBufferAttribute = true;
+
 		this.meshPerAttribute = meshPerAttribute;
 
 	}
@@ -44,6 +46,4 @@ class InstancedBufferAttribute extends BufferAttribute {
 
 }
 
-InstancedBufferAttribute.prototype.isInstancedBufferAttribute = true;
-
 export { InstancedBufferAttribute };

+ 2 - 2
src/core/InstancedBufferGeometry.js

@@ -6,6 +6,8 @@ class InstancedBufferGeometry extends BufferGeometry {
 
 		super();
 
+		this.isInstancedBufferGeometry = true;
+
 		this.type = 'InstancedBufferGeometry';
 		this.instanceCount = Infinity;
 
@@ -41,6 +43,4 @@ class InstancedBufferGeometry extends BufferGeometry {
 
 }
 
-InstancedBufferGeometry.prototype.isInstancedBufferGeometry = true;
-
 export { InstancedBufferGeometry };

+ 2 - 2
src/core/InstancedInterleavedBuffer.js

@@ -6,6 +6,8 @@ class InstancedInterleavedBuffer extends InterleavedBuffer {
 
 		super( array, stride );
 
+		this.isInstancedInterleavedBuffer = true;
+
 		this.meshPerAttribute = meshPerAttribute;
 
 	}
@@ -43,6 +45,4 @@ class InstancedInterleavedBuffer extends InterleavedBuffer {
 
 }
 
-InstancedInterleavedBuffer.prototype.isInstancedInterleavedBuffer = true;
-
 export { InstancedInterleavedBuffer };

+ 2 - 2
src/core/InterleavedBuffer.js

@@ -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;
@@ -140,6 +142,4 @@ class InterleavedBuffer {
 
 }
 
-InterleavedBuffer.prototype.isInterleavedBuffer = true;
-
 export { InterleavedBuffer };

+ 2 - 2
src/core/InterleavedBufferAttribute.js

@@ -7,6 +7,8 @@ class InterleavedBufferAttribute {
 
 	constructor( interleavedBuffer, itemSize, offset, normalized = false ) {
 
+		this.isInterleavedBufferAttribute = true;
+
 		this.name = '';
 
 		this.data = interleavedBuffer;
@@ -276,7 +278,5 @@ class InterleavedBufferAttribute {
 
 }
 
-InterleavedBufferAttribute.prototype.isInterleavedBufferAttribute = true;
-
 
 export { InterleavedBufferAttribute };

+ 2 - 2
src/core/Object3D.js

@@ -31,6 +31,8 @@ class Object3D extends EventDispatcher {
 
 		super();
 
+		this.isObject3D = true;
+
 		Object.defineProperty( this, 'id', { value: _object3DId ++ } );
 
 		this.uuid = MathUtils.generateUUID();
@@ -922,6 +924,4 @@ class Object3D extends EventDispatcher {
 Object3D.DefaultUp = new Vector3( 0, 1, 0 );
 Object3D.DefaultMatrixAutoUpdate = true;
 
-Object3D.prototype.isObject3D = true;
-
 export { Object3D };

+ 2 - 2
src/extras/curves/ArcCurve.js

@@ -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 };

+ 2 - 2
src/extras/curves/CatmullRomCurve3.js

@@ -87,6 +87,8 @@ class CatmullRomCurve3 extends Curve {
 
 		super();
 
+		this.isCatmullRomCurve3 = true;
+
 		this.type = 'CatmullRomCurve3';
 
 		this.points = points;
@@ -248,6 +250,4 @@ class CatmullRomCurve3 extends Curve {
 
 }
 
-CatmullRomCurve3.prototype.isCatmullRomCurve3 = true;
-
 export { CatmullRomCurve3 };

+ 2 - 2
src/extras/curves/CubicBezierCurve.js

@@ -8,6 +8,8 @@ class CubicBezierCurve extends Curve {
 
 		super();
 
+		this.isCubicBezierCurve = true;
+
 		this.type = 'CubicBezierCurve';
 
 		this.v0 = v0;
@@ -73,6 +75,4 @@ class CubicBezierCurve extends Curve {
 
 }
 
-CubicBezierCurve.prototype.isCubicBezierCurve = true;
-
 export { CubicBezierCurve };

+ 2 - 2
src/extras/curves/CubicBezierCurve3.js

@@ -8,6 +8,8 @@ class CubicBezierCurve3 extends Curve {
 
 		super();
 
+		this.isCubicBezierCurve3 = true;
+
 		this.type = 'CubicBezierCurve3';
 
 		this.v0 = v0;
@@ -74,6 +76,4 @@ class CubicBezierCurve3 extends Curve {
 
 }
 
-CubicBezierCurve3.prototype.isCubicBezierCurve3 = true;
-
 export { CubicBezierCurve3 };

+ 2 - 2
src/extras/curves/EllipseCurve.js

@@ -7,6 +7,8 @@ class EllipseCurve extends Curve {
 
 		super();
 
+		this.isEllipseCurve = true;
+
 		this.type = 'EllipseCurve';
 
 		this.aX = aX;
@@ -151,6 +153,4 @@ class EllipseCurve extends Curve {
 
 }
 
-EllipseCurve.prototype.isEllipseCurve = true;
-
 export { EllipseCurve };

+ 2 - 2
src/extras/curves/LineCurve.js

@@ -7,6 +7,8 @@ class LineCurve extends Curve {
 
 		super();
 
+		this.isLineCurve = true;
+
 		this.type = 'LineCurve';
 
 		this.v1 = v1;
@@ -85,6 +87,4 @@ class LineCurve extends Curve {
 
 }
 
-LineCurve.prototype.isLineCurve = true;
-
 export { LineCurve };

+ 2 - 1
src/extras/curves/LineCurve3.js

@@ -7,9 +7,10 @@ class LineCurve3 extends Curve {
 
 		super();
 
-		this.type = 'LineCurve3';
 		this.isLineCurve3 = true;
 
+		this.type = 'LineCurve3';
+
 		this.v1 = v1;
 		this.v2 = v2;
 

+ 2 - 2
src/extras/curves/QuadraticBezierCurve.js

@@ -8,6 +8,8 @@ class QuadraticBezierCurve extends Curve {
 
 		super();
 
+		this.isQuadraticBezierCurve = true;
+
 		this.type = 'QuadraticBezierCurve';
 
 		this.v0 = v0;
@@ -69,6 +71,4 @@ class QuadraticBezierCurve extends Curve {
 
 }
 
-QuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;
-
 export { QuadraticBezierCurve };

+ 2 - 2
src/extras/curves/QuadraticBezierCurve3.js

@@ -8,6 +8,8 @@ class QuadraticBezierCurve3 extends Curve {
 
 		super();
 
+		this.isQuadraticBezierCurve3 = true;
+
 		this.type = 'QuadraticBezierCurve3';
 
 		this.v0 = v0;
@@ -70,6 +72,4 @@ class QuadraticBezierCurve3 extends Curve {
 
 }
 
-QuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;
-
 export { QuadraticBezierCurve3 };

+ 2 - 2
src/extras/curves/SplineCurve.js

@@ -8,6 +8,8 @@ class SplineCurve extends Curve {
 
 		super();
 
+		this.isSplineCurve = true;
+
 		this.type = 'SplineCurve';
 
 		this.points = points;
@@ -92,6 +94,4 @@ class SplineCurve extends Curve {
 
 }
 
-SplineCurve.prototype.isSplineCurve = true;
-
 export { SplineCurve };

+ 2 - 1
src/helpers/SkeletonHelper.js

@@ -47,9 +47,10 @@ class SkeletonHelper extends LineSegments {
 
 		super( geometry, material );
 
-		this.type = 'SkeletonHelper';
 		this.isSkeletonHelper = true;
 
+		this.type = 'SkeletonHelper';
+
 		this.root = object;
 		this.bones = bones;
 

+ 2 - 2
src/lights/AmbientLight.js

@@ -6,12 +6,12 @@ class AmbientLight extends Light {
 
 		super( color, intensity );
 
+		this.isAmbientLight = true;
+
 		this.type = 'AmbientLight';
 
 	}
 
 }
 
-AmbientLight.prototype.isAmbientLight = true;
-
 export { AmbientLight };

+ 2 - 2
src/lights/AmbientLightProbe.js

@@ -7,6 +7,8 @@ class AmbientLightProbe extends LightProbe {
 
 		super( undefined, intensity );
 
+		this.isAmbientLightProbe = true;
+
 		const color1 = new Color().set( color );
 
 		// without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );
@@ -16,6 +18,4 @@ class AmbientLightProbe extends LightProbe {
 
 }
 
-AmbientLightProbe.prototype.isAmbientLightProbe = true;
-
 export { AmbientLightProbe };

+ 2 - 2
src/lights/DirectionalLight.js

@@ -8,6 +8,8 @@ class DirectionalLight extends Light {
 
 		super( color, intensity );
 
+		this.isDirectionalLight = true;
+
 		this.type = 'DirectionalLight';
 
 		this.position.copy( Object3D.DefaultUp );
@@ -38,6 +40,4 @@ class DirectionalLight extends Light {
 
 }
 
-DirectionalLight.prototype.isDirectionalLight = true;
-
 export { DirectionalLight };

+ 2 - 2
src/lights/DirectionalLightShadow.js

@@ -7,10 +7,10 @@ class DirectionalLightShadow extends LightShadow {
 
 		super( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );
 
+		this.isDirectionalLightShadow = true;
+
 	}
 
 }
 
-DirectionalLightShadow.prototype.isDirectionalLightShadow = true;
-
 export { DirectionalLightShadow };

+ 2 - 2
src/lights/HemisphereLight.js

@@ -8,6 +8,8 @@ class HemisphereLight extends Light {
 
 		super( skyColor, intensity );
 
+		this.isHemisphereLight = true;
+
 		this.type = 'HemisphereLight';
 
 		this.position.copy( Object3D.DefaultUp );
@@ -29,6 +31,4 @@ class HemisphereLight extends Light {
 
 }
 
-HemisphereLight.prototype.isHemisphereLight = true;
-
 export { HemisphereLight };

+ 2 - 2
src/lights/HemisphereLightProbe.js

@@ -8,6 +8,8 @@ class HemisphereLightProbe extends LightProbe {
 
 		super( undefined, intensity );
 
+		this.isHemisphereLightProbe = true;
+
 		const color1 = new Color().set( skyColor );
 		const color2 = new Color().set( groundColor );
 
@@ -25,6 +27,4 @@ class HemisphereLightProbe extends LightProbe {
 
 }
 
-HemisphereLightProbe.prototype.isHemisphereLightProbe = true;
-
 export { HemisphereLightProbe };

+ 2 - 2
src/lights/Light.js

@@ -7,6 +7,8 @@ class Light extends Object3D {
 
 		super();
 
+		this.isLight = true;
+
 		this.type = 'Light';
 
 		this.color = new Color( color );
@@ -53,6 +55,4 @@ class Light extends Object3D {
 
 }
 
-Light.prototype.isLight = true;
-
 export { Light };

+ 2 - 2
src/lights/LightProbe.js

@@ -7,6 +7,8 @@ class LightProbe extends Light {
 
 		super( undefined, intensity );
 
+		this.isLightProbe = true;
+
 		this.sh = sh;
 
 	}
@@ -42,6 +44,4 @@ class LightProbe extends Light {
 
 }
 
-LightProbe.prototype.isLightProbe = true;
-
 export { LightProbe };

+ 2 - 2
src/lights/PointLight.js

@@ -7,6 +7,8 @@ class PointLight extends Light {
 
 		super( color, intensity );
 
+		this.isPointLight = true;
+
 		this.type = 'PointLight';
 
 		this.distance = distance;
@@ -52,6 +54,4 @@ class PointLight extends Light {
 
 }
 
-PointLight.prototype.isPointLight = true;
-
 export { PointLight };

+ 2 - 2
src/lights/PointLightShadow.js

@@ -15,6 +15,8 @@ class PointLightShadow extends LightShadow {
 
 		super( new PerspectiveCamera( 90, 1, 0.5, 500 ) );
 
+		this.isPointLightShadow = true;
+
 		this._frameExtents = new Vector2( 4, 2 );
 
 		this._viewportCount = 6;
@@ -91,6 +93,4 @@ class PointLightShadow extends LightShadow {
 
 }
 
-PointLightShadow.prototype.isPointLightShadow = true;
-
 export { PointLightShadow };

+ 2 - 2
src/lights/RectAreaLight.js

@@ -6,6 +6,8 @@ class RectAreaLight extends Light {
 
 		super( color, intensity );
 
+		this.isRectAreaLight = true;
+
 		this.type = 'RectAreaLight';
 
 		this.width = width;
@@ -51,6 +53,4 @@ class RectAreaLight extends Light {
 
 }
 
-RectAreaLight.prototype.isRectAreaLight = true;
-
 export { RectAreaLight };

+ 2 - 2
src/lights/SpotLight.js

@@ -8,6 +8,8 @@ class SpotLight extends Light {
 
 		super( color, intensity );
 
+		this.isSpotLight = true;
+
 		this.type = 'SpotLight';
 
 		this.position.copy( Object3D.DefaultUp );
@@ -64,6 +66,4 @@ class SpotLight extends Light {
 
 }
 
-SpotLight.prototype.isSpotLight = true;
-
 export { SpotLight };

+ 2 - 2
src/lights/SpotLightShadow.js

@@ -8,6 +8,8 @@ class SpotLightShadow extends LightShadow {
 
 		super( new PerspectiveCamera( 50, 1, 0.5, 500 ) );
 
+		this.isSpotLightShadow = true;
+
 		this.focus = 1;
 
 	}
@@ -45,6 +47,4 @@ class SpotLightShadow extends LightShadow {
 
 }
 
-SpotLightShadow.prototype.isSpotLightShadow = true;
-
 export { SpotLightShadow };

+ 2 - 2
src/loaders/ImageBitmapLoader.js

@@ -7,6 +7,8 @@ class ImageBitmapLoader extends Loader {
 
 		super( manager );
 
+		this.isImageBitmapLoader = true;
+
 		if ( typeof createImageBitmap === 'undefined' ) {
 
 			console.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' );
@@ -94,6 +96,4 @@ class ImageBitmapLoader extends Loader {
 
 }
 
-ImageBitmapLoader.prototype.isImageBitmapLoader = true;
-
 export { ImageBitmapLoader };

+ 2 - 2
src/materials/LineBasicMaterial.js

@@ -7,6 +7,8 @@ class LineBasicMaterial extends Material {
 
 		super();
 
+		this.isLineBasicMaterial = true;
+
 		this.type = 'LineBasicMaterial';
 
 		this.color = new Color( 0xffffff );
@@ -40,6 +42,4 @@ class LineBasicMaterial extends Material {
 
 }
 
-LineBasicMaterial.prototype.isLineBasicMaterial = true;
-
 export { LineBasicMaterial };

+ 2 - 2
src/materials/LineDashedMaterial.js

@@ -6,6 +6,8 @@ class LineDashedMaterial extends LineBasicMaterial {
 
 		super();
 
+		this.isLineDashedMaterial = true;
+
 		this.type = 'LineDashedMaterial';
 
 		this.scale = 1;
@@ -30,6 +32,4 @@ class LineDashedMaterial extends LineBasicMaterial {
 
 }
 
-LineDashedMaterial.prototype.isLineDashedMaterial = true;
-
 export { LineDashedMaterial };

+ 2 - 2
src/materials/Material.js

@@ -10,6 +10,8 @@ class Material extends EventDispatcher {
 
 		super();
 
+		this.isMaterial = true;
+
 		Object.defineProperty( this, 'id', { value: materialId ++ } );
 
 		this.uuid = MathUtils.generateUUID();
@@ -496,8 +498,6 @@ class Material extends EventDispatcher {
 
 }
 
-Material.prototype.isMaterial = true;
-
 Material.fromType = function ( /*type*/ ) {
 
 	// TODO: Behavior added in Materials.js

+ 2 - 2
src/materials/MeshBasicMaterial.js

@@ -8,6 +8,8 @@ class MeshBasicMaterial extends Material {
 
 		super();
 
+		this.isMeshBasicMaterial = true;
+
 		this.type = 'MeshBasicMaterial';
 
 		this.color = new Color( 0xffffff ); // emissive
@@ -76,6 +78,4 @@ class MeshBasicMaterial extends Material {
 
 }
 
-MeshBasicMaterial.prototype.isMeshBasicMaterial = true;
-
 export { MeshBasicMaterial };

+ 2 - 2
src/materials/MeshDepthMaterial.js

@@ -7,6 +7,8 @@ class MeshDepthMaterial extends Material {
 
 		super();
 
+		this.isMeshDepthMaterial = true;
+
 		this.type = 'MeshDepthMaterial';
 
 		this.depthPacking = BasicDepthPacking;
@@ -49,6 +51,4 @@ class MeshDepthMaterial extends Material {
 
 }
 
-MeshDepthMaterial.prototype.isMeshDepthMaterial = true;
-
 export { MeshDepthMaterial };

+ 2 - 2
src/materials/MeshDistanceMaterial.js

@@ -7,6 +7,8 @@ class MeshDistanceMaterial extends Material {
 
 		super();
 
+		this.isMeshDistanceMaterial = true;
+
 		this.type = 'MeshDistanceMaterial';
 
 		this.referencePosition = new Vector3();
@@ -47,6 +49,4 @@ class MeshDistanceMaterial extends Material {
 
 }
 
-MeshDistanceMaterial.prototype.isMeshDistanceMaterial = true;
-
 export { MeshDistanceMaterial };

+ 2 - 2
src/materials/MeshLambertMaterial.js

@@ -8,6 +8,8 @@ class MeshLambertMaterial extends Material {
 
 		super();
 
+		this.isMeshLambertMaterial = true;
+
 		this.type = 'MeshLambertMaterial';
 
 		this.color = new Color( 0xffffff ); // diffuse
@@ -84,6 +86,4 @@ class MeshLambertMaterial extends Material {
 
 }
 
-MeshLambertMaterial.prototype.isMeshLambertMaterial = true;
-
 export { MeshLambertMaterial };

+ 2 - 2
src/materials/MeshMatcapMaterial.js

@@ -9,6 +9,8 @@ class MeshMatcapMaterial extends Material {
 
 		super();
 
+		this.isMeshMatcapMaterial = true;
+
 		this.defines = { 'MATCAP': '' };
 
 		this.type = 'MeshMatcapMaterial';
@@ -76,6 +78,4 @@ class MeshMatcapMaterial extends Material {
 
 }
 
-MeshMatcapMaterial.prototype.isMeshMatcapMaterial = true;
-
 export { MeshMatcapMaterial };

+ 2 - 2
src/materials/MeshNormalMaterial.js

@@ -8,6 +8,8 @@ class MeshNormalMaterial extends Material {
 
 		super();
 
+		this.isMeshNormalMaterial = true;
+
 		this.type = 'MeshNormalMaterial';
 
 		this.bumpMap = null;
@@ -56,6 +58,4 @@ class MeshNormalMaterial extends Material {
 
 }
 
-MeshNormalMaterial.prototype.isMeshNormalMaterial = true;
-
 export { MeshNormalMaterial };

+ 2 - 2
src/materials/MeshPhongMaterial.js

@@ -9,6 +9,8 @@ class MeshPhongMaterial extends Material {
 
 		super();
 
+		this.isMeshPhongMaterial = true;
+
 		this.type = 'MeshPhongMaterial';
 
 		this.color = new Color( 0xffffff ); // diffuse
@@ -115,6 +117,4 @@ class MeshPhongMaterial extends Material {
 
 }
 
-MeshPhongMaterial.prototype.isMeshPhongMaterial = true;
-
 export { MeshPhongMaterial };

+ 2 - 2
src/materials/MeshPhysicalMaterial.js

@@ -9,6 +9,8 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 
 		super();
 
+		this.isMeshPhysicalMaterial = true;
+
 		this.defines = {
 
 			'STANDARD': '',
@@ -163,6 +165,4 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 
 }
 
-MeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true;
-
 export { MeshPhysicalMaterial };

+ 2 - 2
src/materials/MeshStandardMaterial.js

@@ -9,6 +9,8 @@ class MeshStandardMaterial extends Material {
 
 		super();
 
+		this.isMeshStandardMaterial = true;
+
 		this.defines = { 'STANDARD': '' };
 
 		this.type = 'MeshStandardMaterial';
@@ -119,6 +121,4 @@ class MeshStandardMaterial extends Material {
 
 }
 
-MeshStandardMaterial.prototype.isMeshStandardMaterial = true;
-
 export { MeshStandardMaterial };

+ 2 - 2
src/materials/MeshToonMaterial.js

@@ -9,6 +9,8 @@ class MeshToonMaterial extends Material {
 
 		super();
 
+		this.isMeshToonMaterial = true;
+
 		this.defines = { 'TOON': '' };
 
 		this.type = 'MeshToonMaterial';
@@ -97,6 +99,4 @@ class MeshToonMaterial extends Material {
 
 }
 
-MeshToonMaterial.prototype.isMeshToonMaterial = true;
-
 export { MeshToonMaterial };

+ 2 - 2
src/materials/PointsMaterial.js

@@ -7,6 +7,8 @@ class PointsMaterial extends Material {
 
 		super();
 
+		this.isPointsMaterial = true;
+
 		this.type = 'PointsMaterial';
 
 		this.color = new Color( 0xffffff );
@@ -45,6 +47,4 @@ class PointsMaterial extends Material {
 
 }
 
-PointsMaterial.prototype.isPointsMaterial = true;
-
 export { PointsMaterial };

+ 2 - 2
src/materials/RawShaderMaterial.js

@@ -6,12 +6,12 @@ class RawShaderMaterial extends ShaderMaterial {
 
 		super( parameters );
 
+		this.isRawShaderMaterial = true;
+
 		this.type = 'RawShaderMaterial';
 
 	}
 
 }
 
-RawShaderMaterial.prototype.isRawShaderMaterial = true;
-
 export { RawShaderMaterial };

+ 2 - 2
src/materials/ShaderMaterial.js

@@ -10,6 +10,8 @@ class ShaderMaterial extends Material {
 
 		super();
 
+		this.isShaderMaterial = true;
+
 		this.type = 'ShaderMaterial';
 
 		this.defines = {};
@@ -181,6 +183,4 @@ class ShaderMaterial extends Material {
 
 }
 
-ShaderMaterial.prototype.isShaderMaterial = true;
-
 export { ShaderMaterial };

+ 2 - 2
src/materials/ShadowMaterial.js

@@ -7,6 +7,8 @@ class ShadowMaterial extends Material {
 
 		super();
 
+		this.isShadowMaterial = true;
+
 		this.type = 'ShadowMaterial';
 
 		this.color = new Color( 0x000000 );
@@ -32,6 +34,4 @@ class ShadowMaterial extends Material {
 
 }
 
-ShadowMaterial.prototype.isShadowMaterial = true;
-
 export { ShadowMaterial };

+ 2 - 2
src/materials/SpriteMaterial.js

@@ -7,6 +7,8 @@ class SpriteMaterial extends Material {
 
 		super();
 
+		this.isSpriteMaterial = true;
+
 		this.type = 'SpriteMaterial';
 
 		this.color = new Color( 0xffffff );
@@ -49,6 +51,4 @@ class SpriteMaterial extends Material {
 
 }
 
-SpriteMaterial.prototype.isSpriteMaterial = true;
-
 export { SpriteMaterial };

+ 2 - 2
src/math/Box2.js

@@ -6,6 +6,8 @@ class Box2 {
 
 	constructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) {
 
+		this.isBox2 = true;
+
 		this.min = min;
 		this.max = max;
 
@@ -198,6 +200,4 @@ class Box2 {
 
 }
 
-Box2.prototype.isBox2 = true;
-
 export { Box2 };

+ 2 - 2
src/math/Box3.js

@@ -4,6 +4,8 @@ class Box3 {
 
 	constructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) {
 
+		this.isBox3 = true;
+
 		this.min = min;
 		this.max = max;
 
@@ -469,8 +471,6 @@ class Box3 {
 
 }
 
-Box3.prototype.isBox3 = true;
-
 const _points = [
 	/*@__PURE__*/ new Vector3(),
 	/*@__PURE__*/ new Vector3(),

+ 2 - 2
src/math/Color.js

@@ -56,6 +56,8 @@ class Color {
 
 	constructor( r, g, b ) {
 
+		this.isColor = true;
+
 		this.r = 1;
 		this.g = 1;
 		this.b = 1;
@@ -610,6 +612,4 @@ class Color {
 
 Color.NAMES = _colorKeywords;
 
-Color.prototype.isColor = true;
-
 export { Color, SRGBToLinear };

+ 2 - 2
src/math/Euler.js

@@ -9,6 +9,8 @@ class Euler {
 
 	constructor( x = 0, y = 0, z = 0, order = Euler.DefaultOrder ) {
 
+		this.isEuler = true;
+
 		this._x = x;
 		this._y = y;
 		this._z = z;
@@ -316,8 +318,6 @@ class Euler {
 
 }
 
-Euler.prototype.isEuler = true;
-
 Euler.DefaultOrder = 'XYZ';
 Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
 

+ 2 - 2
src/math/Matrix3.js

@@ -2,6 +2,8 @@ class Matrix3 {
 
 	constructor() {
 
+		this.isMatrix3 = true;
+
 		this.elements = [
 
 			1, 0, 0,
@@ -334,6 +336,4 @@ class Matrix3 {
 
 }
 
-Matrix3.prototype.isMatrix3 = true;
-
 export { Matrix3 };

+ 2 - 3
src/math/Matrix4.js

@@ -1,9 +1,10 @@
 import { Vector3 } from './Vector3.js';
-
 class Matrix4 {
 
 	constructor() {
 
+		this.isMatrix4 = true;
+
 		this.elements = [
 
 			1, 0, 0, 0,
@@ -872,8 +873,6 @@ class Matrix4 {
 
 }
 
-Matrix4.prototype.isMatrix4 = true;
-
 const _v1 = /*@__PURE__*/ new Vector3();
 const _m1 = /*@__PURE__*/ new Matrix4();
 const _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 );

+ 2 - 2
src/math/Plane.js

@@ -9,6 +9,8 @@ class Plane {
 
 	constructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) {
 
+		this.isPlane = true;
+
 		// normal is assumed to be normalized
 
 		this.normal = normal;
@@ -200,6 +202,4 @@ class Plane {
 
 }
 
-Plane.prototype.isPlane = true;
-
 export { Plane };

+ 2 - 2
src/math/Quaternion.js

@@ -4,6 +4,8 @@ class Quaternion {
 
 	constructor( x = 0, y = 0, z = 0, w = 1 ) {
 
+		this.isQuaternion = true;
+
 		this._x = x;
 		this._y = y;
 		this._z = z;
@@ -693,6 +695,4 @@ class Quaternion {
 
 }
 
-Quaternion.prototype.isQuaternion = true;
-
 export { Quaternion };

+ 2 - 2
src/math/SphericalHarmonics3.js

@@ -14,6 +14,8 @@ class SphericalHarmonics3 {
 
 	constructor() {
 
+		this.isSphericalHarmonics3 = true;
+
 		this.coefficients = [];
 
 		for ( let i = 0; i < 9; i ++ ) {
@@ -238,6 +240,4 @@ class SphericalHarmonics3 {
 
 }
 
-SphericalHarmonics3.prototype.isSphericalHarmonics3 = true;
-
 export { SphericalHarmonics3 };

+ 2 - 2
src/math/Vector2.js

@@ -2,6 +2,8 @@ class Vector2 {
 
 	constructor( x = 0, y = 0 ) {
 
+		this.isVector2 = true;
+
 		this.x = x;
 		this.y = y;
 
@@ -479,6 +481,4 @@ class Vector2 {
 
 }
 
-Vector2.prototype.isVector2 = true;
-
 export { Vector2 };

+ 2 - 3
src/math/Vector3.js

@@ -1,10 +1,11 @@
 import * as MathUtils from './MathUtils.js';
 import { Quaternion } from './Quaternion.js';
-
 class Vector3 {
 
 	constructor( x = 0, y = 0, z = 0 ) {
 
+		this.isVector3 = true;
+
 		this.x = x;
 		this.y = y;
 		this.z = z;
@@ -747,8 +748,6 @@ class Vector3 {
 
 }
 
-Vector3.prototype.isVector3 = true;
-
 const _vector = /*@__PURE__*/ new Vector3();
 const _quaternion = /*@__PURE__*/ new Quaternion();
 

+ 2 - 2
src/math/Vector4.js

@@ -2,6 +2,8 @@ class Vector4 {
 
 	constructor( x = 0, y = 0, z = 0, w = 1 ) {
 
+		this.isVector4 = true;
+
 		this.x = x;
 		this.y = y;
 		this.z = z;
@@ -659,6 +661,4 @@ class Vector4 {
 
 }
 
-Vector4.prototype.isVector4 = true;
-
 export { Vector4 };

+ 2 - 2
src/objects/Bone.js

@@ -6,12 +6,12 @@ class Bone extends Object3D {
 
 		super();
 
+		this.isBone = true;
+
 		this.type = 'Bone';
 
 	}
 
 }
 
-Bone.prototype.isBone = true;
-
 export { Bone };

+ 2 - 2
src/objects/Group.js

@@ -6,12 +6,12 @@ class Group extends Object3D {
 
 		super();
 
+		this.isGroup = true;
+
 		this.type = 'Group';
 
 	}
 
 }
 
-Group.prototype.isGroup = true;
-
 export { Group };

+ 2 - 2
src/objects/InstancedMesh.js

@@ -15,6 +15,8 @@ class InstancedMesh extends Mesh {
 
 		super( geometry, material );
 
+		this.isInstancedMesh = true;
+
 		this.instanceMatrix = new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 );
 		this.instanceColor = null;
 
@@ -121,6 +123,4 @@ class InstancedMesh extends Mesh {
 
 }
 
-InstancedMesh.prototype.isInstancedMesh = true;
-
 export { InstancedMesh };

+ 2 - 3
src/objects/Line.js

@@ -19,6 +19,8 @@ class Line extends Object3D {
 
 		super();
 
+		this.isLine = true;
+
 		this.type = 'Line';
 
 		this.geometry = geometry;
@@ -247,7 +249,4 @@ class Line extends Object3D {
 
 }
 
-Line.prototype.isLine = true;
-
-
 export { Line };

+ 2 - 2
src/objects/LineLoop.js

@@ -6,12 +6,12 @@ class LineLoop extends Line {
 
 		super( geometry, material );
 
+		this.isLineLoop = true;
+
 		this.type = 'LineLoop';
 
 	}
 
 }
 
-LineLoop.prototype.isLineLoop = true;
-
 export { LineLoop };

+ 2 - 2
src/objects/LineSegments.js

@@ -11,6 +11,8 @@ class LineSegments extends Line {
 
 		super( geometry, material );
 
+		this.isLineSegments = true;
+
 		this.type = 'LineSegments';
 
 	}
@@ -58,6 +60,4 @@ class LineSegments extends Line {
 
 }
 
-LineSegments.prototype.isLineSegments = true;
-
 export { LineSegments };

+ 2 - 2
src/objects/Mesh.js

@@ -38,6 +38,8 @@ class Mesh extends Object3D {
 
 		super();
 
+		this.isMesh = true;
+
 		this.type = 'Mesh';
 
 		this.geometry = geometry;
@@ -286,8 +288,6 @@ class Mesh extends Object3D {
 
 }
 
-Mesh.prototype.isMesh = true;
-
 function checkIntersection( object, material, raycaster, ray, pA, pB, pC, point ) {
 
 	let intersect;

+ 2 - 2
src/objects/Points.js

@@ -17,6 +17,8 @@ class Points extends Object3D {
 
 		super();
 
+		this.isPoints = true;
+
 		this.type = 'Points';
 
 		this.geometry = geometry;
@@ -153,8 +155,6 @@ class Points extends Object3D {
 
 }
 
-Points.prototype.isPoints = true;
-
 function testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) {
 
 	const rayPointDistanceSq = _ray.distanceSqToPoint( point );

+ 2 - 2
src/objects/SkinnedMesh.js

@@ -17,6 +17,8 @@ class SkinnedMesh extends Mesh {
 
 		super( geometry, material );
 
+		this.isSkinnedMesh = true;
+
 		this.type = 'SkinnedMesh';
 
 		this.bindMode = 'attached';
@@ -146,6 +148,4 @@ class SkinnedMesh extends Mesh {
 
 }
 
-SkinnedMesh.prototype.isSkinnedMesh = true;
-
 export { SkinnedMesh };

+ 2 - 2
src/objects/Sprite.js

@@ -32,6 +32,8 @@ class Sprite extends Object3D {
 
 		super();
 
+		this.isSprite = true;
+
 		this.type = 'Sprite';
 
 		if ( _geometry === undefined ) {
@@ -149,8 +151,6 @@ class Sprite extends Object3D {
 
 }
 
-Sprite.prototype.isSprite = true;
-
 function transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) {
 
 	// compute position in camera space

+ 2 - 2
src/renderers/WebGL3DRenderTarget.js

@@ -7,6 +7,8 @@ class WebGL3DRenderTarget extends WebGLRenderTarget {
 
 		super( width, height );
 
+		this.isWebGL3DRenderTarget = true;
+
 		this.depth = depth;
 
 		this.texture = new Data3DTexture( null, width, height, depth );
@@ -17,6 +19,4 @@ class WebGL3DRenderTarget extends WebGLRenderTarget {
 
 }
 
-WebGL3DRenderTarget.prototype.isWebGL3DRenderTarget = true;
-
 export { WebGL3DRenderTarget };

+ 2 - 2
src/renderers/WebGLArrayRenderTarget.js

@@ -7,6 +7,8 @@ class WebGLArrayRenderTarget extends WebGLRenderTarget {
 
 		super( width, height );
 
+		this.isWebGLArrayRenderTarget = true;
+
 		this.depth = depth;
 
 		this.texture = new DataArrayTexture( null, width, height, depth );
@@ -17,6 +19,4 @@ class WebGLArrayRenderTarget extends WebGLRenderTarget {
 
 }
 
-WebGLArrayRenderTarget.prototype.isWebGLArrayRenderTarget = true;
-
 export { WebGLArrayRenderTarget };

+ 2 - 2
src/renderers/WebGLCubeRenderTarget.js

@@ -13,6 +13,8 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
 
 		super( size, size, options );
 
+		this.isWebGLCubeRenderTarget = true;
+
 		const image = { width: size, height: size, depth: 1 };
 		const images = [ image, image, image, image, image, image ];
 
@@ -141,6 +143,4 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
 
 }
 
-WebGLCubeRenderTarget.prototype.isWebGLCubeRenderTarget = true;
-
 export { WebGLCubeRenderTarget };

+ 2 - 2
src/renderers/WebGLMultipleRenderTargets.js

@@ -6,6 +6,8 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 
 		super( width, height, options );
 
+		this.isWebGLMultipleRenderTargets = true;
+
 		const texture = this.texture;
 
 		this.texture = [];
@@ -77,6 +79,4 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 
 }
 
-WebGLMultipleRenderTargets.prototype.isWebGLMultipleRenderTargets = true;
-
 export { WebGLMultipleRenderTargets };

+ 2 - 2
src/renderers/WebGLRenderTarget.js

@@ -15,6 +15,8 @@ class WebGLRenderTarget extends EventDispatcher {
 
 		super();
 
+		this.isWebGLRenderTarget = true;
+
 		this.width = width;
 		this.height = height;
 		this.depth = 1;
@@ -105,6 +107,4 @@ class WebGLRenderTarget extends EventDispatcher {
 
 }
 
-WebGLRenderTarget.prototype.isWebGLRenderTarget = true;
-
 export { WebGLRenderTarget };

+ 2 - 2
src/renderers/WebGLRenderer.js

@@ -56,6 +56,8 @@ function createCanvasElement() {
 
 function WebGLRenderer( parameters = {} ) {
 
+	this.isWebGLRenderer = true;
+
 	const _canvas = parameters.canvas !== undefined ? parameters.canvas : createCanvasElement(),
 		_context = parameters.context !== undefined ? parameters.context : null,
 
@@ -2191,6 +2193,4 @@ function WebGLRenderer( parameters = {} ) {
 
 }
 
-WebGLRenderer.prototype.isWebGLRenderer = true;
-
 export { WebGLRenderer };

+ 2 - 2
src/scenes/Fog.js

@@ -4,6 +4,8 @@ class Fog {
 
 	constructor( color, near = 1, far = 1000 ) {
 
+		this.isFog = true;
+
 		this.name = '';
 
 		this.color = new Color( color );
@@ -32,6 +34,4 @@ class Fog {
 
 }
 
-Fog.prototype.isFog = true;
-
 export { Fog };

+ 2 - 2
src/scenes/FogExp2.js

@@ -4,6 +4,8 @@ class FogExp2 {
 
 	constructor( color, density = 0.00025 ) {
 
+		this.isFogExp2 = true;
+
 		this.name = '';
 
 		this.color = new Color( color );
@@ -29,6 +31,4 @@ class FogExp2 {
 
 }
 
-FogExp2.prototype.isFogExp2 = true;
-
 export { FogExp2 };

+ 2 - 2
src/scenes/Scene.js

@@ -6,6 +6,8 @@ class Scene extends Object3D {
 
 		super();
 
+		this.isScene = true;
+
 		this.type = 'Scene';
 
 		this.background = null;
@@ -53,6 +55,4 @@ class Scene extends Object3D {
 
 }
 
-Scene.prototype.isScene = true;
-
 export { Scene };

+ 2 - 2
src/textures/CanvasTexture.js

@@ -6,12 +6,12 @@ class CanvasTexture extends Texture {
 
 		super( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
 
+		this.isCanvasTexture = true;
+
 		this.needsUpdate = true;
 
 	}
 
 }
 
-CanvasTexture.prototype.isCanvasTexture = true;
-
 export { CanvasTexture };

+ 2 - 2
src/textures/CompressedTexture.js

@@ -6,6 +6,8 @@ class CompressedTexture extends Texture {
 
 		super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
 
+		this.isCompressedTexture = true;
+
 		this.image = { width: width, height: height };
 		this.mipmaps = mipmaps;
 
@@ -23,6 +25,4 @@ class CompressedTexture extends Texture {
 
 }
 
-CompressedTexture.prototype.isCompressedTexture = true;
-
 export { CompressedTexture };

+ 2 - 2
src/textures/CubeTexture.js

@@ -10,6 +10,8 @@ class CubeTexture extends Texture {
 
 		super( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
 
+		this.isCubeTexture = true;
+
 		this.flipY = false;
 
 	}
@@ -28,6 +30,4 @@ class CubeTexture extends Texture {
 
 }
 
-CubeTexture.prototype.isCubeTexture = true;
-
 export { CubeTexture };

+ 2 - 2
src/textures/Data3DTexture.js

@@ -15,6 +15,8 @@ class Data3DTexture extends Texture {
 
 		super( null );
 
+		this.isData3DTexture = true;
+
 		this.image = { data, width, height, depth };
 
 		this.magFilter = NearestFilter;
@@ -30,6 +32,4 @@ class Data3DTexture extends Texture {
 
 }
 
-Data3DTexture.prototype.isData3DTexture = true;
-
 export { Data3DTexture };

+ 2 - 2
src/textures/DataArrayTexture.js

@@ -7,6 +7,8 @@ class DataArrayTexture extends Texture {
 
 		super( null );
 
+		this.isDataArrayTexture = true;
+
 		this.image = { data, width, height, depth };
 
 		this.magFilter = NearestFilter;
@@ -22,6 +24,4 @@ class DataArrayTexture extends Texture {
 
 }
 
-DataArrayTexture.prototype.isDataArrayTexture = true;
-
 export { DataArrayTexture };

+ 2 - 2
src/textures/DataTexture.js

@@ -7,6 +7,8 @@ class DataTexture extends Texture {
 
 		super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
 
+		this.isDataTexture = true;
+
 		this.image = { data: data, width: width, height: height };
 
 		this.generateMipmaps = false;
@@ -17,6 +19,4 @@ class DataTexture extends Texture {
 
 }
 
-DataTexture.prototype.isDataTexture = true;
-
 export { DataTexture };

+ 2 - 2
src/textures/DepthTexture.js

@@ -18,6 +18,8 @@ class DepthTexture extends Texture {
 
 		super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
 
+		this.isDepthTexture = true;
+
 		this.image = { width: width, height: height };
 
 		this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
@@ -31,6 +33,4 @@ class DepthTexture extends Texture {
 
 }
 
-DepthTexture.prototype.isDepthTexture = true;
-
 export { DepthTexture };

+ 2 - 2
src/textures/FramebufferTexture.js

@@ -7,6 +7,8 @@ class FramebufferTexture extends Texture {
 
 		super( { width, height } );
 
+		this.isFramebufferTexture = true;
+
 		this.format = format;
 
 		this.magFilter = NearestFilter;
@@ -20,6 +22,4 @@ class FramebufferTexture extends Texture {
 
 }
 
-FramebufferTexture.prototype.isFramebufferTexture = true;
-
 export { FramebufferTexture };

+ 2 - 2
src/textures/Source.js

@@ -5,6 +5,8 @@ class Source {
 
 	constructor( data = null ) {
 
+		this.isSource = true;
+
 		this.uuid = MathUtils.generateUUID();
 
 		this.data = data;
@@ -118,6 +120,4 @@ function serializeImage( image ) {
 
 }
 
-Source.prototype.isSource = true;
-
 export { Source };

+ 2 - 2
src/textures/Texture.js

@@ -23,6 +23,8 @@ class Texture extends EventDispatcher {
 
 		super();
 
+		this.isTexture = true;
+
 		Object.defineProperty( this, 'id', { value: textureId ++ } );
 
 		this.uuid = MathUtils.generateUUID();
@@ -303,6 +305,4 @@ class Texture extends EventDispatcher {
 Texture.DEFAULT_IMAGE = null;
 Texture.DEFAULT_MAPPING = UVMapping;
 
-Texture.prototype.isTexture = true;
-
 export { Texture };

+ 2 - 2
src/textures/VideoTexture.js

@@ -7,6 +7,8 @@ class VideoTexture extends Texture {
 
 		super( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
 
+		this.isVideoTexture = true;
+
 		this.minFilter = minFilter !== undefined ? minFilter : LinearFilter;
 		this.magFilter = magFilter !== undefined ? magFilter : LinearFilter;
 
@@ -50,6 +52,4 @@ class VideoTexture extends Texture {
 
 }
 
-VideoTexture.prototype.isVideoTexture = true;
-
 export { VideoTexture };

+ 3 - 5
test/unit/src/core/Object3D.tests.js

@@ -301,11 +301,9 @@ export default QUnit.module( 'Core', () => {
 			obj.translateOnAxis( new Vector3( 0, 1, 0 ), 1.23 );
 			obj.translateOnAxis( new Vector3( 0, 0, 1 ), - 4.56 );
 
-			assert.propEqual( obj.position, {
-				x: 1,
-				y: 1.23,
-				z: - 4.56
-			} );
+			assert.numEqual( obj.position.x, 1, 'x is equal' );
+			assert.numEqual( obj.position.y, 1.23, 'y is equal' );
+			assert.numEqual( obj.position.z, - 4.56, 'z is equal' );
 
 		} );