diff --git a/examples/jsm/controls/MapControls.js b/examples/jsm/controls/MapControls.js index b76ef8b024f29466b685e78d8ffe9ebfe436638d..8c7c73228d0b361dbae192dcaa08e44dbd84517b 100644 --- a/examples/jsm/controls/MapControls.js +++ b/examples/jsm/controls/MapControls.js @@ -1163,4 +1163,4 @@ Object.defineProperties( MapControls.prototype, { } ); -export { MapControls } \ No newline at end of file +export { MapControls }; diff --git a/examples/jsm/controls/OrbitControls.js b/examples/jsm/controls/OrbitControls.js index ef28eb00ed869ebdb3e33b2a3db652aaa26d3187..d36b89511385fd6eb4c39a35dbe9dce44a369282 100644 --- a/examples/jsm/controls/OrbitControls.js +++ b/examples/jsm/controls/OrbitControls.js @@ -1059,4 +1059,4 @@ Object.defineProperties( OrbitControls.prototype, { } ); -export { OrbitControls } \ No newline at end of file +export { OrbitControls }; diff --git a/examples/jsm/controls/TrackballControls.js b/examples/jsm/controls/TrackballControls.js index 4ef3d1d60e978b227649b9777fc0c0f7e1b39bc3..0c7813c2f83882c0d7ce665d5f921a4e11c69920 100644 --- a/examples/jsm/controls/TrackballControls.js +++ b/examples/jsm/controls/TrackballControls.js @@ -499,7 +499,7 @@ var TrackballControls = function ( object, domElement ) { function touchstart( event ) { if ( _this.enabled === false ) return; - + event.preventDefault(); switch ( event.touches.length ) { @@ -625,4 +625,4 @@ var TrackballControls = function ( object, domElement ) { TrackballControls.prototype = Object.create( EventDispatcher.prototype ); TrackballControls.prototype.constructor = THREE.TrackballControls; -export { TrackballControls } \ No newline at end of file +export { TrackballControls }; diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 4daaa973789ea8d5330301bc723fb9581e325602..c71a1a7e8b9ff4995e37ab3f494756bf671c788c 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -432,7 +432,7 @@ var GLTFLoader = ( function () { case 'directional': lightNode = new DirectionalLight( color ); - lightNode.target.position.set( 0, 0, -1 ); + lightNode.target.position.set( 0, 0, - 1 ); lightNode.add( lightNode.target ); break; @@ -450,7 +450,7 @@ var GLTFLoader = ( function () { lightDef.spot.outerConeAngle = lightDef.spot.outerConeAngle !== undefined ? lightDef.spot.outerConeAngle : Math.PI / 4.0; lightNode.angle = lightDef.spot.outerConeAngle; lightNode.penumbra = 1.0 - lightDef.spot.innerConeAngle / lightDef.spot.outerConeAngle; - lightNode.target.position.set( 0, 0, -1 ); + lightNode.target.position.set( 0, 0, - 1 ); lightNode.add( lightNode.target ); break; @@ -1058,6 +1058,7 @@ var GLTFLoader = ( function () { uniforms.refractionRatio.value = material.refractionRatio; uniforms.maxMipLevel.value = renderer.properties.get( material.envMap ).__maxMipLevel; + } uniforms.specular.value.copy( material.specular ); @@ -1450,8 +1451,10 @@ var GLTFLoader = ( function () { var accessor = target.POSITION !== undefined ? parser.getDependency( 'accessor', target.POSITION ) .then( function ( accessor ) { + // Cloning not to pollute original accessor below return cloneBufferAttribute( accessor ); + } ) : geometry.attributes.position; @@ -1465,7 +1468,9 @@ var GLTFLoader = ( function () { var accessor = target.NORMAL !== undefined ? parser.getDependency( 'accessor', target.NORMAL ) .then( function ( accessor ) { + return cloneBufferAttribute( accessor ); + } ) : geometry.attributes.normal; @@ -1942,7 +1947,7 @@ var GLTFLoader = ( function () { case 'light': dependency = this.extensions[ EXTENSIONS.KHR_LIGHTS_PUNCTUAL ].loadLight( index ); - break + break; default: throw new Error( 'Unknown type: ' + type ); @@ -3223,7 +3228,7 @@ var GLTFLoader = ( function () { var nodeDef = json.nodes[ nodeIndex ]; - return ( function() { + return ( function () { // .isBone isn't in glTF spec. See .markDefs if ( nodeDef.isBone === true ) { @@ -3416,7 +3421,7 @@ var GLTFLoader = ( function () { mesh.bind( new Skeleton( bones, boneInverses ), mesh.matrixWorld ); - }; + } return node; @@ -3487,4 +3492,4 @@ var GLTFLoader = ( function () { } )(); -export { GLTFLoader } \ No newline at end of file +export { GLTFLoader }; diff --git a/examples/jsm/loaders/OBJLoader.js b/examples/jsm/loaders/OBJLoader.js index fe6c293429cf3e4f42477d27825c304357bcf25b..e6c9b51661ba29215dea21a09e8d5ce6339386b5 100644 --- a/examples/jsm/loaders/OBJLoader.js +++ b/examples/jsm/loaders/OBJLoader.js @@ -813,4 +813,4 @@ var OBJLoader = ( function () { } )(); -export { OBJLoader } \ No newline at end of file +export { OBJLoader };