Bläddra i källkod

Remove unecessary constructor assignments

Tristan VALCKE 8 år sedan
förälder
incheckning
08c40e22c7

+ 0 - 2
src/animation/AnimationAction.js

@@ -78,8 +78,6 @@ function AnimationAction( mixer, clip, localRoot ) {
 
 Object.assign( AnimationAction.prototype, {
 
-	constructor: AnimationAction,
-
 	// State & Scheduling
 
 	play: function() {

+ 0 - 2
src/animation/AnimationClip.js

@@ -310,8 +310,6 @@ Object.assign( AnimationClip, {
 
 Object.assign( AnimationClip.prototype, {
 
-	constructor: AnimationClip,
-
 	resetDuration: function() {
 
 		var tracks = this.tracks,

+ 0 - 2
src/animation/AnimationMixer.js

@@ -29,8 +29,6 @@ function AnimationMixer( root ) {
 
 Object.assign( AnimationMixer.prototype, EventDispatcher.prototype, {
 
-	constructor: AnimationMixer,
-
 	_bindAction: function ( action, prototypeAction ) {
 
 		var root = action._localRoot || this._root,

+ 0 - 2
src/animation/AnimationObjectGroup.js

@@ -73,8 +73,6 @@ function AnimationObjectGroup( var_args ) {
 
 Object.assign( AnimationObjectGroup.prototype, {
 
-	constructor: AnimationObjectGroup,
-
 	isAnimationObjectGroup: true,
 
 	add: function( var_args ) {

+ 0 - 4
src/animation/PropertyBinding.js

@@ -19,8 +19,6 @@ function Composite ( targetGroup, path, optionalParsedPath ) {
 
 Object.assign( Composite.prototype, {
 
-	constructor: Composite,
-
 	getValue: function( array, offset ) {
 
 		this.bind(); // bind all binding
@@ -226,8 +224,6 @@ Object.assign( PropertyBinding, {
 
 Object.assign( PropertyBinding.prototype, { // prototype, continued
 
-	constructor: PropertyBinding,
-
 	// these are used to "bind" a nonexistent property
 	_getValue_unavailable: function() {},
 	_setValue_unavailable: function() {},

+ 0 - 2
src/animation/PropertyMixer.js

@@ -58,8 +58,6 @@ function PropertyMixer( binding, typeName, valueSize ) {
 
 Object.assign( PropertyMixer.prototype, {
 
-	constructor: PropertyMixer,
-
 	// accumulate data in the 'incoming' region into 'accu<i>'
 	accumulate: function( accuIndex, weight ) {
 

+ 0 - 2
src/core/BufferAttribute.js

@@ -44,8 +44,6 @@ Object.defineProperty( BufferAttribute.prototype, "needsUpdate", {
 
 Object.assign( BufferAttribute.prototype, {
 
-	constructor: BufferAttribute,
-
 	isBufferAttribute: true,
 
 	setArray: function ( array ) {

+ 0 - 2
src/core/BufferGeometry.js

@@ -43,8 +43,6 @@ BufferGeometry.MaxIndex = 65535;
 
 Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
 
-	constructor: BufferGeometry,
-
 	isBufferGeometry: true,
 
 	getIndex: function () {

+ 0 - 2
src/core/Clock.js

@@ -16,8 +16,6 @@ function Clock( autoStart ) {
 
 Object.assign( Clock.prototype, {
 
-	constructor: Clock,
-
 	start: function () {
 
 		this.startTime = ( performance || Date ).now();

+ 0 - 2
src/core/Face3.js

@@ -24,8 +24,6 @@ function Face3( a, b, c, normal, color, materialIndex ) {
 
 Object.assign( Face3.prototype, {
 
-	constructor: Face3,
-
 	clone: function () {
 
 		return new this.constructor().copy( this );

+ 0 - 2
src/core/Geometry.js

@@ -61,8 +61,6 @@ function Geometry() {
 
 Object.assign( Geometry.prototype, EventDispatcher.prototype, {
 
-	constructor: Geometry,
-
 	isGeometry: true,
 
 	applyMatrix: function ( matrix ) {

+ 0 - 2
src/core/InterleavedBuffer.js

@@ -33,8 +33,6 @@ Object.defineProperty( InterleavedBuffer.prototype, "needsUpdate", {
 
 Object.assign( InterleavedBuffer.prototype, {
 
-	constructor: InterleavedBuffer,
-
 	isInterleavedBuffer: true,
 
 	setArray: function ( array ) {

+ 0 - 2
src/core/InterleavedBufferAttribute.js

@@ -42,8 +42,6 @@ Object.defineProperties( InterleavedBufferAttribute.prototype, {
 
 Object.assign( InterleavedBufferAttribute.prototype, {
 
-	constructor: InterleavedBufferAttribute,
-
 	isInterleavedBufferAttribute: true,
 
 	setX: function ( index, x ) {

+ 0 - 2
src/core/Layers.js

@@ -10,8 +10,6 @@ function Layers() {
 
 Object.assign( Layers.prototype, {
 
-	constructor: Layers,
-
 	set: function ( channel ) {
 
 		this.mask = 1 << channel;

+ 0 - 2
src/core/Object3D.js

@@ -103,8 +103,6 @@ Object3D.DefaultMatrixAutoUpdate = true;
 
 Object.assign( Object3D.prototype, EventDispatcher.prototype, {
 
-	constructor: Object3D,
-
 	isObject3D: true,
 
 	applyMatrix: function ( matrix ) {

+ 0 - 2
src/core/Raycaster.js

@@ -61,8 +61,6 @@ function intersectObject( object, raycaster, intersects, recursive ) {
 
 Object.assign( Raycaster.prototype, {
 
-	constructor: Raycaster,
-
 	linePrecision: 1,
 
 	set: function ( origin, direction ) {

+ 0 - 2
src/extras/core/Curve.js

@@ -41,8 +41,6 @@ function Curve() {}
 
 Object.assign( Curve.prototype, {
 
-	constructor: Curve,
-
 	// Virtual base class method to overwrite and implement in subclasses
 	//	- t [0 .. 1]
 

+ 0 - 2
src/loaders/Loader.js

@@ -67,8 +67,6 @@ Loader.Handlers = {
 
 Object.assign( Loader.prototype, {
 
-	constructor: Loader,
-
 	crossOrigin: undefined,
 
 	extractUrlBase: function ( url ) {

+ 0 - 2
src/materials/Material.js

@@ -82,8 +82,6 @@ Object.defineProperty( Material.prototype, "needsUpdate", {
 
 Object.assign( Material.prototype, EventDispatcher.prototype, {
 
-	constructor: Material,
-
 	isMaterial: true,
 
 	setValues: function ( values ) {

+ 0 - 2
src/materials/MultiMaterial.js

@@ -18,8 +18,6 @@ function MultiMaterial( materials ) {
 
 Object.assign( MultiMaterial.prototype, {
 
-	constructor: MultiMaterial,
-
 	isMultiMaterial: true,
 
 	toJSON: function ( meta ) {

+ 0 - 2
src/math/Box2.js

@@ -13,8 +13,6 @@ function Box2( min, max ) {
 
 Object.assign( Box2.prototype, {
 
-	constructor: Box2,
-
 	set: function ( min, max ) {
 
 		this.min.copy( min );

+ 0 - 2
src/math/Box3.js

@@ -15,8 +15,6 @@ function Box3( min, max ) {
 
 Object.assign( Box3.prototype, {
 
-	constructor: Box3,
-
 	isBox3: true,
 
 	set: function ( min, max ) {

+ 0 - 2
src/math/Color.js

@@ -44,8 +44,6 @@ function Color( r, g, b ) {
 
 Object.assign( Color.prototype, {
 
-	constructor: Color,
-
 	isColor: true,
 
 	r: 1, g: 1, b: 1,

+ 0 - 2
src/math/Cylindrical.js

@@ -17,8 +17,6 @@ function Cylindrical( radius, theta, y ) {
 
 Object.assign( Cylindrical.prototype, {
 
-	constructor: Cylindrical,
-
 	set: function ( radius, theta, y ) {
 
 		this.radius = radius;

+ 0 - 2
src/math/Euler.js

@@ -96,8 +96,6 @@ Object.defineProperties( Euler.prototype, {
 
 Object.assign( Euler.prototype, {
 
-	constructor: Euler,
-
 	isEuler: true,
 
 	set: function ( x, y, z, order ) {

+ 0 - 2
src/math/Frustum.js

@@ -25,8 +25,6 @@ function Frustum( p0, p1, p2, p3, p4, p5 ) {
 
 Object.assign( Frustum.prototype, {
 
-	constructor: Frustum,
-
 	set: function ( p0, p1, p2, p3, p4, p5 ) {
 
 		var planes = this.planes;

+ 0 - 2
src/math/Interpolant.js

@@ -34,8 +34,6 @@ function Interpolant( parameterPositions, sampleValues, sampleSize, resultBuffer
 
 Object.assign( Interpolant.prototype, {
 
-	constructor: Interpolant,
-
 	evaluate: function( t ) {
 
 		var pp = this.parameterPositions,

+ 0 - 2
src/math/Line3.js

@@ -14,8 +14,6 @@ function Line3( start, end ) {
 
 Object.assign( Line3.prototype, {
 
-	constructor: Line3,
-
 	set: function ( start, end ) {
 
 		this.start.copy( start );

+ 0 - 2
src/math/Matrix3.js

@@ -27,8 +27,6 @@ function Matrix3() {
 
 Object.assign( Matrix3.prototype, {
 
-	constructor: Matrix3,
-
 	isMatrix3: true,
 
 	set: function ( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {

+ 0 - 2
src/math/Matrix4.js

@@ -35,8 +35,6 @@ function Matrix4() {
 
 Object.assign( Matrix4.prototype, {
 
-	constructor: Matrix4,
-
 	isMatrix4: true,
 
 	set: function ( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {

+ 0 - 2
src/math/Plane.js

@@ -14,8 +14,6 @@ function Plane( normal, constant ) {
 
 Object.assign( Plane.prototype, {
 
-	constructor: Plane,
-
 	set: function ( normal, constant ) {
 
 		this.normal.copy( normal );

+ 0 - 2
src/math/Quaternion.js

@@ -163,8 +163,6 @@ Object.defineProperties( Quaternion.prototype, {
 
 Object.assign( Quaternion.prototype, {
 
-	constructor: Quaternion,
-
 	set: function ( x, y, z, w ) {
 
 		this._x = x;

+ 0 - 2
src/math/Ray.js

@@ -13,8 +13,6 @@ function Ray( origin, direction ) {
 
 Object.assign( Ray.prototype, {
 
-	constructor: Ray,
-
 	set: function ( origin, direction ) {
 
 		this.origin.copy( origin );

+ 0 - 2
src/math/Sphere.js

@@ -15,8 +15,6 @@ function Sphere( center, radius ) {
 
 Object.assign( Sphere.prototype, {
 
-	constructor: Sphere,
-
 	set: function ( center, radius ) {
 
 		this.center.copy( center );

+ 0 - 2
src/math/Spherical.js

@@ -22,8 +22,6 @@ function Spherical( radius, phi, theta ) {
 
 Object.assign( Spherical.prototype, {
 
-	constructor: Spherical,
-
 	set: function ( radius, phi, theta ) {
 
 		this.radius = radius;

+ 0 - 2
src/math/Triangle.js

@@ -104,8 +104,6 @@ Object.assign( Triangle, {
 
 Object.assign( Triangle.prototype, {
 
-	constructor: Triangle,
-
 	set: function ( a, b, c ) {
 
 		this.a.copy( a );

+ 0 - 2
src/math/Vector2.js

@@ -50,8 +50,6 @@ Object.defineProperties( Vector2.prototype, {
 
 Object.assign( Vector2.prototype, {
 
-	constructor: Vector2,
-
 	isVector2: true,
 
 	set: function ( x, y ) {

+ 0 - 2
src/math/Vector3.js

@@ -21,8 +21,6 @@ function Vector3( x, y, z ) {
 
 Object.assign( Vector3.prototype, {
 
-	constructor: Vector3,
-
 	isVector3: true,
 
 	set: function ( x, y, z ) {

+ 0 - 2
src/math/Vector4.js

@@ -17,8 +17,6 @@ function Vector4( x, y, z, w ) {
 
 Object.assign( Vector4.prototype, {
 
-	constructor: Vector4,
-
 	isVector4: true,
 
 	set: function ( x, y, z, w ) {

+ 0 - 2
src/renderers/WebGLRenderTarget.js

@@ -41,8 +41,6 @@ function WebGLRenderTarget( width, height, options ) {
 
 Object.assign( WebGLRenderTarget.prototype, EventDispatcher.prototype, {
 
-	constructor: WebGLRenderTarget,
-
 	isWebGLRenderTarget: true,
 
 	setSize: function ( width, height ) {