Forráskód Böngészése

Merge branch 'master' of github.com:NASA-AMMOS/3DTilesRendererJS into master

Garrett Johnson 4 éve
szülő
commit
d462193f7d
1 módosított fájl, 5 hozzáadás és 5 törlés
  1. 5 5
      README.md

+ 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.
 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
 ```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' );
 const tilesRenderer = new TilesRenderer( './path/to/tileset.json' );
 tilesRenderer.manager.addHandler( /\.gltf$/, {
 tilesRenderer.manager.addHandler( /\.gltf$/, {
 
 
 	parse( ...args ) {
 	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 );
 		const loader = new GLTFLoader( tiles.manager );
 		loader.setDRACOLoader( dracoLoader );
 		loader.setDRACOLoader( dracoLoader );
 		return loader.parse( ...args );
 		return loader.parse( ...args );