瀏覽代碼

Merge branch 'master' into ion-loading

PetterGs 4 年之前
父節點
當前提交
e1d2264e8f

+ 4 - 0
CHANGELOG.md

@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
+## [0.2.2] - 2020-12-23
+### Fixed
+- Incorrectly removing the implicit y-up to z-up GTLF transformation.
+
 ## [0.2.1] - 2020-12-15
 ### Added
 - Support for external tile sets.

+ 5 - 5
README.md

@@ -125,16 +125,16 @@ scene.add( tilesRenderer2.group );
 Adding support for DRACO decompression within the GLTF files that are transported in B3DM and I3DM formats. The same approach can be used to add support for KTX2 and DDS textures.
 
 ```js
+// Note the DRACO compression files need to be supplied via an explicit source.
+// We use unpkg here but in practice should be provided by the application.
+const dracoLoader = new DRACOLoader();
+dracoLoader.setDecoderPath( 'https://unpkg.com/three@0.116.1/examples/js/libs/draco/gltf/' );
+
 const tilesRenderer = new TilesRenderer( './path/to/tileset.json' );
 tilesRenderer.manager.addHandler( /\.gltf$/, {
 
 	parse( ...args ) {
 
-		// Note the DRACO compression files need to be supplied via an explicit source.
-		// We use unpkg here but in practice should be provided by the application.
-		const dracoLoader = new DRACOLoader();
-		dracoLoader.setDecoderPath( 'https://unpkg.com/three@0.116.1/examples/js/libs/draco/gltf/' );
-
 		const loader = new GLTFLoader( tiles.manager );
 		loader.setDRACOLoader( dracoLoader );
 		return loader.parse( ...args );

+ 1 - 2
example/bundle/b3dmExample.d88db709.js

@@ -43282,7 +43282,6 @@ function (_TilesRendererBase) {
             break;
         }
 
-        scene.updateMatrix();
         scene.matrix.premultiply(cachedTransform);
         scene.matrix.decompose(scene.position, scene.quaternion, scene.scale);
         scene.traverse(function (c) {
@@ -45159,7 +45158,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

File diff suppressed because it is too large
+ 1 - 1
example/bundle/b3dmExample.d88db709.js.map


+ 1 - 1
example/bundle/b3dmExample.js

@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

+ 1 - 2
example/bundle/cmptExample.4b2a3f0d.js

@@ -43282,7 +43282,6 @@ function (_TilesRendererBase) {
             break;
         }
 
-        scene.updateMatrix();
         scene.matrix.premultiply(cachedTransform);
         scene.matrix.decompose(scene.position, scene.quaternion, scene.scale);
         scene.traverse(function (c) {
@@ -45070,7 +45069,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

File diff suppressed because it is too large
+ 1 - 1
example/bundle/cmptExample.4b2a3f0d.js.map


+ 1 - 1
example/bundle/cmptExample.js

@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

+ 1 - 2
example/bundle/customMaterial.dd39ecee.js

@@ -43282,7 +43282,6 @@ function (_TilesRendererBase) {
             break;
         }
 
-        scene.updateMatrix();
         scene.matrix.premultiply(cachedTransform);
         scene.matrix.decompose(scene.position, scene.quaternion, scene.scale);
         scene.traverse(function (c) {
@@ -48289,7 +48288,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

File diff suppressed because it is too large
+ 1 - 1
example/bundle/customMaterial.dd39ecee.js.map


+ 1 - 1
example/bundle/customMaterial.js

@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

+ 6 - 7
example/bundle/example.e31bb0bc.js

@@ -43282,7 +43282,6 @@ function (_TilesRendererBase) {
             break;
         }
 
-        scene.updateMatrix();
         scene.matrix.premultiply(cachedTransform);
         scene.matrix.decompose(scene.position, scene.quaternion, scene.scale);
         scene.traverse(function (c) {
@@ -49119,16 +49118,16 @@ function reinstantiateTiles() {
   if (tiles) {
     offsetParent.remove(tiles.group);
     tiles.dispose();
-  }
+  } // Note the DRACO compression files need to be supplied via an explicit source.
+  // We use unpkg here but in practice should be provided by the application.
+
 
+  var dracoLoader = new _DRACOLoader.DRACOLoader();
+  dracoLoader.setDecoderPath('https://unpkg.com/three@0.116.1/examples/js/libs/draco/gltf/');
   tiles = new _index.DebugTilesRenderer(url);
   tiles.fetchOptions.mode = 'cors';
   tiles.manager.addHandler(/\.gltf$/, {
     parse: function parse() {
-      // Note the DRACO compression files need to be supplied via an explicit source.
-      // We use unpkg here but in practice should be provided by the application.
-      var dracoLoader = new _DRACOLoader.DRACOLoader();
-      dracoLoader.setDecoderPath('https://unpkg.com/three@0.116.1/examples/js/libs/draco/gltf/');
       var loader = new _GLTFLoader.GLTFLoader(tiles.manager);
       loader.setDRACOLoader(dracoLoader);
       return loader.parse.apply(loader, arguments);
@@ -49600,7 +49599,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

File diff suppressed because it is too large
+ 1 - 1
example/bundle/example.e31bb0bc.js.map


+ 1 - 2
example/bundle/i3dmExample.c6cc930a.js

@@ -43282,7 +43282,6 @@ function (_TilesRendererBase) {
             break;
         }
 
-        scene.updateMatrix();
         scene.matrix.premultiply(cachedTransform);
         scene.matrix.decompose(scene.position, scene.quaternion, scene.scale);
         scene.traverse(function (c) {
@@ -45098,7 +45097,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

File diff suppressed because it is too large
+ 1 - 1
example/bundle/i3dmExample.c6cc930a.js.map


+ 1 - 1
example/bundle/i3dmExample.js

@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

+ 1 - 1
example/bundle/index.js

@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

+ 1 - 2
example/bundle/offscreenShadows.ce0529e7.js

@@ -43282,7 +43282,6 @@ function (_TilesRendererBase) {
             break;
         }
 
-        scene.updateMatrix();
         scene.matrix.premultiply(cachedTransform);
         scene.matrix.decompose(scene.position, scene.quaternion, scene.scale);
         scene.traverse(function (c) {
@@ -48229,7 +48228,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

File diff suppressed because it is too large
+ 1 - 1
example/bundle/offscreenShadows.ce0529e7.js.map


+ 1 - 1
example/bundle/offscreenShadows.js

@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

+ 1 - 2
example/bundle/pntsExample.1cabf3ff.js

@@ -43282,7 +43282,6 @@ function (_TilesRendererBase) {
             break;
         }
 
-        scene.updateMatrix();
         scene.matrix.premultiply(cachedTransform);
         scene.matrix.decompose(scene.position, scene.quaternion, scene.scale);
         scene.traverse(function (c) {
@@ -45070,7 +45069,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

File diff suppressed because it is too large
+ 1 - 1
example/bundle/pntsExample.1cabf3ff.js.map


+ 1 - 1
example/bundle/pntsExample.js

@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
 if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
   var hostname = "" || location.hostname;
   var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
-  var ws = new WebSocket(protocol + '://' + hostname + ':' + "57896" + '/');
+  var ws = new WebSocket(protocol + '://' + hostname + ':' + "62977" + '/');
 
   ws.onmessage = function (event) {
     checkedAssets = {};

+ 5 - 5
example/index.js

@@ -86,17 +86,17 @@ function reinstantiateTiles() {
 
 	}
 
+	// Note the DRACO compression files need to be supplied via an explicit source.
+	// We use unpkg here but in practice should be provided by the application.
+	const dracoLoader = new DRACOLoader();
+	dracoLoader.setDecoderPath( 'https://unpkg.com/three@0.116.1/examples/js/libs/draco/gltf/' );
+
 	tiles = new TilesRenderer( url );
 	tiles.fetchOptions.mode = 'cors';
 	tiles.manager.addHandler( /\.gltf$/, {
 
 		parse( ...args ) {
 
-			// Note the DRACO compression files need to be supplied via an explicit source.
-			// We use unpkg here but in practice should be provided by the application.
-			const dracoLoader = new DRACOLoader();
-			dracoLoader.setDecoderPath( 'https://unpkg.com/three@0.116.1/examples/js/libs/draco/gltf/' );
-
 			const loader = new GLTFLoader( tiles.manager );
 			loader.setDRACOLoader( dracoLoader );
 			return loader.parse( ...args );

+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "3d-tiles-renderer",
-  "version": "0.2.0",
+  "version": "0.2.2",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "3d-tiles-renderer",
-  "version": "0.2.0",
+  "version": "0.2.2",
   "description": "https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification",
   "keywords": [
     "3d-tiles",

+ 0 - 1
src/three/TilesRenderer.js

@@ -596,7 +596,6 @@ export class TilesRenderer extends TilesRendererBase {
 
 			}
 
-			//scene.updateMatrix();
 			scene.matrix.premultiply( cachedTransform );
 			scene.matrix.decompose( scene.position, scene.quaternion, scene.scale );
 			scene.traverse( c => {