@jdultra/threedtiles 10.1.9 → 11.0.0

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.
@@ -7,7 +7,7 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
7
7
  /**
8
8
  * @param {Object} [properties] - the properties for this tileset
9
9
  * @param {String} [properties.url] - the url to the parent tileset.json
10
- * @param {String} [properties.queryParams] - optional, path params to add to individual tile urls (starts with "?").
10
+ * @param {Object} [properties.queryParams] - optional, path params to add to individual tile urls
11
11
  * @param {Number} [properties.geometricErrorMultiplier] - the geometric error of the parent. 1.0 by default corresponds to a maxScreenSpaceError of 16
12
12
  * @param {Boolean} [properties.loadOutsideView] - if truthy, tiles otside the camera frustum will be loaded with the least possible amount of detail
13
13
  * @param {TileLoader} [properties.tileLoader] - A tile loader that can be shared among tilesets in order to share a common cache.
@@ -31,10 +31,13 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
31
31
  * @param {Number} [properties.domHeight] - optional the canvas height (used to calculate geometric error). If a renderer is provided, it'll be used instead, else a default value is used.
32
32
  * @param {DracoLoader} [properties.dracoLoader] - optional a draco loader (three/addons).
33
33
  * @param {KTX2Loader} [properties.ktx2Loader] - optional a ktx2 loader (three/addons).
34
+ * @param {Number} [properties.distanceBias] - optional a bias that allows loading more or less detail closer to the camera relative to far away. The value should be a positive number. A value below 1 loads less detail near the camera and a value above 1 loads more detail near the camera. This needs to be compensated by the geometricErrorMultiplier in order to load a reasonable number of tiles.
35
+ * @param {String} [properties.loadingStrategy] - optional a strategy for loading tiles "INCREMENTAL" loads intermediate LODs while "IMMEDIATE" skips intermediate LODs.
36
+ * @param {String} [properties.drawBoundingVolume] - optional draws the bounding volume (may cause flickering)
34
37
  */
35
38
  constructor(properties?: {
36
39
  url?: string | undefined;
37
- queryParams?: string | undefined;
40
+ queryParams?: Object | undefined;
38
41
  geometricErrorMultiplier?: number | undefined;
39
42
  loadOutsideView?: boolean | undefined;
40
43
  tileLoader?: TileLoader | undefined;
@@ -58,19 +61,39 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
58
61
  domHeight?: number | undefined;
59
62
  dracoLoader?: any;
60
63
  ktx2Loader?: any;
64
+ distanceBias?: number | undefined;
65
+ loadingStrategy?: string | undefined;
66
+ drawBoundingVolume?: string | undefined;
61
67
  } | undefined);
68
+ contentURL: any[];
62
69
  rendererSize: THREE.Vector2;
70
+ loadingStrategy: string;
71
+ distanceBias: number;
63
72
  proxy: string | undefined;
73
+ drawBoundingVolume: string | boolean;
64
74
  displayErrors: boolean | undefined;
65
75
  displayCopyright: boolean;
66
- queryParams: any;
76
+ queryParams: {
77
+ constructor: Function;
78
+ toString(): string;
79
+ toLocaleString(): string;
80
+ valueOf(): Object;
81
+ hasOwnProperty(v: PropertyKey): boolean;
82
+ isPrototypeOf(v: Object): boolean;
83
+ propertyIsEnumerable(v: PropertyKey): boolean;
84
+ } | undefined;
67
85
  uuid: any;
68
86
  tileLoader: TileLoader;
69
87
  /**
70
88
  * To be called in the render loop.
71
89
  * @param {Three.Camera} camera a camera that the tileset will be rendered with.
90
+ * @returns {{numTiles: number, maxLOD: number, percentageLoaded: percentageLoaded}} An object containing describing the current state of the loaded tileset.
72
91
  */
73
- update(camera: Three.Camera): void;
92
+ update(camera: Three.Camera): {
93
+ numTiles: number;
94
+ maxLOD: number;
95
+ percentageLoaded: number[];
96
+ };
74
97
  geometricErrorMultiplier: number;
75
98
  renderer: THREE.Renderer | undefined;
76
99
  meshCallback: Function | undefined;
@@ -84,7 +107,6 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
84
107
  childrenTiles: any[];
85
108
  meshContent: any[];
86
109
  materialVisibility: boolean;
87
- inFrustum: boolean;
88
110
  level: any;
89
111
  hasMeshContent: number;
90
112
  hasUnloadedJSONContent: number;
@@ -103,22 +125,37 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
103
125
  isSetup: boolean | undefined;
104
126
  _assembleURL(root: any, relative: any): string;
105
127
  _extractQueryParams(url: any, params: any): string;
106
- _load(): Promise<void>;
128
+ _load(loadJson?: boolean, loadMesh?: boolean): Promise<void>;
107
129
  /**
108
130
  * Disposes of all the resources used by the tileset.
109
131
  */
110
132
  dispose(): void;
111
133
  deleted: boolean | undefined;
134
+ _disposeMeshContent(): void;
112
135
  _disposeChildren(): void;
136
+ _updateImmediate(camera: any, frustum: any): void;
137
+ shouldBeVisible: boolean | undefined;
138
+ check(): void;
139
+ _statsImmediate(maxLOD: any, numTiles: any, percentageLoaded: any, numTilesRendered: any): void;
140
+ _stats(maxLOD: any, numTiles: any, percentageLoaded: any, numTilesRendered: any): void;
141
+ _trimTreeImmediate(): void;
142
+ _updateNodeVisibilityImmediate(parentDisplaysMesh?: boolean): void;
143
+ _shouldBeVisibleUpdateImmediate(): void;
144
+ _setShouldNotBeVisibleRecursive(): void;
145
+ _loadMeshImmediate(): void;
146
+ _computeMetricRecursive(camera: any, frustum: any): void;
147
+ metric: number | undefined;
148
+ _expandTreeImmediate(camera: any): void;
113
149
  _update(camera: any, frustum: any): void;
150
+ _loadJsonChildren(camera: any): void;
114
151
  _areAllChildrenLoadedAndHidden(): boolean;
115
152
  /**
116
153
  * Node is ready if it is outside frustum, if it was drawn at least once or if all it's children are ready
117
154
  * @returns true if ready
118
155
  */
119
156
  _isReady(): boolean;
157
+ _isReadyImmediate(): boolean;
120
158
  _changeContentVisibility(visibility: any): void;
121
- meshDisplayed: boolean | undefined;
122
159
  _calculateUpdateMetric(camera: any, frustum: any): number;
123
160
  _getSiblings(): any[];
124
161
  _calculateDistanceToCamera(camera: any): number;
@@ -133,5 +170,9 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
133
170
  setGeometricErrorMultiplier(geometricErrorMultiplier: number): void;
134
171
  _transformWGS84ToCartesian(lon: any, lat: any, h: any, sfct: any): void;
135
172
  }
173
+ /**
174
+ * @returns a list of vendors that require copyright to be displayed in the app
175
+ */
176
+ export function getOGC3DTilesCopyrightInfo(): string;
136
177
  import * as THREE from 'three';
137
178
  import { TileLoader } from "./TileLoader";
@@ -57,7 +57,7 @@ export class TileLoader {
57
57
  _scheduleDownload(f: any): void;
58
58
  _download(): void;
59
59
  _meshReceived(cache: any, register: any, key: any, distanceFunction: any, getSiblings: any, level: any, uuid: any): void;
60
- _loadBatch(): 0 | undefined;
60
+ _loadBatch(): void;
61
61
  _getNextDownloads(): void;
62
62
  _getNextReady(): void;
63
63
  /**
@@ -29,6 +29,7 @@ export class InstancedOGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
29
29
  * @param {Number} [properties.domWidth = 1000] - optional the canvas width (used to calculate geometric error). If a renderer is provided, it'll be used instead, else a default value is used.
30
30
  * @param {Number} [properties.domHeight = 1000] - optional the canvas height (used to calculate geometric error). If a renderer is provided, it'll be used instead, else a default value is used.
31
31
  * @param {Object} [properties.renderer = undefined] - optional the renderer is used to infer the canvas size and compute tiles geometric error.
32
+ * @param {Number} [properties.distanceBias] - optional a bias that allows loading more or less detail closer to the camera relative to far away. The value should be a positive number. A value below 1 loads less detail near the camera and a value above 1 loads more detail near the camera. This needs to be compensated by the geometricErrorMultiplier in order to load a reasonable number of tiles.
32
33
  */
33
34
  constructor(properties?: {
34
35
  url?: Object | undefined;
@@ -51,9 +52,11 @@ export class InstancedOGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
51
52
  domWidth?: number | undefined;
52
53
  domHeight?: number | undefined;
53
54
  renderer?: Object | undefined;
55
+ distanceBias?: number | undefined;
54
56
  } | undefined);
55
57
  rendererSize: THREE.Vector2;
56
58
  renderer: Object | undefined;
59
+ distanceBias: number;
57
60
  geometricErrorMultiplier: number | Object;
58
61
  tileset: InstancedTile;
59
62
  tileLoader: Object | undefined;
@@ -14,7 +14,8 @@ export class InstancedTile extends THREE.Object3D<THREE.Object3DEventMap> {
14
14
  * parentTile: OGC3DTile,
15
15
  * onLoadCallback: function,
16
16
  * centerModel: Boolean,
17
- * queryParams: String
17
+ * queryParams: String,
18
+ * distanceBias: distanceBias
18
19
  * } properties
19
20
  */
20
21
  constructor(properties: any);
@@ -25,6 +26,7 @@ export class InstancedTile extends THREE.Object3D<THREE.Object3DEventMap> {
25
26
  loadOutsideView: any;
26
27
  cameraOnLoad: any;
27
28
  parentTile: any;
29
+ distanceBias: number;
28
30
  childrenTiles: any[];
29
31
  jsonChildren: any;
30
32
  meshContent: Set<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdultra/threedtiles",
3
- "version": "10.1.9",
3
+ "version": "11.0.0",
4
4
  "description": "An OGC 3DTiles viewer for Three.js",
5
5
  "main": "dist/threedtiles.min.js",
6
6
  "types": "dist/entry.d.ts",