Bladeren bron

Updated examples builds.

Mr.doob 3 jaren geleden
bovenliggende
commit
62c483f0bf

+ 5 - 6
examples/js/controls/TransformControls.js

@@ -40,6 +40,7 @@
 
 			}
 
+			this.isTransformControls = true;
 			this.visible = false;
 			this.domElement = domElement;
 			this.domElement.style.touchAction = 'none'; // disable touch scroll
@@ -604,9 +605,8 @@
 
 		}
 
-	}
+	} // mouse / touch event handlers
 
-	TransformControls.prototype.isTransformControls = true; // mouse / touch event handlers
 
 	function getPointer( event ) {
 
@@ -731,6 +731,7 @@
 		constructor() {
 
 			super();
+			this.isTransformControlsGizmo = true;
 			this.type = 'TransformControlsGizmo'; // shared materials
 
 			const gizmoMaterial = new THREE.MeshBasicMaterial( {
@@ -1259,9 +1260,8 @@
 
 		}
 
-	}
+	} //
 
-	TransformControlsGizmo.prototype.isTransformControlsGizmo = true; //
 
 	class TransformControlsPlane extends THREE.Mesh {
 
@@ -1275,6 +1275,7 @@
 				opacity: 0.1,
 				toneMapped: false
 			} ) );
+			this.isTransformControlsPlane = true;
 			this.type = 'TransformControlsPlane';
 
 		}
@@ -1374,8 +1375,6 @@
 
 	}
 
-	TransformControlsPlane.prototype.isTransformControlsPlane = true;
-
 	THREE.TransformControls = TransformControls;
 	THREE.TransformControlsGizmo = TransformControlsGizmo;
 	THREE.TransformControlsPlane = TransformControlsPlane;

+ 2 - 2
examples/js/geometries/LightningStrike.js

@@ -106,6 +106,7 @@
 		constructor( rayParameters = {} ) {
 
 			super();
+			this.isLightningStrike = true;
 			this.type = 'LightningStrike'; // Set parameters, and set undefined parameters to default values
 
 			this.init( LightningStrike.copyParameters( rayParameters, rayParameters ) ); // Creates and populates the mesh
@@ -856,9 +857,8 @@
 
 		}
 
-	}
+	} // Ray states
 
-	LightningStrike.prototype.isLightningStrike = true; // Ray states
 
 	LightningStrike.RAY_INITIALIZED = 0;
 	LightningStrike.RAY_UNBORN = 1;

+ 1 - 2
examples/js/helpers/ViewHelper.js

@@ -7,6 +7,7 @@
 		constructor( editorCamera, dom ) {
 
 			super();
+			this.isViewHelper = true;
 			this.animating = false;
 			this.controls = null;
 			const color1 = new THREE.Color( '#ff3653' );
@@ -260,8 +261,6 @@
 
 	}
 
-	ViewHelper.prototype.isViewHelper = true;
-
 	THREE.ViewHelper = ViewHelper;
 
 } )();

+ 1 - 2
examples/js/lines/Line2.js

@@ -7,14 +7,13 @@
 		} ) ) {
 
 			super( geometry, material );
+			this.isLine2 = true;
 			this.type = 'Line2';
 
 		}
 
 	}
 
-	Line2.prototype.isLine2 = true;
-
 	THREE.Line2 = Line2;
 
 } )();

+ 1 - 2
examples/js/lines/LineGeometry.js

@@ -5,6 +5,7 @@
 		constructor() {
 
 			super();
+			this.isLineGeometry = true;
 			this.type = 'LineGeometry';
 
 		}
@@ -75,8 +76,6 @@
 
 	}
 
-	LineGeometry.prototype.isLineGeometry = true;
-
 	THREE.LineGeometry = LineGeometry;
 
 } )();

+ 1 - 2
examples/js/lines/LineMaterial.js

@@ -445,6 +445,7 @@
 				clipping: true // required for clipping support
 
 			} );
+			this.isLineMaterial = true;
 			Object.defineProperties( this, {
 				color: {
 					enumerable: true,
@@ -636,8 +637,6 @@
 
 	}
 
-	LineMaterial.prototype.isLineMaterial = true;
-
 	THREE.LineMaterial = LineMaterial;
 
 } )();

+ 1 - 2
examples/js/lines/LineSegments2.js

@@ -228,6 +228,7 @@
 		} ) ) {
 
 			super( geometry, material );
+			this.isLineSegments2 = true;
 			this.type = 'LineSegments2';
 
 		} // for backwards-compatibility, but could be a method of THREE.LineSegmentsGeometry...
@@ -356,8 +357,6 @@
 
 	}
 
-	LineSegments2.prototype.isLineSegments2 = true;
-
 	THREE.LineSegments2 = LineSegments2;
 
 } )();

+ 1 - 2
examples/js/lines/LineSegmentsGeometry.js

@@ -9,6 +9,7 @@
 		constructor() {
 
 			super();
+			this.isLineSegmentsGeometry = true;
 			this.type = 'LineSegmentsGeometry';
 			const 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 ];
 			const uvs = [ - 1, 2, 1, 2, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 2, 1, - 2 ];
@@ -223,8 +224,6 @@
 
 	}
 
-	LineSegmentsGeometry.prototype.isLineSegmentsGeometry = true;
-
 	THREE.LineSegmentsGeometry = LineSegmentsGeometry;
 
 } )();

+ 1 - 2
examples/js/lines/Wireframe.js

@@ -11,6 +11,7 @@
 		} ) ) {
 
 			super( geometry, material );
+			this.isWireframe = true;
 			this.type = 'Wireframe';
 
 		} // for backwards-compatibility, but could be a method of THREE.LineSegmentsGeometry...
@@ -46,8 +47,6 @@
 
 	}
 
-	Wireframe.prototype.isWireframe = true;
-
 	THREE.Wireframe = Wireframe;
 
 } )();

+ 1 - 2
examples/js/lines/WireframeGeometry2.js

@@ -5,6 +5,7 @@
 		constructor( geometry ) {
 
 			super();
+			this.isWireframeGeometry2 = true;
 			this.type = 'WireframeGeometry2';
 			this.fromWireframeGeometry( new THREE.WireframeGeometry( geometry ) ); // set colors, maybe
 
@@ -12,8 +13,6 @@
 
 	}
 
-	WireframeGeometry2.prototype.isWireframeGeometry2 = true;
-
 	THREE.WireframeGeometry2 = WireframeGeometry2;
 
 } )();

+ 1 - 2
examples/js/loaders/FontLoader.js

@@ -50,6 +50,7 @@
 
 		constructor( data ) {
 
+			this.isFont = true;
 			this.type = 'Font';
 			this.data = data;
 
@@ -175,8 +176,6 @@
 
 	}
 
-	Font.prototype.isFont = true;
-
 	THREE.Font = Font;
 	THREE.FontLoader = FontLoader;
 

+ 1 - 2
examples/js/loaders/MMDLoader.js

@@ -1823,6 +1823,7 @@
 		constructor( parameters ) {
 
 			super();
+			this.isMMDToonMaterial = true;
 			this._matcapCombine = THREE.AddOperation;
 			this.emissiveIntensity = 1.0;
 			this.normalMapType = THREE.TangentSpaceNormalMap;
@@ -1918,8 +1919,6 @@
 
 	}
 
-	MMDToonMaterial.prototype.isMMDToonMaterial = true;
-
 	THREE.MMDLoader = MMDLoader;
 
 } )();

+ 1 - 1
examples/js/math/Lut.js

@@ -4,6 +4,7 @@
 
 		constructor( colormap, count = 32 ) {
 
+			this.isLut = true;
 			this.lut = [];
 			this.map = [];
 			this.n = 0;
@@ -157,7 +158,6 @@
 
 	}
 
-	Lut.prototype.isLut = true;
 	const ColorMapKeywords = {
 		'rainbow': [[ 0.0, 0x0000FF ], [ 0.2, 0x00FFFF ], [ 0.5, 0x00FF00 ], [ 0.8, 0xFFFF00 ], [ 1.0, 0xFF0000 ]],
 		'cooltowarm': [[ 0.0, 0x3C4EC2 ], [ 0.2, 0x9BBCFF ], [ 0.5, 0xDCDCDC ], [ 0.8, 0xF6A385 ], [ 1.0, 0xB40426 ]],

+ 2 - 2
examples/js/objects/Lensflare.js

@@ -8,6 +8,7 @@
 				opacity: 0,
 				transparent: true
 			} ) );
+			this.isLensflare = true;
 			this.type = 'Lensflare';
 			this.frustumCulled = false;
 			this.renderOrder = Infinity; //
@@ -232,9 +233,8 @@
 
 		}
 
-	}
+	} //
 
-	Lensflare.prototype.isLensflare = true; //
 
 	class LensflareElement {
 

+ 2 - 3
examples/js/objects/LightningStorm.js

@@ -50,7 +50,8 @@
 
 		constructor( stormParams = {} ) {
 
-			super(); // Parameters
+			super();
+			this.isLightningStorm = true; // Parameters
 
 			this.stormParams = stormParams;
 			stormParams.size = stormParams.size !== undefined ? stormParams.size : 1000.0;
@@ -203,8 +204,6 @@
 
 	}
 
-	LightningStorm.prototype.isLightningStorm = true;
-
 	THREE.LightningStorm = LightningStorm;
 
 } )();

File diff suppressed because it is too large
+ 3 - 3
examples/js/objects/MarchingCubes.js


+ 1 - 1
examples/js/objects/Reflector.js

@@ -5,6 +5,7 @@
 		constructor( geometry, options = {} ) {
 
 			super( geometry );
+			this.isReflector = true;
 			this.type = 'Reflector';
 			this.camera = new THREE.PerspectiveCamera();
 			const scope = this;
@@ -138,7 +139,6 @@
 
 	}
 
-	Reflector.prototype.isReflector = true;
 	Reflector.ReflectorShader = {
 		uniforms: {
 			'color': {

+ 1 - 1
examples/js/objects/ReflectorForSSRPass.js

@@ -5,6 +5,7 @@
 		constructor( geometry, options = {} ) {
 
 			super( geometry );
+			this.isReflectorForSSRPass = true;
 			this.type = 'ReflectorForSSRPass';
 			const scope = this;
 			const color = options.color !== undefined ? new THREE.Color( options.color ) : new THREE.Color( 0x7F7F7F );
@@ -193,7 +194,6 @@
 
 	}
 
-	ReflectorForSSRPass.prototype.isReflectorForSSRPass = true;
 	ReflectorForSSRPass.ReflectorShader = {
 		defines: {
 			DISTANCE_ATTENUATION: true,

+ 1 - 1
examples/js/objects/Refractor.js

@@ -5,6 +5,7 @@
 		constructor( geometry, options = {} ) {
 
 			super( geometry );
+			this.isRefractor = true;
 			this.type = 'Refractor';
 			this.camera = new THREE.PerspectiveCamera();
 			const scope = this;
@@ -192,7 +193,6 @@
 
 	}
 
-	Refractor.prototype.isRefractor = true;
 	Refractor.RefractorShader = {
 		uniforms: {
 			'color': {

+ 1 - 2
examples/js/objects/ShadowMesh.js

@@ -17,6 +17,7 @@
 				depthWrite: false
 			} );
 			super( mesh.geometry, shadowMaterial );
+			this.isShadowMesh = true;
 			this.meshMatrix = mesh.matrixWorld;
 			this.frustumCulled = false;
 			this.matrixAutoUpdate = false;
@@ -50,8 +51,6 @@
 
 	}
 
-	ShadowMesh.prototype.isShadowMesh = true;
-
 	THREE.ShadowMesh = ShadowMesh;
 
 } )();

+ 1 - 1
examples/js/objects/Sky.js

@@ -28,12 +28,12 @@
 				depthWrite: false
 			} );
 			super( new THREE.BoxGeometry( 1, 1, 1 ), material );
+			this.isSky = true;
 
 		}
 
 	}
 
-	Sky.prototype.isSky = true;
 	Sky.SkyShader = {
 		uniforms: {
 			'turbidity': {

+ 1 - 2
examples/js/objects/Water.js

@@ -12,6 +12,7 @@
 		constructor( geometry, options = {} ) {
 
 			super( geometry );
+			this.isWater = true;
 			const scope = this;
 			const textureWidth = options.textureWidth !== undefined ? options.textureWidth : 512;
 			const textureHeight = options.textureHeight !== undefined ? options.textureHeight : 512;
@@ -281,8 +282,6 @@
 
 	}
 
-	Water.prototype.isWater = true;
-
 	THREE.Water = Water;
 
 } )();

+ 1 - 1
examples/js/objects/Water2.js

@@ -12,6 +12,7 @@
 		constructor( geometry, options = {} ) {
 
 			super( geometry );
+			this.isWater = true;
 			this.type = 'Water';
 			const scope = this;
 			const color = options.color !== undefined ? new THREE.Color( options.color ) : new THREE.Color( 0xFFFFFF );
@@ -157,7 +158,6 @@
 
 	}
 
-	Water.prototype.isWater = true;
 	Water.WaterShader = {
 		uniforms: {
 			'color': {

+ 2 - 2
examples/js/renderers/CSS2DRenderer.js

@@ -5,6 +5,7 @@
 		constructor( element = document.createElement( 'div' ) ) {
 
 			super();
+			this.isCSS2DObject = true;
 			this.element = element;
 			this.element.style.position = 'absolute';
 			this.element.style.userSelect = 'none';
@@ -33,9 +34,8 @@
 
 		}
 
-	}
+	} //
 
-	CSS2DObject.prototype.isCSS2DObject = true; //
 
 	const _vector = new THREE.Vector3();
 

+ 3 - 4
examples/js/renderers/CSS3DRenderer.js

@@ -15,6 +15,7 @@
 		constructor( element = document.createElement( 'div' ) ) {
 
 			super();
+			this.isCSS3DObject = true;
 			this.element = element;
 			this.element.style.position = 'absolute';
 			this.element.style.pointerEvents = 'auto';
@@ -46,13 +47,12 @@
 
 	}
 
-	CSS3DObject.prototype.isCSS3DObject = true;
-
 	class CSS3DSprite extends CSS3DObject {
 
 		constructor( element ) {
 
 			super( element );
+			this.isCSS3DSprite = true;
 			this.rotation2D = 0;
 
 		}
@@ -65,9 +65,8 @@
 
 		}
 
-	}
+	} //
 
-	CSS3DSprite.prototype.isCSS3DSprite = true; //
 
 	const _matrix = new THREE.Matrix4();
 

+ 1 - 2
examples/js/renderers/SVGRenderer.js

@@ -5,14 +5,13 @@
 		constructor( node ) {
 
 			super();
+			this.isSVGObject = true;
 			this.node = node;
 
 		}
 
 	}
 
-	SVGObject.prototype.isSVGObject = true;
-
 	class SVGRenderer {
 
 		constructor() {

Some files were not shown because too many files changed in this diff