@@ -4,7 +4,7 @@ class Font {
constructor( data ) {
- Object.defineProperty( this, 'isFont', { value: true } );
+ this.isFont = true;
this.type = 'Font';
@@ -7,7 +7,7 @@ class ArcCurve extends EllipseCurve {
super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );
this.type = 'ArcCurve';
- Object.defineProperty( this, 'isArcCurve', { value: true } );
+ this.isArcCurve = true;
}
@@ -88,7 +88,7 @@ class CatmullRomCurve3 extends Curve {
super();
this.type = 'CatmullRomCurve3';
- Object.defineProperty( this, 'isCatmullRomCurve3', { value: true } );
+ this.isCatmullRomCurve3 = true;
this.points = points;
this.closed = closed;
this.curveType = curveType;
@@ -9,7 +9,7 @@ class CubicBezierCurve extends Curve {
this.type = 'CubicBezierCurve';
- Object.defineProperty( this, 'isCubicBezierCurve', { value: true } );
+ this.isCubicBezierCurve = true;
this.v0 = v0;
this.v1 = v1;
@@ -9,7 +9,7 @@ class CubicBezierCurve3 extends Curve {
this.type = 'CubicBezierCurve3';
- Object.defineProperty( this, 'isCubicBezierCurve3', { value: true } );
+ this.isCubicBezierCurve3 = true;
@@ -8,7 +8,7 @@ class EllipseCurve extends Curve {
this.type = 'EllipseCurve';
- Object.defineProperty( this, 'isEllipseCurve', { value: true } );
+ this.isEllipseCurve = true;
this.aX = aX || 0;
this.aY = aY || 0;
@@ -8,7 +8,7 @@ class LineCurve extends Curve {
this.type = 'LineCurve';
- Object.defineProperty( this, 'isLineCurve', { value: true } );
+ this.isLineCurve = true;
this.v2 = v2;
@@ -8,7 +8,7 @@ class LineCurve3 extends Curve {
this.type = 'LineCurve3';
- Object.defineProperty( this, 'isLineCurve3', { value: true } );
+ this.isLineCurve3 = true;
@@ -9,7 +9,7 @@ class QuadraticBezierCurve extends Curve {
this.type = 'QuadraticBezierCurve';
- Object.defineProperty( this, 'isQuadraticBezierCurve', { value: true } );
+ this.isQuadraticBezierCurve = true;
@@ -9,7 +9,7 @@ class QuadraticBezierCurve3 extends Curve {
this.type = 'QuadraticBezierCurve3';
- Object.defineProperty( this, 'isQuadraticBezierCurve3', { value: true } );
+ this.isQuadraticBezierCurve3 = true;
@@ -9,7 +9,7 @@ class SplineCurve extends Curve {
this.type = 'SplineCurve';
- Object.defineProperty( this, 'isSplineCurve', { value: true } );
+ this.isSplineCurve = true;
@@ -7,7 +7,7 @@ class AmbientLight extends Light {
super( color, intensity );
this.type = 'AmbientLight';
- Object.defineProperty( this, 'isAmbientLight', { value: true } );
+ this.isAmbientLight = true;
@@ -7,7 +7,7 @@ class AmbientLightProbe extends LightProbe {
super( undefined, intensity );
- Object.defineProperty( this, 'isAmbientLightProbe', { value: true } );
+ this.isAmbientLightProbe = true;
const color1 = new Color().set( color );
@@ -8,7 +8,7 @@ class DirectionalLight extends Light {
- Object.defineProperty( this, 'isDirectionalLight', { value: true } );
+ this.isDirectionalLight = true;
this.type = 'DirectionalLight';
@@ -7,7 +7,7 @@ class DirectionalLightShadow extends LightShadow {
super( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );
- Object.defineProperty( this, 'isDirectionalLightShadow', { value: true } );
+ this.isDirectionalLightShadow = true;
@@ -8,7 +8,7 @@ class HemisphereLight extends Light {
super( skyColor, intensity );
- Object.defineProperty( this, 'isHemisphereLight', { value: true } );
+ this.isHemisphereLight = true;
this.type = 'HemisphereLight';
@@ -8,7 +8,7 @@ class HemisphereLightProbe extends LightProbe {
- Object.defineProperty( this, 'isHemisphereLightProbe', { value: true } );
+ this.isHemisphereLightProbe = true;
const color1 = new Color().set( skyColor );
const color2 = new Color().set( groundColor );
@@ -7,7 +7,7 @@ class Light extends Object3D {
- Object.defineProperty( this, 'isLight', { value: true } );
+ this.isLight = true;
this.type = 'Light';
@@ -7,7 +7,7 @@ class LightProbe extends Light {
- Object.defineProperty( this, 'isLightProbe', { value: true } );
+ this.isLightProbe = true;
this.sh = sh;
@@ -7,7 +7,7 @@ class PointLight extends Light {
- Object.defineProperty( this, 'isPointLight', { value: true } );
+ this.isPointLight = true;
this.type = 'PointLight';
@@ -15,7 +15,7 @@ class PointLightShadow extends LightShadow {
super( new PerspectiveCamera( 90, 1, 0.5, 500 ) );
- Object.defineProperty( this, 'isPointLightShadow', { value: true } );
+ this.isPointLightShadow = true;
this._frameExtents = new Vector2( 4, 2 );
@@ -6,7 +6,7 @@ class RectAreaLight extends Light {
- Object.defineProperty( this, 'isRectAreaLight', { value: true } );
+ this.isRectAreaLight = true;
this.type = 'RectAreaLight';
@@ -8,7 +8,7 @@ class SpotLight extends Light {
- Object.defineProperty( this, 'isSpotLight', { value: true } );
+ this.isSpotLight = true;
this.type = 'SpotLight';
@@ -8,7 +8,7 @@ class SpotLightShadow extends LightShadow {
super( new PerspectiveCamera( 50, 1, 0.5, 500 ) );
- Object.defineProperty( this, 'isSpotLightShadow', { value: true } );
+ this.isSpotLightShadow = true;
this.focus = 1;
@@ -6,7 +6,7 @@ class Box2 {
constructor( min, max ) {
- Object.defineProperty( this, 'isBox2', { value: true } );
+ this.isBox2 = true;
this.min = ( min !== undefined ) ? min : new Vector2( + Infinity, + Infinity );
this.max = ( max !== undefined ) ? max : new Vector2( - Infinity, - Infinity );
@@ -4,7 +4,7 @@ class Box3 {
- Object.defineProperty( this, 'isBox3', { value: true } );
+ this.isBox3 = true;
this.min = ( min !== undefined ) ? min : new Vector3( + Infinity, + Infinity, + Infinity );
this.max = ( max !== undefined ) ? max : new Vector3( - Infinity, - Infinity, - Infinity );
@@ -55,7 +55,7 @@ class Color {
constructor( r, g, b ) {
- Object.defineProperty( this, 'isColor', { value: true } );
+ this.isColor = true;
if ( g === undefined && b === undefined ) {
@@ -7,7 +7,7 @@ class Euler {
constructor( x = 0, y = 0, z = 0, order = Euler.DefaultOrder ) {
- Object.defineProperty( this, 'isEuler', { value: true } );
+ this.isEuler = true;
this._x = x;
this._y = y;
@@ -2,7 +2,7 @@ class Matrix3 {
constructor() {
- Object.defineProperty( this, 'isMatrix3', { value: true } );
+ this.isMatrix3 = true;
this.elements = [
@@ -4,7 +4,7 @@ class Matrix4 {
- Object.defineProperty( this, 'isMatrix4', { value: true } );
+ this.isMatrix4 = true;
@@ -9,7 +9,7 @@ class Plane {
constructor( normal, constant ) {
- Object.defineProperty( this, 'isPlane', { value: true } );
+ this.isPlane = true;
// normal is assumed to be normalized
@@ -4,7 +4,7 @@ class Quaternion {
constructor( x = 0, y = 0, z = 0, w = 1 ) {
- Object.defineProperty( this, 'isQuaternion', { value: true } );
+ this.isQuaternion = true;
@@ -14,7 +14,7 @@ class SphericalHarmonics3 {
- Object.defineProperty( this, 'isSphericalHarmonics3', { value: true } );
+ this.isSphericalHarmonics3 = true;
this.coefficients = [];
@@ -2,7 +2,7 @@ class Vector2 {
constructor( x = 0, y = 0 ) {
- Object.defineProperty( this, 'isVector2', { value: true } );
+ this.isVector2 = true;
this.x = x;
this.y = y;
@@ -5,7 +5,7 @@ class Vector3 {
constructor( x = 0, y = 0, z = 0 ) {
- Object.defineProperty( this, 'isVector3', { value: true } );
+ this.isVector3 = true;
@@ -2,7 +2,7 @@ class Vector4 {
- Object.defineProperty( this, 'isVector4', { value: true } );
+ this.isVector4 = true;
@@ -6,7 +6,7 @@ class Group extends Object3D {
this.type = 'Group';
- Object.defineProperty( this, 'isGroup', { value: true } );
+ this.isGroup = true;
@@ -6,7 +6,7 @@ class LineLoop extends Line {
super( geometry, material );
this.type = 'LineLoop';
- Object.defineProperty( this, 'isLineLoop', { value: true } );
+ this.isLineLoop = true;
@@ -57,7 +57,7 @@ class Sprite extends Object3D {
this.center = new Vector2( 0.5, 0.5 );
- Object.defineProperty( this, 'isSprite', { value: true } );
+ this.isSprite = true;
@@ -21,7 +21,7 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
super( size, size, options );
- Object.defineProperty( this, 'isWebGLCubeRenderTarget', { value: true } );
+ this.isWebGLCubeRenderTarget = true;
options = options || {};
@@ -6,7 +6,7 @@ class WebGLMultisampleRenderTarget extends WebGLRenderTarget {
super( width, height, options );
- Object.defineProperty( this, 'isWebGLMultisampleRenderTarget', { value: true } );
+ this.isWebGLMultisampleRenderTarget = true;
this.samples = 4;
@@ -14,7 +14,7 @@ class WebGLRenderTarget extends EventDispatcher {
- Object.defineProperty( this, 'isWebGLRenderTarget', { value: true } );
+ this.isWebGLRenderTarget = true;
this.width = width;
this.height = height;
@@ -4,7 +4,7 @@ class Fog {
constructor( color, near, far ) {
- Object.defineProperty( this, 'isFog', { value: true } );
+ this.isFog = true;
this.name = '';
@@ -4,7 +4,7 @@ class FogExp2 {
constructor( color, density ) {
- Object.defineProperty( this, 'isFogExp2', { value: true } );
+ this.isFogExp2 = true;
@@ -6,7 +6,7 @@ class Scene extends Object3D {
- Object.defineProperty( this, 'isScene', { value: true } );
+ this.isScene = true;
this.type = 'Scene';