瀏覽代碼

Examples: Clean up.

Mugen87 5 年之前
父節點
當前提交
a30af661cc

+ 1 - 1
examples/js/exporters/GLTFExporter.js

@@ -901,7 +901,7 @@ THREE.GLTFExporter.prototype = {
 
 			}
 
-			if ( material.isShaderMaterial && !material.isGLTFSpecularGlossinessMaterial ) {
+			if ( material.isShaderMaterial && ! material.isGLTFSpecularGlossinessMaterial ) {
 
 				console.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );
 				return null;

+ 1 - 1
examples/js/loaders/DRACOLoader.js

@@ -477,7 +477,7 @@ THREE.DRACOLoader.DRACOWorker = function () {
 
 				attributeID = decoder.GetAttributeId( dracoGeometry, draco[ attributeIDs[ attributeName ] ] );
 
-				if ( attributeID === -1 ) continue;
+				if ( attributeID === - 1 ) continue;
 
 				attribute = decoder.GetAttribute( dracoGeometry, attributeID );
 

+ 1 - 1
examples/js/misc/CarControls.js

@@ -242,7 +242,7 @@ THREE.CarControls = ( function ( ) {
 			frontLeftWheelRoot.rotation[ this.wheelTurnAxis ] = wheelOrientation;
 			frontRightWheelRoot.rotation[ this.wheelTurnAxis ] = wheelOrientation;
 
-			steeringWheel.rotation[ this.steeringWheelTurnAxis ] = -wheelOrientation * 6;
+			steeringWheel.rotation[ this.steeringWheelTurnAxis ] = - wheelOrientation * 6;
 
 		},
 

+ 8 - 8
examples/js/vr/HelioWebXRPolyfill.js

@@ -6,7 +6,7 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 
 	console.log( "Helio WebXR Polyfill (Lumin 0.97.0)" );
 
-	const isHelio96 = navigator.userAgent.includes("Chrome/73");
+	const isHelio96 = navigator.userAgent.includes( "Chrome/73" );
 
 	// WebXRManager - XR.supportSession() Polyfill - WebVR.js line 147
 
@@ -32,9 +32,9 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 
 			return new Promise( function ( resolve, reject ) {
 
-				const sessionType = (isHelio96 ? {
+				const sessionType = ( isHelio96 ? {
 					mode: 'immersive-ar' // Force using immersive-ar
-				} : 'immersive-ar');
+				} : 'immersive-ar' );
 
 				tempRequestSession( sessionType )
 					.then( function ( session ) {
@@ -74,11 +74,11 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 
 								// WebXRManager - xrFrame.getPose() Polyfill - line 259
 
-								const tempGetPose = (isHelio96 ? null : frame.getPose.bind( frame ));
+								const tempGetPose = ( isHelio96 ? null : frame.getPose.bind( frame ) );
 
 								frame.getPose = function ( targetRaySpace, referenceSpace ) {
 
-									if (isHelio96) {
+									if ( isHelio96 ) {
 
 										const inputPose = frame.getInputPose(
 											targetRaySpace,
@@ -93,7 +93,7 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 
 									} else {
 
-										return tempGetPose(targetRaySpace.gripSpace, referenceSpace);
+										return tempGetPose( targetRaySpace.gripSpace, referenceSpace );
 
 									}
 
@@ -113,7 +113,7 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 
 							const res = tempGetInputSources();
 
-							res.forEach( function (xrInputSource ) {
+							res.forEach( function ( xrInputSource ) {
 
 								Object.defineProperty( xrInputSource, "targetRaySpace", {
 									get: function () {
@@ -141,7 +141,7 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
 
 						// WebXRManager - xrSession.updateRenderState() Polyfill Line 129
 
-						if (isHelio96) {
+						if ( isHelio96 ) {
 
 							session.updateRenderState = function ( { baseLayer } ) {
 

+ 1 - 1
examples/jsm/exporters/GLTFExporter.js

@@ -925,7 +925,7 @@ GLTFExporter.prototype = {
 
 			}
 
-			if ( material.isShaderMaterial && !material.isGLTFSpecularGlossinessMaterial ) {
+			if ( material.isShaderMaterial && ! material.isGLTFSpecularGlossinessMaterial ) {
 
 				console.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );
 				return null;

+ 1 - 1
examples/jsm/loaders/DRACOLoader.js

@@ -484,7 +484,7 @@ DRACOLoader.DRACOWorker = function () {
 
 				attributeID = decoder.GetAttributeId( dracoGeometry, draco[ attributeIDs[ attributeName ] ] );
 
-				if ( attributeID === -1 ) continue;
+				if ( attributeID === - 1 ) continue;
 
 				attribute = decoder.GetAttribute( dracoGeometry, attributeID );
 

+ 1 - 1
examples/jsm/misc/CarControls.js

@@ -249,7 +249,7 @@ var CarControls = ( function ( ) {
 			frontLeftWheelRoot.rotation[ this.wheelTurnAxis ] = wheelOrientation;
 			frontRightWheelRoot.rotation[ this.wheelTurnAxis ] = wheelOrientation;
 
-			steeringWheel.rotation[ this.steeringWheelTurnAxis ] = -wheelOrientation * 6;
+			steeringWheel.rotation[ this.steeringWheelTurnAxis ] = - wheelOrientation * 6;
 
 		},