瀏覽代碼

fix example

Garrett Johnson 4 年之前
父節點
當前提交
b33fef00d0
共有 3 個文件被更改,包括 4 次插入3 次删除
  1. 1 1
      example/bundle/example.e31bb0bc.js
  2. 1 1
      example/bundle/example.e31bb0bc.js.map
  3. 2 1
      example/index.js

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


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


+ 2 - 1
example/index.js

@@ -86,6 +86,8 @@ function reinstantiateTiles() {
 
 	}
 
+	tiles = new TilesRenderer( url );
+
 	// 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();
@@ -94,7 +96,6 @@ function reinstantiateTiles() {
 	const loader = new GLTFLoader( tiles.manager );
 	loader.setDRACOLoader( dracoLoader );
 
-	tiles = new TilesRenderer( url );
 	tiles.fetchOptions.mode = 'cors';
 	tiles.manager.addHandler( /\.gltf$/, loader );
 	offsetParent.add( tiles.group );