Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
linbingquan committed Aug 19, 2020
1 parent 4e2d3ab commit 72127be
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/lines/LineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class LineGeometry extends LineSegmentsGeometry {

super();

Object.defineProperty( this, 'isLineGeometry', { value: true } );

this.type = 'LineGeometry';

}
Expand Down Expand Up @@ -91,6 +93,4 @@ class LineGeometry extends LineSegmentsGeometry {

}

LineGeometry.prototype.isLineGeometry = true;

export { LineGeometry };
4 changes: 2 additions & 2 deletions examples/jsm/lines/LineSegmentsGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {

super();

Object.defineProperty( this, 'isLineSegmentsGeometry', { value: true } );

this.type = 'LineSegmentsGeometry';

var positions = [ - 1, 2, 0, 1, 2, 0, - 1, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 0, - 1, - 1, 0, 1, - 1, 0 ];
Expand Down Expand Up @@ -244,6 +246,4 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {

}

LineSegmentsGeometry.prototype.isLineSegmentsGeometry = true;

export { LineSegmentsGeometry };
4 changes: 2 additions & 2 deletions examples/jsm/lines/WireframeGeometry2.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class WireframeGeometry2 extends LineSegmentsGeometry {

super();

Object.defineProperty( this, 'isWireframeGeometry2', { value: true } );

this.type = 'WireframeGeometry2';

this.fromWireframeGeometry( new WireframeGeometry( geometry ) );
Expand All @@ -19,6 +21,4 @@ class WireframeGeometry2 extends LineSegmentsGeometry {

}

WireframeGeometry.prototype.isWireframeGeometry2 = true;

export { WireframeGeometry2 };
4 changes: 2 additions & 2 deletions src/core/BufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class BufferAttribute {

}

Object.defineProperty( this, 'isBufferAttribute', { value: true } );

this.name = '';

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

}

BufferAttribute.prototype.isBufferAttribute = true;

//

class Int8BufferAttribute extends BufferAttribute {
Expand Down
3 changes: 1 addition & 2 deletions src/core/Geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Geometry extends EventDispatcher {

super();

Object.defineProperty( this, 'isGeometry', { value: true } );
Object.defineProperty( this, 'id', { value: _geometryId += 2 } );

this.uuid = MathUtils.generateUUID();
Expand Down Expand Up @@ -1376,6 +1377,4 @@ class Geometry extends EventDispatcher {

}

Geometry.prototype.isGeometry = true;

export { Geometry };
4 changes: 2 additions & 2 deletions src/core/InstancedBufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class InstancedBufferAttribute extends BufferAttribute {

super( array, itemSize, normalized );

Object.defineProperty( this, 'isInstancedBufferAttribute', { value: true } );

if ( typeof ( normalized ) === 'number' ) {

meshPerAttribute = normalized;
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class InstancedBufferGeometry extends BufferGeometry {

super();

Object.defineProperty( this, 'isInstancedBufferGeometry', { value: 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class InstancedInterleavedBuffer extends InterleavedBuffer {

super( array, stride );

Object.defineProperty( this, 'isInstancedInterleavedBuffer', { value: true } );

this.meshPerAttribute = meshPerAttribute || 1;

}
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/InterleavedBufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class InterleavedBufferAttribute {

constructor( interleavedBuffer, itemSize, offset, normalized ) {

Object.defineProperty( this, 'isInterleavedBufferAttribute', { value: true } );

this.name = '';

this.data = interleavedBuffer;
Expand Down Expand Up @@ -247,6 +249,4 @@ class InterleavedBufferAttribute {

}

InterleavedBufferAttribute.prototype.isInterleavedBufferAttribute = true;

export { InterleavedBufferAttribute };

0 comments on commit 72127be

Please sign in to comment.