@@ -4,8 +4,6 @@ class Font {
constructor( data ) {
- this.isFont = true;
-
this.type = 'Font';
this.data = data;
@@ -140,4 +138,6 @@ function createPath( char, scale, offsetX, offsetY, data ) {
}
+Font.prototype.isFont = true;
+
export { Font };
@@ -7,10 +7,11 @@ class ArcCurve extends EllipseCurve {
super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );
this.type = 'ArcCurve';
- this.isArcCurve = true;
+ArcCurve.prototype.isArcCurve = true;
export { ArcCurve };
@@ -88,7 +88,7 @@ class CatmullRomCurve3 extends Curve {
super();
this.type = 'CatmullRomCurve3';
- this.isCatmullRomCurve3 = true;
this.points = points;
this.closed = closed;
this.curveType = curveType;
@@ -248,4 +248,6 @@ class CatmullRomCurve3 extends Curve {
+CatmullRomCurve3.prototype.isCatmullRomCurve3 = true;
export { CatmullRomCurve3 };
@@ -9,7 +9,6 @@ class CubicBezierCurve extends Curve {
this.type = 'CubicBezierCurve';
- this.isCubicBezierCurve = true;
this.v0 = v0;
this.v1 = v1;
@@ -74,4 +73,6 @@ class CubicBezierCurve extends Curve {
+CubicBezierCurve.prototype.isCubicBezierCurve = true;
export { CubicBezierCurve };
@@ -9,7 +9,6 @@ class CubicBezierCurve3 extends Curve {
this.type = 'CubicBezierCurve3';
- this.isCubicBezierCurve3 = true;
@@ -75,4 +74,6 @@ class CubicBezierCurve3 extends Curve {
+CubicBezierCurve3.prototype.isCubicBezierCurve3 = true;
export { CubicBezierCurve3 };
@@ -8,7 +8,6 @@ class EllipseCurve extends Curve {
this.type = 'EllipseCurve';
- this.isEllipseCurve = true;
this.aX = aX;
this.aY = aY;
@@ -152,4 +151,6 @@ class EllipseCurve extends Curve {
+EllipseCurve.prototype.isEllipseCurve = true;
export { EllipseCurve };
@@ -8,7 +8,6 @@ class LineCurve extends Curve {
this.type = 'LineCurve';
- this.isLineCurve = true;
this.v2 = v2;
@@ -86,4 +85,6 @@ class LineCurve extends Curve {
+LineCurve.prototype.isLineCurve = true;
export { LineCurve };
@@ -9,7 +9,6 @@ class QuadraticBezierCurve extends Curve {
this.type = 'QuadraticBezierCurve';
- this.isQuadraticBezierCurve = true;
@@ -70,4 +69,6 @@ class QuadraticBezierCurve extends Curve {
+QuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;
export { QuadraticBezierCurve };
@@ -9,7 +9,6 @@ class QuadraticBezierCurve3 extends Curve {
this.type = 'QuadraticBezierCurve3';
- this.isQuadraticBezierCurve3 = true;
@@ -71,4 +70,6 @@ class QuadraticBezierCurve3 extends Curve {
+QuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;
export { QuadraticBezierCurve3 };
@@ -9,7 +9,6 @@ class SplineCurve extends Curve {
this.type = 'SplineCurve';
- this.isSplineCurve = true;
@@ -93,4 +92,6 @@ class SplineCurve extends Curve {
+SplineCurve.prototype.isSplineCurve = true;
export { SplineCurve };
@@ -7,11 +7,11 @@ class AmbientLight extends Light {
super( color, intensity );
this.type = 'AmbientLight';
- this.isAmbientLight = true;
+AmbientLight.prototype.isAmbientLight = true;
export { AmbientLight };
@@ -7,8 +7,6 @@ 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 );
@@ -18,4 +16,6 @@ class AmbientLightProbe extends LightProbe {
+AmbientLightProbe.prototype.isAmbientLightProbe = true;
export { AmbientLightProbe };
@@ -8,8 +8,6 @@ class DirectionalLight extends Light {
- this.isDirectionalLight = true;
this.type = 'DirectionalLight';
this.position.copy( Object3D.DefaultUp );
@@ -34,4 +32,6 @@ class DirectionalLight extends Light {
+DirectionalLight.prototype.isDirectionalLight = true;
export { DirectionalLight };
@@ -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 };
@@ -8,8 +8,6 @@ class HemisphereLight extends Light {
super( skyColor, intensity );
- this.isHemisphereLight = true;
this.type = 'HemisphereLight';
@@ -31,4 +29,6 @@ class HemisphereLight extends Light {
+HemisphereLight.prototype.isHemisphereLight = true;
export { HemisphereLight };
@@ -8,8 +8,6 @@ class HemisphereLightProbe extends LightProbe {
- this.isHemisphereLightProbe = true;
const color1 = new Color().set( skyColor );
const color2 = new Color().set( groundColor );
@@ -27,4 +25,6 @@ class HemisphereLightProbe extends LightProbe {
+HemisphereLightProbe.prototype.isHemisphereLightProbe = true;
export { HemisphereLightProbe };
@@ -7,8 +7,6 @@ class Light extends Object3D {
- this.isLight = true;
this.type = 'Light';
this.color = new Color( color );
@@ -49,4 +47,6 @@ class Light extends Object3D {
+Light.prototype.isLight = true;
export { Light };
@@ -7,8 +7,6 @@ class LightProbe extends Light {
- this.isLightProbe = true;
this.sh = sh;
@@ -44,4 +42,6 @@ class LightProbe extends Light {
+LightProbe.prototype.isLightProbe = true;
export { LightProbe };
@@ -7,8 +7,6 @@ class PointLight extends Light {
- this.isPointLight = true;
this.type = 'PointLight';
this.distance = distance;
@@ -49,4 +47,6 @@ class PointLight extends Light {
+PointLight.prototype.isPointLight = true;
export { PointLight };
@@ -15,8 +15,6 @@ class PointLightShadow extends LightShadow {
super( new PerspectiveCamera( 90, 1, 0.5, 500 ) );
- this.isPointLightShadow = true;
this._frameExtents = new Vector2( 4, 2 );
this._viewportCount = 6;
@@ -84,4 +82,6 @@ class PointLightShadow extends LightShadow {
+PointLightShadow.prototype.isPointLightShadow = true;
export { PointLightShadow };
@@ -6,8 +6,6 @@ class RectAreaLight extends Light {
- this.isRectAreaLight = true;
this.type = 'RectAreaLight';
this.width = width;
@@ -39,4 +37,6 @@ class RectAreaLight extends Light {
+RectAreaLight.prototype.isRectAreaLight = true;
export { RectAreaLight };
@@ -8,8 +8,6 @@ class SpotLight extends Light {
- this.isSpotLight = true;
this.type = 'SpotLight';
@@ -61,4 +59,6 @@ class SpotLight extends Light {
+SpotLight.prototype.isSpotLight = true;
export { SpotLight };
@@ -8,8 +8,6 @@ class SpotLightShadow extends LightShadow {
super( new PerspectiveCamera( 50, 1, 0.5, 500 ) );
- this.isSpotLightShadow = true;
this.focus = 1;
@@ -37,4 +35,6 @@ class SpotLightShadow extends LightShadow {
+SpotLightShadow.prototype.isSpotLightShadow = true;
export { SpotLightShadow };
@@ -6,8 +6,6 @@ class Box2 {
constructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) {
- this.isBox2 = true;
this.min = min;
this.max = max;
@@ -228,5 +226,6 @@ class Box2 {
+Box2.prototype.isBox2 = true;
export { Box2 };
@@ -62,8 +62,6 @@ class Box3 {
constructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) {
- this.isBox3 = true;
@@ -550,4 +548,6 @@ class Box3 {
+Box3.prototype.isBox3 = true;
export { Box3 };
@@ -55,8 +55,6 @@ class Color {
constructor( r, g, b ) {
- this.isColor = true;
if ( g === undefined && b === undefined ) {
// r is THREE.Color, hex or string
@@ -604,9 +602,10 @@ class Color {
Color.NAMES = _colorKeywords;
+Color.prototype.isColor = true;
Color.prototype.r = 1;
Color.prototype.g = 1;
Color.prototype.b = 1;
export { Color };
@@ -10,8 +10,6 @@ class Euler {
constructor( x = 0, y = 0, z = 0, order = Euler.DefaultOrder ) {
- this.isEuler = true;
this._x = x;
this._y = y;
this._z = z;
@@ -320,6 +318,8 @@ class Euler {
+Euler.prototype.isEuler = true;
Euler.DefaultOrder = 'XYZ';
Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
@@ -2,8 +2,6 @@ class Matrix3 {
constructor() {
- this.isMatrix3 = true;
this.elements = [
1, 0, 0,
@@ -336,4 +334,6 @@ class Matrix3 {
+Matrix3.prototype.isMatrix3 = true;
export { Matrix3 };
@@ -12,8 +12,6 @@ class Matrix4 {
- this.isMatrix4 = true;
1, 0, 0, 0,
@@ -882,4 +880,6 @@ class Matrix4 {
+Matrix4.prototype.isMatrix4 = true;
export { Matrix4 };
@@ -9,8 +9,6 @@ class Plane {
constructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) {
- this.isPlane = true;
// normal is assumed to be normalized
this.normal = normal;
@@ -223,5 +221,6 @@ class Plane {
+Plane.prototype.isPlane = true;
export { Plane };
@@ -4,8 +4,6 @@ class Quaternion {
constructor( x = 0, y = 0, z = 0, w = 1 ) {
- this.isQuaternion = true;
@@ -656,4 +654,6 @@ class Quaternion {
+Quaternion.prototype.isQuaternion = true;
export { Quaternion };
@@ -14,8 +14,6 @@ class SphericalHarmonics3 {
- this.isSphericalHarmonics3 = true;
this.coefficients = [];
for ( let i = 0; i < 9; i ++ ) {
@@ -240,5 +238,6 @@ class SphericalHarmonics3 {
+SphericalHarmonics3.prototype.isSphericalHarmonics3 = true;
export { SphericalHarmonics3 };
@@ -2,8 +2,6 @@ class Vector2 {
constructor( x = 0, y = 0 ) {
- this.isVector2 = true;
this.x = x;
this.y = y;
@@ -474,5 +472,6 @@ class Vector2 {
+Vector2.prototype.isVector2 = true;
export { Vector2 };
@@ -8,8 +8,6 @@ class Vector3 {
constructor( x = 0, y = 0, z = 0 ) {
- this.isVector3 = true;
this.z = z;
@@ -718,4 +716,6 @@ class Vector3 {
+Vector3.prototype.isVector3 = true;
export { Vector3 };
@@ -2,8 +2,6 @@ class Vector4 {
- this.isVector4 = true;
@@ -652,4 +650,6 @@ class Vector4 {
+Vector4.prototype.isVector4 = true;
export { Vector4 };
@@ -5,12 +5,13 @@ class Group extends Object3D {
this.type = 'Group';
- this.isGroup = true;
+Group.prototype.isGroup = true;
export { Group };
@@ -5,14 +5,13 @@ class LineLoop extends Line {
constructor( geometry, material ) {
super( geometry, material );
this.type = 'LineLoop';
- this.isLineLoop = true;
+LineLoop.prototype.isLineLoop = true;
export { LineLoop };
@@ -85,8 +85,6 @@ class Sprite extends Object3D {
this.center = new Vector2( 0.5, 0.5 );
- this.isSprite = true;
raycast( raycaster, intersects ) {
@@ -178,4 +176,6 @@ class Sprite extends Object3D {
+Sprite.prototype.isSprite = true;
export { Sprite };
@@ -21,8 +21,6 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
super( size, size, options );
- this.isWebGLCubeRenderTarget = true;
options = options || {};
this.texture = new CubeTexture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
@@ -140,5 +138,6 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
+WebGLCubeRenderTarget.prototype.isWebGLCubeRenderTarget = true;
export { WebGLCubeRenderTarget };
@@ -6,8 +6,6 @@ class WebGLMultisampleRenderTarget extends WebGLRenderTarget {
super( width, height, options );
- this.isWebGLMultisampleRenderTarget = true;
this.samples = 4;
@@ -24,5 +22,6 @@ class WebGLMultisampleRenderTarget extends WebGLRenderTarget {
+WebGLMultisampleRenderTarget.prototype.isWebGLMultisampleRenderTarget = true;
export { WebGLMultisampleRenderTarget };
@@ -14,8 +14,6 @@ class WebGLRenderTarget extends EventDispatcher {
- this.isWebGLRenderTarget = true;
this.height = height;
this.depth = 1;
@@ -108,5 +106,6 @@ class WebGLRenderTarget extends EventDispatcher {
+WebGLRenderTarget.prototype.isWebGLRenderTarget = true;
export { WebGLRenderTarget };
@@ -4,8 +4,6 @@ class Fog {
constructor( color, near, far ) {
- this.isFog = true;
this.name = '';
@@ -34,5 +32,6 @@ class Fog {
+Fog.prototype.isFog = true;
export { Fog };
@@ -4,8 +4,6 @@ class FogExp2 {
constructor( color, density ) {
- this.isFogExp2 = true;
@@ -31,5 +29,6 @@ class FogExp2 {
+FogExp2.prototype.isFogExp2 = true;
export { FogExp2 };
@@ -6,8 +6,6 @@ class Scene extends Object3D {
- this.isScene = true;
this.type = 'Scene';
this.background = null;
@@ -57,5 +55,6 @@ class Scene extends Object3D {
+Scene.prototype.isScene = true;
export { Scene };
@@ -297,9 +297,11 @@ export default QUnit.module( 'Core', () => {
obj.translateOnAxis( new Vector3( 0, 1, 0 ), 1.23 );
obj.translateOnAxis( new Vector3( 0, 0, 1 ), - 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' );
+ assert.propEqual( obj.position, {
+ x: 1,
+ y: 1.23,
+ z: - 4.56
+ } );
} );