@threepipe/plugin-3d-tiles-renderer 0.3.2 → 0.3.3
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/CHANGELOG.md +11 -2
- package/README.md +1 -1
- package/dist/B3DMLoadPlugin.d.ts +3 -2
- package/dist/B3DMLoadPlugin.d.ts.map +1 -1
- package/dist/CMPTLoadPlugin.d.ts +2 -1
- package/dist/CMPTLoadPlugin.d.ts.map +1 -1
- package/dist/DeepZoomImageLoadPlugin.d.ts +2 -2
- package/dist/DeepZoomImageLoadPlugin.d.ts.map +1 -1
- package/dist/I3DMLoadPlugin.d.ts +2 -1
- package/dist/I3DMLoadPlugin.d.ts.map +1 -1
- package/dist/PNTSLoadPlugin.d.ts +2 -1
- package/dist/PNTSLoadPlugin.d.ts.map +1 -1
- package/dist/SlippyMapTilesLoadPlugin.d.ts +2 -2
- package/dist/SlippyMapTilesLoadPlugin.d.ts.map +1 -1
- package/dist/dependencies.txt +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +57 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -83
- package/dist/index.mjs.map +1 -1
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +3 -3
- package/docs/classes/B3DMLoadPlugin.html +2 -2
- package/docs/classes/CMPTLoadPlugin.html +2 -2
- package/docs/classes/DeepZoomImageLoadPlugin.html +2 -2
- package/docs/classes/EnvironmentControls2.html +2 -2
- package/docs/classes/EnvironmentControlsPlugin.html +4 -3
- package/docs/classes/GlobeControls2.html +2 -2
- package/docs/classes/GlobeControlsPlugin.html +4 -3
- package/docs/classes/I3DMLoadPlugin.html +2 -2
- package/docs/classes/PNTSLoadPlugin.html +2 -2
- package/docs/classes/SlippyMapTilesLoadPlugin.html +2 -2
- package/docs/classes/TilesRendererLoader.html +2 -2
- package/docs/classes/TilesRendererPlugin.html +3 -2
- package/docs/index.html +1 -1
- package/docs/interfaces/TilesImportOptions.html +3 -3
- package/docs/types/TilesRendererGroup.html +1 -1
- package/package.json +8 -2
- package/src/B3DMLoadPlugin.ts +4 -2
- package/src/CMPTLoadPlugin.ts +3 -1
- package/src/DeepZoomImageLoadPlugin.ts +1 -1
- package/src/I3DMLoadPlugin.ts +3 -1
- package/src/PNTSLoadPlugin.ts +3 -1
- package/src/SlippyMapTilesLoadPlugin.ts +1 -1
- package/src/TilesRendererPlugin.ts +1 -1
- package/tsconfig.json +1 -0
- package/docs/.nojekyll +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Changelog for @threepipe/3d-tiles-renderer
|
|
1
|
+
# Changelog for @threepipe/plugin-3d-tiles-renderer
|
|
2
2
|
|
|
3
3
|
All notable changes to this plugin will be documented in this file.
|
|
4
4
|
|
|
@@ -10,6 +10,14 @@ All notable changes to this plugin will be documented in this file.
|
|
|
10
10
|
|
|
11
11
|
- NA
|
|
12
12
|
|
|
13
|
+
## [0.3.3] - 2026-10-23
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- `3d-tiles-renderer` (`^0.4.9`, bundled) is an optional `peerDependency`: install it for full types with `skipLibCheck: false`; the declarations import only paths its `exports` map allows, and `DeepZoomImageLoadPlugin` / `SlippyMapTilesLoadPlugin` now augment `TilesImportOptions` ([#60](https://github.com/repalash/threepipe/pull/60))
|
|
18
|
+
- Type declarations resolve in consumer projects with `moduleResolution: bundler`, `node16` and `nodenext` ([#60](https://github.com/repalash/threepipe/pull/60)): the `.d.ts` files imported `three/examples/jsm/loaders/GLTFLoader` without `.js`; relative imports carry `.js`
|
|
19
|
+
- Guard the `setDirty` call in the `load-content`, `load-tile-set` and `needs-update` handlers of `TilesRendererLoader`, so a handler that runs while the tileset group has no `setDirty` does not throw
|
|
20
|
+
|
|
13
21
|
## [0.3.2] - 2025-09-03
|
|
14
22
|
|
|
15
23
|
### Changed
|
|
@@ -17,4 +25,5 @@ All notable changes to this plugin will be documented in this file.
|
|
|
17
25
|
- Update [threepipe](https://threepipe.org/) `peerDependency` to [0.1.0](https://github.com/repalash/threepipe/releases/tag/v0.1.0)
|
|
18
26
|
|
|
19
27
|
[unreleased]: https://github.com/repalash/threepipe/tree/dev/plugins/3d-tiles-renderer
|
|
20
|
-
[0.3.
|
|
28
|
+
[0.3.3]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugin-3d-tiles-renderer-0.3.3
|
|
29
|
+
[0.3.2]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugin-3d-tiles-renderer-0.3.2
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @threepipe/3d-tiles-renderer
|
|
1
|
+
# @threepipe/plugin-3d-tiles-renderer
|
|
2
2
|
|
|
3
3
|
[3d-tiles-renderer](https://github.com/NASA-AMMOS/3DTilesRendererJS) integration and plugin for [threepipe](https://threepipe.org/) to import and render [OGC Tiles](https://www.ogc.org/standards/3dtiles/).
|
|
4
4
|
|
package/dist/B3DMLoadPlugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseImporterPlugin, GLTFLoader2, IAssetImporter, ILoader, ImportAddOptions, Importer, LoadingManager, ThreeViewer } from 'threepipe';
|
|
2
|
-
import { B3DMResult } from '3d-tiles-renderer/src/three/loaders/B3DMLoader';
|
|
3
2
|
import { B3DMLoader, B3DMScene } from '3d-tiles-renderer';
|
|
4
|
-
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
3
|
+
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
4
|
+
type B3DMResult = Awaited<ReturnType<B3DMLoader['parse']>>;
|
|
5
5
|
/**
|
|
6
6
|
* Adds support for loading .b3dm files and data uris.
|
|
7
7
|
* Batched 3D Model (b3dm) file format is part of OGC 3D Tiles.
|
|
@@ -19,4 +19,5 @@ export declare class B3DMLoader2 extends GLTFLoader2 implements ILoader<B3DMResu
|
|
|
19
19
|
transform(res: B3DMResult, options: ImportAddOptions): B3DMScene;
|
|
20
20
|
parse(data: ArrayBuffer, _path: string, onLoad: (gltf: GLTF) => void, onError?: (event: ErrorEvent) => void, _url?: string): void;
|
|
21
21
|
}
|
|
22
|
+
export {};
|
|
22
23
|
//# sourceMappingURL=B3DMLoadPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"B3DMLoadPlugin.d.ts","sourceRoot":"","sources":["../src/B3DMLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAElB,WAAW,EACX,cAAc,EACd,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EACR,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"B3DMLoadPlugin.d.ts","sourceRoot":"","sources":["../src/B3DMLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAElB,WAAW,EACX,cAAc,EACd,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EACR,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AAGnE,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAC1D,OAAO,EAAC,IAAI,EAAC,MAAM,0CAA0C,CAAA;AAE7D;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,gBAAuB,UAAU,oBAAmB;IACpD,SAAS,CAAC,SAAS,wBAA6D;IAEhF,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAGD,qBAAa,WAAY,SAAQ,WAAY,YAAW,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC;IAClF,MAAM,aAAA;IACN,EAAE,CAAC,EAAE,cAAc,CAAA;gBAEP,OAAO,EAAE,cAAc;IAKnC,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS;IAIhE,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM;CAiB7H"}
|
package/dist/CMPTLoadPlugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyOptions, BaseImporterPlugin, Group, IAssetImporter, ILoader, Importer, Loader, LoadingManager, ThreeViewer } from 'threepipe';
|
|
2
|
-
import { CMPTResult } from '3d-tiles-renderer/src/three/loaders/CMPTLoader';
|
|
3
2
|
import { CMPTLoader } from '3d-tiles-renderer';
|
|
3
|
+
type CMPTResult = Awaited<ReturnType<CMPTLoader['parse']>>;
|
|
4
4
|
/**
|
|
5
5
|
* Adds support for loading .cmpt files and data uris.
|
|
6
6
|
* Composite (cmpt) file format is part of OGC 3D Tiles.
|
|
@@ -19,4 +19,5 @@ export declare class CMPTLoader2 extends Loader implements ILoader<CMPTResult, G
|
|
|
19
19
|
transform(res: CMPTResult, _options: AnyOptions): Group;
|
|
20
20
|
parse(data: ArrayBuffer, _path: string, onLoad: (res: CMPTResult) => void, onError?: (event: ErrorEvent) => void, _url?: string): void;
|
|
21
21
|
}
|
|
22
|
+
export {};
|
|
22
23
|
//# sourceMappingURL=CMPTLoadPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CMPTLoadPlugin.d.ts","sourceRoot":"","sources":["../src/CMPTLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,KAAK,EACL,cAAc,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EAEN,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"CMPTLoadPlugin.d.ts","sourceRoot":"","sources":["../src/CMPTLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,KAAK,EACL,cAAc,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EAEN,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAC,UAAU,EAAa,MAAM,mBAAmB,CAAA;AAGxD,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAE1D;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,gBAAuB,UAAU,oBAAmB;IACpD,SAAS,CAAC,SAAS,wBAA6D;IAEhF,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAED,qBAAa,WAAY,SAAQ,MAAO,YAAW,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;IACzE,MAAM,aAAA;IACN,EAAE,CAAC,EAAE,cAAc,CAAA;gBAEP,OAAO,EAAE,cAAc;IAMnC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI;IAwEhI,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,GAAG,KAAK;IAIvD,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM;CAuBlI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseImporterPlugin, Importer, LoadingManager, ThreeViewer } from 'threepipe';
|
|
2
|
-
import { TilesRendererLoader, TilesRendererPlugin } from './TilesRendererPlugin';
|
|
2
|
+
import { TilesRendererLoader, TilesRendererPlugin } from './TilesRendererPlugin.js';
|
|
3
3
|
/**
|
|
4
4
|
* Adds support for loading .dzi files and data uris.
|
|
5
5
|
* Deep Zoom Image (dzi) file format - https://openseadragon.github.io/
|
|
@@ -13,7 +13,7 @@ export declare class DeepZoomImageLoadPlugin extends BaseImporterPlugin {
|
|
|
13
13
|
export declare class DeepZoomImageLoader extends TilesRendererLoader {
|
|
14
14
|
constructor(manager: LoadingManager);
|
|
15
15
|
}
|
|
16
|
-
declare module 'TilesRendererPlugin' {
|
|
16
|
+
declare module './TilesRendererPlugin.js' {
|
|
17
17
|
interface TilesImportOptions {
|
|
18
18
|
DeepZoomImagePlugin?: boolean | {
|
|
19
19
|
center?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeepZoomImageLoadPlugin.d.ts","sourceRoot":"","sources":["../src/DeepZoomImageLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,WAAW,CAAA;AAGnF,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAE9E;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,kBAAkB;IAC3D,gBAAuB,UAAU,6BAA4B;IAC7D,SAAS,CAAC,SAAS,gCAAmE;IAEtF,YAAY,iCAAwB;IAEpC,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAED,qBAAa,mBAAoB,SAAQ,mBAAmB;gBAC5C,OAAO,EAAE,cAAc;CAatC;AAED,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"DeepZoomImageLoadPlugin.d.ts","sourceRoot":"","sources":["../src/DeepZoomImageLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,WAAW,CAAA;AAGnF,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAE9E;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,kBAAkB;IAC3D,gBAAuB,UAAU,6BAA4B;IAC7D,SAAS,CAAC,SAAS,gCAAmE;IAEtF,YAAY,iCAAwB;IAEpC,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAED,qBAAa,mBAAoB,SAAQ,mBAAmB;gBAC5C,OAAO,EAAE,cAAc;CAatC;AAED,OAAO,QAAQ,uBAAuB,CAAA;IAClC,UAAU,kBAAkB;QACxB,mBAAmB,CAAC,EAAE,OAAO,GAAG;YAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;YACjB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,sBAAsB,CAAC,EAAE,OAAO,CAAC;SACpC,CAAA;KACJ;CACJ"}
|
package/dist/I3DMLoadPlugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseImporterPlugin, GLTF, GLTFLoader2, IAssetImporter, ILoader, ImportAddOptions, Importer, LoadingManager, ThreeViewer } from 'threepipe';
|
|
2
|
-
import { I3DMResult } from '3d-tiles-renderer/src/three/loaders/I3DMLoader';
|
|
3
2
|
import { I3DMLoader, I3DMScene } from '3d-tiles-renderer';
|
|
3
|
+
type I3DMResult = Awaited<ReturnType<I3DMLoader['parse']>>;
|
|
4
4
|
/**
|
|
5
5
|
* Adds support for loading .i3dm files and data uris.
|
|
6
6
|
* Instanced 3D Model (i3dm) file format is part of OGC 3D Tiles.
|
|
@@ -18,4 +18,5 @@ export declare class I3DMLoader2 extends GLTFLoader2 implements ILoader<I3DMResu
|
|
|
18
18
|
transform(res: I3DMResult, options: ImportAddOptions): I3DMScene;
|
|
19
19
|
parse(data: ArrayBuffer, _path: string, onLoad: (gltf: GLTF) => void, onError?: (event: ErrorEvent) => void, _url?: string): void;
|
|
20
20
|
}
|
|
21
|
+
export {};
|
|
21
22
|
//# sourceMappingURL=I3DMLoadPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I3DMLoadPlugin.d.ts","sourceRoot":"","sources":["../src/I3DMLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAElB,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"I3DMLoadPlugin.d.ts","sourceRoot":"","sources":["../src/I3DMLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAElB,IAAI,EACJ,WAAW,EACX,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AAGnE,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAE1D;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,gBAAuB,UAAU,oBAAmB;IACpD,SAAS,CAAC,SAAS,wBAA6D;IAEhF,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAGD,qBAAa,WAAY,SAAQ,WAAY,YAAW,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC;IAClF,MAAM,aAAA;IACN,EAAE,CAAC,EAAE,cAAc,CAAA;gBAEP,OAAO,EAAE,cAAc;IAKnC,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS;IAIhE,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM;CAiB7H"}
|
package/dist/PNTSLoadPlugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyOptions, BaseImporterPlugin, IAssetImporter, ILoader, Importer, Loader, LoadingManager, ThreeViewer } from 'threepipe';
|
|
2
|
-
import { PNTSResult } from '3d-tiles-renderer/src/three/loaders/PNTSLoader';
|
|
3
2
|
import { PNTSLoader, PNTSScene } from '3d-tiles-renderer';
|
|
3
|
+
type PNTSResult = Awaited<ReturnType<PNTSLoader['parse']>>;
|
|
4
4
|
/**
|
|
5
5
|
* Adds support for loading .pnts files and data uris.
|
|
6
6
|
* Point Cloud (pnts) file format is part of OGC 3D Tiles.
|
|
@@ -19,4 +19,5 @@ export declare class PNTSLoader2 extends Loader implements ILoader<PNTSResult, P
|
|
|
19
19
|
transform(res: PNTSResult, _options: AnyOptions): PNTSScene;
|
|
20
20
|
parse(data: ArrayBuffer, _path: string, onLoad: (res: PNTSResult) => void, onError?: (event: ErrorEvent) => void, _url?: string): void;
|
|
21
21
|
}
|
|
22
|
+
export {};
|
|
22
23
|
//# sourceMappingURL=PNTSLoadPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PNTSLoadPlugin.d.ts","sourceRoot":"","sources":["../src/PNTSLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,cAAc,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EAEN,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"PNTSLoadPlugin.d.ts","sourceRoot":"","sources":["../src/PNTSLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,cAAc,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EAEN,cAAc,EACd,WAAW,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAa,UAAU,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAA;AAGnE,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAE1D;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IAClD,gBAAuB,UAAU,oBAAmB;IACpD,SAAS,CAAC,SAAS,wBAA6D;IAEhF,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAED,qBAAa,WAAY,SAAQ,MAAO,YAAW,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC;IAC7E,MAAM,aAAA;IACN,EAAE,CAAC,EAAE,cAAc,CAAA;gBAEP,OAAO,EAAE,cAAc;IAKnC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI;IAwEhI,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,GAAG,SAAS;IAI3D,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM;CAkBlI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseImporterPlugin, Importer, LoadingManager, ThreeViewer } from 'threepipe';
|
|
2
|
-
import { TilesRendererLoader, TilesRendererPlugin } from './TilesRendererPlugin';
|
|
2
|
+
import { TilesRendererLoader, TilesRendererPlugin } from './TilesRendererPlugin.js';
|
|
3
3
|
/**
|
|
4
4
|
* Adds support for loading slippy map tiles(OpenStreetMap) in png format
|
|
5
5
|
* https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
|
|
@@ -14,7 +14,7 @@ export declare class SlippyMapTilesLoadPlugin extends BaseImporterPlugin {
|
|
|
14
14
|
export declare class SlippyMapTilesLoader extends TilesRendererLoader {
|
|
15
15
|
constructor(manager: LoadingManager);
|
|
16
16
|
}
|
|
17
|
-
declare module 'TilesRendererPlugin' {
|
|
17
|
+
declare module './TilesRendererPlugin.js' {
|
|
18
18
|
interface TilesImportOptions {
|
|
19
19
|
XYZTilesPlugin?: boolean | {
|
|
20
20
|
levels: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlippyMapTilesLoadPlugin.d.ts","sourceRoot":"","sources":["../src/SlippyMapTilesLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,WAAW,CAAA;AAGnF,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAE9E;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,kBAAkB;IAC5D,gBAAuB,UAAU,8BAA6B;IAC9D,MAAM,CAAC,QAAQ,CAAC,SAAS,cAAa;IACtC,SAAS,CAAC,SAAS,iCAAsF;IAEzG,YAAY,iCAAwB;IAEpC,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAED,qBAAa,oBAAqB,SAAQ,mBAAmB;gBAC7C,OAAO,EAAE,cAAc;CAUtC;AAED,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"SlippyMapTilesLoadPlugin.d.ts","sourceRoot":"","sources":["../src/SlippyMapTilesLoadPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,WAAW,CAAA;AAGnF,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAE9E;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,kBAAkB;IAC5D,gBAAuB,UAAU,8BAA6B;IAC9D,MAAM,CAAC,QAAQ,CAAC,SAAS,cAAa;IACtC,SAAS,CAAC,SAAS,iCAAsF;IAEzG,YAAY,iCAAwB;IAEpC,OAAO,CAAC,MAAM,EAAE,WAAW;CAO9B;AAED,qBAAa,oBAAqB,SAAQ,mBAAmB;gBAC7C,OAAO,EAAE,cAAc;CAUtC;AAED,OAAO,QAAQ,uBAAuB,CAAA;IAClC,UAAU,kBAAkB;QACxB,cAAc,CAAC,EAAE,OAAO,GAAG;YACvB,MAAM,EAAE,MAAM,CAAA;YACd,aAAa,EAAE,MAAM,CAAA;YACrB,SAAS,EAAE,MAAM,CAAA;YACjB,MAAM,CAAC,EAAE,OAAO,CAAC;YACjB,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;YACpC,sBAAsB,CAAC,EAAE,OAAO,CAAC;SACpC,CAAA;KACJ;CACJ"}
|
package/dist/dependencies.txt
CHANGED
|
@@ -6,7 +6,7 @@ Description: https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/speci
|
|
|
6
6
|
Repository: git+https://github.com/NASA-AMMOS/3DTilesRendererJS.git
|
|
7
7
|
Homepage: https://github.com/NASA-AMMOS/3DTilesRendererJS#readme
|
|
8
8
|
Author: Garrett Johnson <garrett.kjohnson@gmail.com>
|
|
9
|
-
License
|
|
9
|
+
License Text:
|
|
10
10
|
===
|
|
11
11
|
|
|
12
12
|
Apache License
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { TilesRendererPlugin, TilesRendererLoader, type TilesRendererGroup, type TilesImportOptions } from './TilesRendererPlugin';
|
|
2
|
-
export { B3DMLoadPlugin } from './B3DMLoadPlugin';
|
|
3
|
-
export { I3DMLoadPlugin } from './I3DMLoadPlugin';
|
|
4
|
-
export { PNTSLoadPlugin } from './PNTSLoadPlugin';
|
|
5
|
-
export { CMPTLoadPlugin } from './CMPTLoadPlugin';
|
|
6
|
-
export { DeepZoomImageLoadPlugin } from './DeepZoomImageLoadPlugin';
|
|
7
|
-
export { SlippyMapTilesLoadPlugin } from './SlippyMapTilesLoadPlugin';
|
|
8
|
-
export { EnvironmentControlsPlugin, EnvironmentControls2 } from './EnvironmentControlsPlugin';
|
|
9
|
-
export { GlobeControlsPlugin, GlobeControls2 } from './GlobeControlsPlugin';
|
|
1
|
+
export { TilesRendererPlugin, TilesRendererLoader, type TilesRendererGroup, type TilesImportOptions } from './TilesRendererPlugin.js';
|
|
2
|
+
export { B3DMLoadPlugin } from './B3DMLoadPlugin.js';
|
|
3
|
+
export { I3DMLoadPlugin } from './I3DMLoadPlugin.js';
|
|
4
|
+
export { PNTSLoadPlugin } from './PNTSLoadPlugin.js';
|
|
5
|
+
export { CMPTLoadPlugin } from './CMPTLoadPlugin.js';
|
|
6
|
+
export { DeepZoomImageLoadPlugin } from './DeepZoomImageLoadPlugin.js';
|
|
7
|
+
export { SlippyMapTilesLoadPlugin } from './SlippyMapTilesLoadPlugin.js';
|
|
8
|
+
export { EnvironmentControlsPlugin, EnvironmentControls2 } from './EnvironmentControlsPlugin.js';
|
|
9
|
+
export { GlobeControlsPlugin, GlobeControls2 } from './GlobeControlsPlugin.js';
|
|
10
10
|
export { CesiumIonAuthPlugin, ReorientationPlugin, DebugTilesPlugin, GoogleCloudAuthPlugin, LoadRegionPlugin, UnloadTilesPlugin, TileCompressionPlugin, } from '3d-tiles-renderer/plugins';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("threepipe")) : typeof define === "function" && define.amd ? define(["exports", "threepipe"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["@threepipe/plugin-3d-tiles-renderer"] = {}, global.threepipe));
|
|
3
|
-
})(this, function(exports2, THREE) {
|
|
4
|
-
"use strict"
|
|
5
|
-
* @license
|
|
6
|
-
* @threepipe/plugin-3d-tiles-renderer v0.3.2
|
|
7
|
-
* Copyright 2022-2025 repalash <palash@shaders.app>
|
|
8
|
-
* Apache-2.0 License
|
|
9
|
-
* See ./dependencies.txt for any bundled third-party dependencies and licenses.
|
|
10
|
-
*/
|
|
11
|
-
|
|
3
|
+
})(this, (function(exports2, THREE) {
|
|
4
|
+
"use strict";
|
|
12
5
|
function _interopNamespaceDefault(e) {
|
|
13
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
14
7
|
if (e) {
|
|
@@ -633,7 +626,7 @@
|
|
|
633
626
|
}
|
|
634
627
|
};
|
|
635
628
|
}
|
|
636
|
-
const PLUGIN_REGISTERED = Symbol("PLUGIN_REGISTERED");
|
|
629
|
+
const PLUGIN_REGISTERED = /* @__PURE__ */ Symbol("PLUGIN_REGISTERED");
|
|
637
630
|
const priorityCallback = (a, b) => {
|
|
638
631
|
if (a.__depthFromRenderedParent !== b.__depthFromRenderedParent) {
|
|
639
632
|
return a.__depthFromRenderedParent > b.__depthFromRenderedParent ? -1 : 1;
|
|
@@ -899,7 +892,6 @@
|
|
|
899
892
|
}
|
|
900
893
|
}
|
|
901
894
|
preprocessNode(tile, tileSetDir, parentTile = null) {
|
|
902
|
-
var _a;
|
|
903
895
|
if (tile.content) {
|
|
904
896
|
if (!("uri" in tile.content) && "url" in tile.content) {
|
|
905
897
|
tile.content.uri = tile.content.url;
|
|
@@ -911,7 +903,7 @@
|
|
|
911
903
|
}
|
|
912
904
|
tile.parent = parentTile;
|
|
913
905
|
tile.children = tile.children || [];
|
|
914
|
-
if (
|
|
906
|
+
if (tile.content?.uri) {
|
|
915
907
|
const extension = getUrlExtension(tile.content.uri);
|
|
916
908
|
tile.__hasContent = true;
|
|
917
909
|
tile.__hasUnrenderableContent = Boolean(extension && /json$/.test(extension));
|
|
@@ -2917,7 +2909,7 @@
|
|
|
2917
2909
|
}
|
|
2918
2910
|
const _mat = new THREE.Matrix4();
|
|
2919
2911
|
const _euler = new THREE.Euler();
|
|
2920
|
-
const INITIAL_FRUSTUM_CULLED = Symbol("INITIAL_FRUSTUM_CULLED");
|
|
2912
|
+
const INITIAL_FRUSTUM_CULLED = /* @__PURE__ */ Symbol("INITIAL_FRUSTUM_CULLED");
|
|
2921
2913
|
const tempMat = new THREE.Matrix4();
|
|
2922
2914
|
const tempVector = new THREE.Vector3();
|
|
2923
2915
|
const tempVector2 = new THREE.Vector2();
|
|
@@ -5192,10 +5184,10 @@
|
|
|
5192
5184
|
return this._tokenRefreshPromise;
|
|
5193
5185
|
}
|
|
5194
5186
|
}
|
|
5195
|
-
const TILE_X$1 = Symbol("TILE_X");
|
|
5196
|
-
const TILE_Y$1 = Symbol("TILE_Y");
|
|
5197
|
-
const TILE_LEVEL$1 = Symbol("TILE_LEVEL");
|
|
5198
|
-
const UV_BOUNDS = Symbol("UV_BOUNDS");
|
|
5187
|
+
const TILE_X$1 = /* @__PURE__ */ Symbol("TILE_X");
|
|
5188
|
+
const TILE_Y$1 = /* @__PURE__ */ Symbol("TILE_Y");
|
|
5189
|
+
const TILE_LEVEL$1 = /* @__PURE__ */ Symbol("TILE_LEVEL");
|
|
5190
|
+
const UV_BOUNDS = /* @__PURE__ */ Symbol("UV_BOUNDS");
|
|
5199
5191
|
class ImageFormatPlugin {
|
|
5200
5192
|
get maxLevel() {
|
|
5201
5193
|
return this.levels - 1;
|
|
@@ -6093,9 +6085,9 @@
|
|
|
6093
6085
|
}
|
|
6094
6086
|
}
|
|
6095
6087
|
}
|
|
6096
|
-
const TILE_X = Symbol("TILE_X");
|
|
6097
|
-
const TILE_Y = Symbol("TILE_Y");
|
|
6098
|
-
const TILE_LEVEL = Symbol("TILE_LEVEL");
|
|
6088
|
+
const TILE_X = /* @__PURE__ */ Symbol("TILE_X");
|
|
6089
|
+
const TILE_Y = /* @__PURE__ */ Symbol("TILE_Y");
|
|
6090
|
+
const TILE_LEVEL = /* @__PURE__ */ Symbol("TILE_LEVEL");
|
|
6099
6091
|
const INITIAL_HEIGHT_RANGE = 1e5;
|
|
6100
6092
|
const _vec$1 = /* @__PURE__ */ new THREE.Vector3();
|
|
6101
6093
|
function isAvailable(layer, level, x, y) {
|
|
@@ -7059,7 +7051,7 @@
|
|
|
7059
7051
|
class PropertyAttributeClassProperty extends ClassProperty {
|
|
7060
7052
|
constructor(enums, classProperty, attributeProperty = null) {
|
|
7061
7053
|
super(enums, classProperty, attributeProperty);
|
|
7062
|
-
this.attribute =
|
|
7054
|
+
this.attribute = attributeProperty?.attribute ?? null;
|
|
7063
7055
|
}
|
|
7064
7056
|
}
|
|
7065
7057
|
class PropertyAttributeAccessor extends PropertySetAccessor {
|
|
@@ -7110,7 +7102,7 @@
|
|
|
7110
7102
|
class PropertyTableClassProperty extends ClassProperty {
|
|
7111
7103
|
constructor(enums, classProperty, tableProperty = null) {
|
|
7112
7104
|
super(enums, classProperty, tableProperty);
|
|
7113
|
-
this.values =
|
|
7105
|
+
this.values = tableProperty?.values ?? null;
|
|
7114
7106
|
this.valueLength = typeToComponentCount(this.type);
|
|
7115
7107
|
this.arrayOffsets = getField(tableProperty, "arrayOffsets", null);
|
|
7116
7108
|
this.stringOffsets = getField(tableProperty, "stringOffsets", null);
|
|
@@ -7584,8 +7576,7 @@
|
|
|
7584
7576
|
}
|
|
7585
7577
|
const EXT_NAME$1 = "EXT_structural_metadata";
|
|
7586
7578
|
function getRelevantTextures(parser, propertyTextures = []) {
|
|
7587
|
-
|
|
7588
|
-
const textureCount = ((_a = parser.json.textures) == null ? void 0 : _a.length) || 0;
|
|
7579
|
+
const textureCount = parser.json.textures?.length || 0;
|
|
7589
7580
|
const result = new Array(textureCount).fill(null);
|
|
7590
7581
|
propertyTextures.forEach(({ properties }) => {
|
|
7591
7582
|
for (const key in properties) {
|
|
@@ -7598,8 +7589,7 @@
|
|
|
7598
7589
|
return Promise.all(result);
|
|
7599
7590
|
}
|
|
7600
7591
|
function getRelevantBuffers(parser, propertyTables = []) {
|
|
7601
|
-
|
|
7602
|
-
const textureCount = ((_a = parser.json.bufferViews) == null ? void 0 : _a.length) || 0;
|
|
7592
|
+
const textureCount = parser.json.bufferViews?.length || 0;
|
|
7603
7593
|
const result = new Array(textureCount).fill(null);
|
|
7604
7594
|
propertyTables.forEach(({ properties }) => {
|
|
7605
7595
|
for (const key in properties) {
|
|
@@ -7648,10 +7638,9 @@
|
|
|
7648
7638
|
const rootMetadata = new StructuralMetadata(rootExtension, textures, buffers);
|
|
7649
7639
|
scene.userData.structuralMetadata = rootMetadata;
|
|
7650
7640
|
scene.traverse((child) => {
|
|
7651
|
-
var _a;
|
|
7652
7641
|
if (parser.associations.has(child)) {
|
|
7653
7642
|
const { meshes, primitives } = parser.associations.get(child);
|
|
7654
|
-
const primitive =
|
|
7643
|
+
const primitive = parser.json.meshes[meshes]?.primitives[primitives];
|
|
7655
7644
|
if (primitive && primitive.extensions && primitive.extensions[EXT_NAME$1]) {
|
|
7656
7645
|
const extension = primitive.extensions[EXT_NAME$1];
|
|
7657
7646
|
child.userData.structuralMetadata = new StructuralMetadata(rootExtension, textures, buffers, extension, child);
|
|
@@ -7786,10 +7775,9 @@
|
|
|
7786
7775
|
const EXT_NAME = "EXT_mesh_features";
|
|
7787
7776
|
function forEachPrimitiveExtension(scene, parser, callback) {
|
|
7788
7777
|
scene.traverse((c) => {
|
|
7789
|
-
var _a;
|
|
7790
7778
|
if (parser.associations.has(c)) {
|
|
7791
7779
|
const { meshes, primitives } = parser.associations.get(c);
|
|
7792
|
-
const primitive =
|
|
7780
|
+
const primitive = parser.json.meshes[meshes]?.primitives[primitives];
|
|
7793
7781
|
if (primitive && primitive.extensions && primitive.extensions[EXT_NAME]) {
|
|
7794
7782
|
callback(c, primitive.extensions[EXT_NAME]);
|
|
7795
7783
|
}
|
|
@@ -7802,12 +7790,11 @@
|
|
|
7802
7790
|
this.name = EXT_NAME;
|
|
7803
7791
|
}
|
|
7804
7792
|
async afterRoot({ scene, parser }) {
|
|
7805
|
-
var _a;
|
|
7806
7793
|
const extensionsUsed = parser.json.extensionsUsed;
|
|
7807
7794
|
if (!extensionsUsed || !extensionsUsed.includes(EXT_NAME)) {
|
|
7808
7795
|
return;
|
|
7809
7796
|
}
|
|
7810
|
-
const textureCount =
|
|
7797
|
+
const textureCount = parser.json.textures?.length || 0;
|
|
7811
7798
|
const promises = new Array(textureCount).fill(null);
|
|
7812
7799
|
forEachPrimitiveExtension(scene, parser, (child, { featureIds }) => {
|
|
7813
7800
|
featureIds.forEach((info) => {
|
|
@@ -8499,7 +8486,7 @@
|
|
|
8499
8486
|
}
|
|
8500
8487
|
}
|
|
8501
8488
|
}
|
|
8502
|
-
const HAS_POPPED_IN = Symbol("HAS_POPPED_IN");
|
|
8489
|
+
const HAS_POPPED_IN = /* @__PURE__ */ Symbol("HAS_POPPED_IN");
|
|
8503
8490
|
const _fromPos = new THREE.Vector3();
|
|
8504
8491
|
const _toPos = new THREE.Vector3();
|
|
8505
8492
|
const _fromQuat = new THREE.Quaternion();
|
|
@@ -8682,8 +8669,7 @@
|
|
|
8682
8669
|
}
|
|
8683
8670
|
// initializes the batched mesh if it needs to be, dispose if it it's no longer needed
|
|
8684
8671
|
initBatchedMesh() {
|
|
8685
|
-
|
|
8686
|
-
const otherBatchedMesh = (_a = this.tiles.getPluginByName("BATCHED_TILES_PLUGIN")) == null ? void 0 : _a.batchedMesh;
|
|
8672
|
+
const otherBatchedMesh = this.tiles.getPluginByName("BATCHED_TILES_PLUGIN")?.batchedMesh;
|
|
8687
8673
|
if (otherBatchedMesh) {
|
|
8688
8674
|
if (this.batchedMesh === null) {
|
|
8689
8675
|
this._onBatchedMeshDispose = () => {
|
|
@@ -8912,11 +8898,11 @@
|
|
|
8912
8898
|
this.material.dispose();
|
|
8913
8899
|
}
|
|
8914
8900
|
}
|
|
8915
|
-
const ORIGINAL_MATERIAL = Symbol("ORIGINAL_MATERIAL");
|
|
8916
|
-
const HAS_RANDOM_COLOR = Symbol("HAS_RANDOM_COLOR");
|
|
8917
|
-
const HAS_RANDOM_NODE_COLOR = Symbol("HAS_RANDOM_NODE_COLOR");
|
|
8918
|
-
const LOAD_TIME = Symbol("LOAD_TIME");
|
|
8919
|
-
const PARENT_BOUND_REF_COUNT = Symbol("PARENT_BOUND_REF_COUNT");
|
|
8901
|
+
const ORIGINAL_MATERIAL = /* @__PURE__ */ Symbol("ORIGINAL_MATERIAL");
|
|
8902
|
+
const HAS_RANDOM_COLOR = /* @__PURE__ */ Symbol("HAS_RANDOM_COLOR");
|
|
8903
|
+
const HAS_RANDOM_NODE_COLOR = /* @__PURE__ */ Symbol("HAS_RANDOM_NODE_COLOR");
|
|
8904
|
+
const LOAD_TIME = /* @__PURE__ */ Symbol("LOAD_TIME");
|
|
8905
|
+
const PARENT_BOUND_REF_COUNT = /* @__PURE__ */ Symbol("PARENT_BOUND_REF_COUNT");
|
|
8920
8906
|
const _sphere = /* @__PURE__ */ new THREE.Sphere();
|
|
8921
8907
|
const emptyRaycast = () => {
|
|
8922
8908
|
};
|
|
@@ -9396,7 +9382,6 @@
|
|
|
9396
9382
|
}
|
|
9397
9383
|
}
|
|
9398
9384
|
dispose() {
|
|
9399
|
-
var _a, _b, _c;
|
|
9400
9385
|
const tiles = this.tiles;
|
|
9401
9386
|
if (tiles) {
|
|
9402
9387
|
tiles.removeEventListener("load-tile-set", this._onLoadTileSetCB);
|
|
@@ -9410,9 +9395,9 @@
|
|
|
9410
9395
|
this._onDisposeModel(tile);
|
|
9411
9396
|
});
|
|
9412
9397
|
}
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9398
|
+
this.boxGroup?.removeFromParent();
|
|
9399
|
+
this.sphereGroup?.removeFromParent();
|
|
9400
|
+
this.regionGroup?.removeFromParent();
|
|
9416
9401
|
}
|
|
9417
9402
|
}
|
|
9418
9403
|
class DeepZoomImagePlugin extends ImageFormatPlugin {
|
|
@@ -10060,7 +10045,6 @@
|
|
|
10060
10045
|
this.tiles = tiles;
|
|
10061
10046
|
}
|
|
10062
10047
|
preprocessNode(tile, tileSetDir, parentTile) {
|
|
10063
|
-
var _a;
|
|
10064
10048
|
if (tile.implicitTiling) {
|
|
10065
10049
|
tile.__hasUnrenderableContent = true;
|
|
10066
10050
|
tile.__hasRenderableContent = false;
|
|
@@ -10070,7 +10054,7 @@
|
|
|
10070
10054
|
tile.__y = 0;
|
|
10071
10055
|
tile.__z = 0;
|
|
10072
10056
|
tile.__level = 0;
|
|
10073
|
-
} else if (/.subtree$/i.test(
|
|
10057
|
+
} else if (/.subtree$/i.test(tile.content?.uri)) {
|
|
10074
10058
|
tile.__hasUnrenderableContent = true;
|
|
10075
10059
|
tile.__hasRenderableContent = false;
|
|
10076
10060
|
}
|
|
@@ -10091,8 +10075,7 @@
|
|
|
10091
10075
|
return url;
|
|
10092
10076
|
}
|
|
10093
10077
|
disposeTile(tile) {
|
|
10094
|
-
|
|
10095
|
-
if (/.subtree$/i.test((_a = tile.content) == null ? void 0 : _a.uri)) {
|
|
10078
|
+
if (/.subtree$/i.test(tile.content?.uri)) {
|
|
10096
10079
|
tile.children.length = 0;
|
|
10097
10080
|
tile.__childrenProcessed = 0;
|
|
10098
10081
|
}
|
|
@@ -10146,8 +10129,7 @@
|
|
|
10146
10129
|
this.objects = [];
|
|
10147
10130
|
this._importer = new THREE.Importer(TilesRendererLoader, [exports2.TilesRendererPlugin.DUMMY_EXT, exports2.TilesRendererPlugin.DUMMY_EXT + ".json"], [], false);
|
|
10148
10131
|
this._preRender = () => {
|
|
10149
|
-
|
|
10150
|
-
const camera = (_a = this._viewer) == null ? void 0 : _a.scene.renderCamera;
|
|
10132
|
+
const camera = this._viewer?.scene.renderCamera;
|
|
10151
10133
|
if (!this._viewer || !camera) return;
|
|
10152
10134
|
if (this._viewer.renderManager.frameCount > 0) return;
|
|
10153
10135
|
camera.updateProjectionMatrix();
|
|
@@ -10217,8 +10199,7 @@
|
|
|
10217
10199
|
fileExtension: exports2.TilesRendererPlugin.DUMMY_EXT,
|
|
10218
10200
|
fileHandler: importer
|
|
10219
10201
|
}).finally(() => {
|
|
10220
|
-
|
|
10221
|
-
(_a = this._viewer) == null ? void 0 : _a.assetManager.importer.unregisterFile(temp);
|
|
10202
|
+
this._viewer?.assetManager.importer.unregisterFile(temp);
|
|
10222
10203
|
});
|
|
10223
10204
|
}
|
|
10224
10205
|
async loadCesiumIon(info, options) {
|
|
@@ -10227,7 +10208,7 @@
|
|
|
10227
10208
|
...options,
|
|
10228
10209
|
tiles: {
|
|
10229
10210
|
CesiumIonAuthPlugin: info,
|
|
10230
|
-
...options
|
|
10211
|
+
...options?.tiles
|
|
10231
10212
|
}
|
|
10232
10213
|
});
|
|
10233
10214
|
}
|
|
@@ -10256,10 +10237,9 @@
|
|
|
10256
10237
|
super.onRemove(viewer);
|
|
10257
10238
|
}
|
|
10258
10239
|
async promptForURL() {
|
|
10259
|
-
|
|
10260
|
-
const url = await ((_a = this._viewer) == null ? void 0 : _a.dialog.prompt("TilesRendererPlugin: Enter URL for the root tileset", "", true));
|
|
10240
|
+
const url = await this._viewer?.dialog.prompt("TilesRendererPlugin: Enter URL for the root tileset", "", true);
|
|
10261
10241
|
if (!url) return;
|
|
10262
|
-
const loader =
|
|
10242
|
+
const loader = this._viewer?.getPlugin(THREE.DropzonePlugin) ?? this._viewer ?? this;
|
|
10263
10243
|
return await loader.load(url, { fileExtension: exports2.TilesRendererPlugin.DUMMY_EXT });
|
|
10264
10244
|
}
|
|
10265
10245
|
};
|
|
@@ -10277,9 +10257,9 @@
|
|
|
10277
10257
|
this.isTilesRendererLoader = true;
|
|
10278
10258
|
this.plugins = [
|
|
10279
10259
|
() => new UpdateOnChangePlugin(),
|
|
10280
|
-
(opts) =>
|
|
10281
|
-
(opts) =>
|
|
10282
|
-
(opts) =>
|
|
10260
|
+
(opts) => opts?.ImplicitTilingPlugin !== false ? new ImplicitTilingPlugin() : void 0,
|
|
10261
|
+
(opts) => opts?.TilesFadePlugin !== false ? new TilesFadePlugin(typeof opts?.TilesFadePlugin === "object" ? opts.TilesFadePlugin : void 0) : void 0,
|
|
10262
|
+
(opts) => opts?.CesiumIonAuthPlugin ? new CesiumIonAuthPlugin(typeof opts?.CesiumIonAuthPlugin === "object" ? opts.CesiumIonAuthPlugin : void 0) : void 0
|
|
10283
10263
|
];
|
|
10284
10264
|
}
|
|
10285
10265
|
_createTilesRenderer(url) {
|
|
@@ -10291,11 +10271,10 @@
|
|
|
10291
10271
|
return tiles;
|
|
10292
10272
|
}
|
|
10293
10273
|
load(url, onLoad, _onProgress, _onError) {
|
|
10294
|
-
var _a;
|
|
10295
10274
|
const tiles = this._createTilesRenderer(url);
|
|
10296
10275
|
const group = THREE.iObjectCommons.upgradeObject3D.call(tiles.group);
|
|
10297
10276
|
group.autoUpgradeChildren = false;
|
|
10298
|
-
const opts =
|
|
10277
|
+
const opts = this.importOptions?.tiles ?? {};
|
|
10299
10278
|
tiles.errorTarget = opts.errorTarget ?? 1;
|
|
10300
10279
|
const plugins = [...this.plugins, ...opts.plugins ?? []];
|
|
10301
10280
|
for (const plugin of plugins) {
|
|
@@ -10337,8 +10316,7 @@
|
|
|
10337
10316
|
group._sChildren = [];
|
|
10338
10317
|
tiles.registerPlugin({
|
|
10339
10318
|
processTileModel: (model, tile) => {
|
|
10340
|
-
|
|
10341
|
-
if (tile === ((_a2 = tiles.rootTileSet) == null ? void 0 : _a2.root)) {
|
|
10319
|
+
if (tile === tiles.rootTileSet?.root) {
|
|
10342
10320
|
group._sChildren = [model];
|
|
10343
10321
|
}
|
|
10344
10322
|
}
|
|
@@ -10366,7 +10344,7 @@
|
|
|
10366
10344
|
tiles.addEventListener("tile-visibility-change", (_e) => {
|
|
10367
10345
|
});
|
|
10368
10346
|
const setDirty = (_e) => {
|
|
10369
|
-
group.setDirty({ frameFade: false });
|
|
10347
|
+
group.setDirty && group.setDirty({ frameFade: false });
|
|
10370
10348
|
};
|
|
10371
10349
|
tiles.addEventListener("load-content", setDirty);
|
|
10372
10350
|
tiles.addEventListener("load-tile-set", setDirty);
|
|
@@ -10399,16 +10377,14 @@
|
|
|
10399
10377
|
return super.transform(res, options);
|
|
10400
10378
|
}
|
|
10401
10379
|
parse(data, _path, onLoad, onError, _url) {
|
|
10402
|
-
var _a;
|
|
10403
10380
|
if (!this.ai) {
|
|
10404
10381
|
console.error("[B3DMLoader] load failed, IAssetImporter not set");
|
|
10405
10382
|
}
|
|
10406
10383
|
const tmpFile = THREE.generateUUID() + ".gltf";
|
|
10407
|
-
|
|
10384
|
+
this.ai?.registerFile(tmpFile);
|
|
10408
10385
|
this.loader.workingPath = _path;
|
|
10409
10386
|
this.loader.parse(data).then(onLoad).catch(onError).finally(() => {
|
|
10410
|
-
|
|
10411
|
-
if (tmpFile) (_a2 = this.ai) == null ? void 0 : _a2.unregisterFile(tmpFile);
|
|
10387
|
+
if (tmpFile) this.ai?.unregisterFile(tmpFile);
|
|
10412
10388
|
});
|
|
10413
10389
|
}
|
|
10414
10390
|
}
|
|
@@ -10436,16 +10412,14 @@
|
|
|
10436
10412
|
return super.transform(res, options);
|
|
10437
10413
|
}
|
|
10438
10414
|
parse(data, _path, onLoad, onError, _url) {
|
|
10439
|
-
var _a;
|
|
10440
10415
|
if (!this.ai) {
|
|
10441
10416
|
console.error("[I3DMLoader] load failed, IAssetImporter not set");
|
|
10442
10417
|
}
|
|
10443
10418
|
const tmpFile = THREE.generateUUID() + ".gltf";
|
|
10444
|
-
|
|
10419
|
+
this.ai?.registerFile(tmpFile);
|
|
10445
10420
|
this.loader.workingPath = _path;
|
|
10446
10421
|
this.loader.parse(data).then(onLoad).catch(onError).finally(() => {
|
|
10447
|
-
|
|
10448
|
-
if (tmpFile) (_a2 = this.ai) == null ? void 0 : _a2.unregisterFile(tmpFile);
|
|
10422
|
+
if (tmpFile) this.ai?.unregisterFile(tmpFile);
|
|
10449
10423
|
});
|
|
10450
10424
|
}
|
|
10451
10425
|
}
|
|
@@ -10509,16 +10483,14 @@
|
|
|
10509
10483
|
return res.scene;
|
|
10510
10484
|
}
|
|
10511
10485
|
parse(data, _path, onLoad, onError, _url) {
|
|
10512
|
-
var _a;
|
|
10513
10486
|
if (!this.ai) {
|
|
10514
10487
|
console.error("[PNTSLoader] load failed, IAssetImporter not set");
|
|
10515
10488
|
}
|
|
10516
10489
|
const tmpFile = THREE.generateUUID() + ".drc";
|
|
10517
|
-
|
|
10490
|
+
this.ai?.registerFile(tmpFile);
|
|
10518
10491
|
this.loader.workingPath = _path;
|
|
10519
10492
|
this.loader.parse(data).then(onLoad).catch(onError).finally(() => {
|
|
10520
|
-
|
|
10521
|
-
if (tmpFile) (_a2 = this.ai) == null ? void 0 : _a2.unregisterFile(tmpFile);
|
|
10493
|
+
if (tmpFile) this.ai?.unregisterFile(tmpFile);
|
|
10522
10494
|
});
|
|
10523
10495
|
}
|
|
10524
10496
|
}
|
|
@@ -10582,13 +10554,12 @@
|
|
|
10582
10554
|
return res.scene;
|
|
10583
10555
|
}
|
|
10584
10556
|
parse(data, _path, onLoad, onError, _url) {
|
|
10585
|
-
var _a, _b;
|
|
10586
10557
|
if (!this.ai) {
|
|
10587
10558
|
console.error("[CMPTLoader] load failed, IAssetImporter not set");
|
|
10588
10559
|
}
|
|
10589
10560
|
const tmpFile = THREE.generateUUID();
|
|
10590
|
-
|
|
10591
|
-
|
|
10561
|
+
this.ai?.registerFile(tmpFile + ".gltf");
|
|
10562
|
+
this.ai?.registerFile(tmpFile + ".drc");
|
|
10592
10563
|
this.loader.workingPath = _path;
|
|
10593
10564
|
this.loader.parse(data).then(onLoad).catch(onError).finally(() => {
|
|
10594
10565
|
if (tmpFile && this.ai) {
|
|
@@ -10619,8 +10590,8 @@
|
|
|
10619
10590
|
super(manager);
|
|
10620
10591
|
this.plugins.push(
|
|
10621
10592
|
(opts) => {
|
|
10622
|
-
if (
|
|
10623
|
-
const op = typeof
|
|
10593
|
+
if (opts?.DeepZoomImagePlugin === false) return void 0;
|
|
10594
|
+
const op = typeof opts?.DeepZoomImagePlugin === "object" ? opts.DeepZoomImagePlugin : {};
|
|
10624
10595
|
return new DeepZoomImagePlugin({
|
|
10625
10596
|
// center: true,
|
|
10626
10597
|
...op
|
|
@@ -10651,8 +10622,8 @@
|
|
|
10651
10622
|
super(manager);
|
|
10652
10623
|
this.plugins.push(
|
|
10653
10624
|
(opts) => {
|
|
10654
|
-
if (
|
|
10655
|
-
const op = typeof
|
|
10625
|
+
if (opts?.XYZTilesPlugin === false) return void 0;
|
|
10626
|
+
const op = typeof opts?.XYZTilesPlugin === "object" ? opts.XYZTilesPlugin : {};
|
|
10656
10627
|
return new XYZTilesPlugin(op);
|
|
10657
10628
|
}
|
|
10658
10629
|
);
|
|
@@ -10673,7 +10644,7 @@
|
|
|
10673
10644
|
super(...arguments);
|
|
10674
10645
|
this.controlsKey = "environment";
|
|
10675
10646
|
this._controlsCtor = (object, domElement) => {
|
|
10676
|
-
return new exports2.EnvironmentControls2(object.parent ?? void 0, object, !
|
|
10647
|
+
return new exports2.EnvironmentControls2(object.parent ?? void 0, object, !domElement?.ownerDocument ? (domElement || document).documentElement : domElement);
|
|
10677
10648
|
};
|
|
10678
10649
|
}
|
|
10679
10650
|
};
|
|
@@ -10772,7 +10743,7 @@
|
|
|
10772
10743
|
console.warn("GlobeControlsPlugin: autoNearFar is not supported with GlobeControlsPlugin, it will be disabled, use EnvironmentControlsPlugin instead to keep default behaviour");
|
|
10773
10744
|
object.userData.autoNearFar = false;
|
|
10774
10745
|
}
|
|
10775
|
-
return new exports2.GlobeControls2(object.parent ?? void 0, object, !
|
|
10746
|
+
return new exports2.GlobeControls2(object.parent ?? void 0, object, !domElement?.ownerDocument ? (domElement || document).documentElement : domElement);
|
|
10776
10747
|
};
|
|
10777
10748
|
}
|
|
10778
10749
|
};
|
|
@@ -10890,5 +10861,5 @@
|
|
|
10890
10861
|
exports2.TilesRendererLoader = TilesRendererLoader;
|
|
10891
10862
|
exports2.UnloadTilesPlugin = UnloadTilesPlugin;
|
|
10892
10863
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
10893
|
-
});
|
|
10864
|
+
}));
|
|
10894
10865
|
//# sourceMappingURL=index.js.map
|