@threepipe/plugin-3d-tiles-renderer 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/TilesRendererPlugin.d.ts +1 -1
- package/dist/TilesRendererPlugin.d.ts.map +1 -1
- package/dist/index.js +63 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -55
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/TilesRendererPlugin.ts +6 -1
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
ImportAddOptions,
|
|
18
18
|
LoadingManager,
|
|
19
19
|
ThreeViewer, Sphere, uiButton,
|
|
20
|
+
uiFolderContainer, DropzonePlugin,
|
|
20
21
|
} from 'threepipe'
|
|
21
22
|
import {TilesGroup, TilesRenderer} from '3d-tiles-renderer'
|
|
22
23
|
import {gltfCesiumRTCExtension, gltfMeshFeaturesExtension, gltfStructuralMetadataExtension} from './gltf'
|
|
@@ -35,6 +36,7 @@ export interface TilesRendererPluginEventMap extends AViewerPluginEventMap {
|
|
|
35
36
|
*
|
|
36
37
|
* Specification - https://www.ogc.org/standards/3dtiles/
|
|
37
38
|
*/
|
|
39
|
+
@uiFolderContainer('3D Tiles')
|
|
38
40
|
export class TilesRendererPlugin extends AViewerPluginSync<TilesRendererPluginEventMap> {
|
|
39
41
|
public static readonly PluginType: string = 'TilesRendererPlugin'
|
|
40
42
|
enabled = true
|
|
@@ -65,6 +67,8 @@ export class TilesRendererPlugin extends AViewerPluginSync<TilesRendererPluginEv
|
|
|
65
67
|
...options,
|
|
66
68
|
fileExtension: TilesRendererPlugin.DUMMY_EXT,
|
|
67
69
|
fileHandler: importer,
|
|
70
|
+
}).finally(() => {
|
|
71
|
+
this._viewer?.assetManager.importer.unregisterFile(temp)
|
|
68
72
|
})
|
|
69
73
|
}
|
|
70
74
|
|
|
@@ -201,7 +205,8 @@ export class TilesRendererPlugin extends AViewerPluginSync<TilesRendererPluginEv
|
|
|
201
205
|
async promptForURL() {
|
|
202
206
|
const url = await this._viewer?.dialog.prompt('TilesRendererPlugin: Enter URL for the root tileset', '', true)
|
|
203
207
|
if (!url) return
|
|
204
|
-
|
|
208
|
+
const loader = this._viewer?.getPlugin(DropzonePlugin) ?? this._viewer ?? this
|
|
209
|
+
return await loader.load(url, {fileExtension: TilesRendererPlugin.DUMMY_EXT})
|
|
205
210
|
}
|
|
206
211
|
}
|
|
207
212
|
|