diff --git a/examples/jsm/controls/TrackballControls.js b/examples/jsm/controls/TrackballControls.js index 5a27ada004c9b21361a947c2894994d15d42e550..c3858044bceca0d028cd7bfc072f2bb08dc109f5 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 ) { diff --git a/examples/jsm/exporters/GLTFExporter.js b/examples/jsm/exporters/GLTFExporter.js index 1caffefdd8be91fe4799bbbcd3934950cee3af42..56ced501c67755d44293672b535d3f2f14e02924 100644 --- a/examples/jsm/exporters/GLTFExporter.js +++ b/examples/jsm/exporters/GLTFExporter.js @@ -1764,7 +1764,12 @@ GLTFExporter.prototype = { } else { - object.updateMatrix(); + if ( object.matrixAutoUpdate ) { + + object.updateMatrix(); + + } + if ( ! equalArray( object.matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] ) ) { gltfNode.matrix = object.matrix.elements; diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index c3cc2925585b91f17494ef8b5d1ea6efc25eedcf..cf9e8a555948e29109e9b357a70734dd20067a7c 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -933,7 +933,8 @@ var GLTFLoader = ( function () { for ( var i = 0, il = params.length; i < il; i ++ ) { - target[ params[ i ] ] = source[ params[ i ] ]; + var value = source[ params[ i ] ]; + target[ params[ i ] ] = value.isColor ? value.clone() : value; } @@ -1391,7 +1392,7 @@ var GLTFLoader = ( function () { if ( typeof gltfDef.extras === 'object' ) { - object.userData = gltfDef.extras; + Object.assign( object.userData, gltfDef.extras ); } else { @@ -3088,6 +3089,7 @@ var GLTFLoader = ( function () { if ( nodeDef.name !== undefined ) { + node.userData.name = nodeDef.name; node.name = PropertyBinding.sanitizeNodeName( nodeDef.name ); } diff --git a/examples/jsm/utils/ShadowMapViewer.js b/examples/jsm/utils/ShadowMapViewer.js index 340efd3f339f776062b01678a0b75adaa67e5623..e39eda1498780ee9ae11908f54dd9e7ee30ae341 100644 --- a/examples/jsm/utils/ShadowMapViewer.js +++ b/examples/jsm/utils/ShadowMapViewer.js @@ -63,7 +63,7 @@ var ShadowMapViewer = function ( light ) { //HUD for shadow map var shader = UnpackDepthRGBAShader; - var uniforms = new UniformsUtils.clone( shader.uniforms ); + var uniforms = UniformsUtils.clone( shader.uniforms ); var material = new ShaderMaterial( { uniforms: uniforms, vertexShader: shader.vertexShader, @@ -109,7 +109,7 @@ var ShadowMapViewer = function ( light ) { } - function resetPosition () { + function resetPosition() { scope.position.set( scope.position.x, scope.position.y ); @@ -187,6 +187,7 @@ var ShadowMapViewer = function ( light ) { camera.updateProjectionMatrix(); this.update(); + } }; diff --git a/utils/modularize.js b/utils/modularize.js index 21686673abad41e8c9b68460c6026e0c6ce0376c..ec59bbac2ff7ce9331bdf962d457540ce3870e76 100644 --- a/utils/modularize.js +++ b/utils/modularize.js @@ -24,7 +24,7 @@ var files = [ { path: 'exporters/STLExporter.js', ignoreList: [] }, { path: 'exporters/TypedGeometryExporter.js', ignoreList: [] }, - { path: 'loaders/BVHLoader.js', ignoreList: [] }, + { path: 'loaders/BVHLoader.js', ignoreList: [ 'Bones' ] }, { path: 'loaders/PCDLoader.js', ignoreList: [] }, { path: 'loaders/GLTFLoader.js', ignoreList: [ 'NoSide', 'Matrix2', 'DDSLoader' ] }, { path: 'loaders/OBJLoader.js', ignoreList: [] },