@jdultra/threedtiles 10.1.10 → 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.
@@ -31,6 +31,9 @@ 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;
@@ -58,9 +61,16 @@ 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
76
  queryParams: {
@@ -77,8 +87,13 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
77
87
  /**
78
88
  * To be called in the render loop.
79
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.
80
91
  */
81
- update(camera: Three.Camera): void;
92
+ update(camera: Three.Camera): {
93
+ numTiles: number;
94
+ maxLOD: number;
95
+ percentageLoaded: number[];
96
+ };
82
97
  geometricErrorMultiplier: number;
83
98
  renderer: THREE.Renderer | undefined;
84
99
  meshCallback: Function | undefined;
@@ -92,7 +107,6 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
92
107
  childrenTiles: any[];
93
108
  meshContent: any[];
94
109
  materialVisibility: boolean;
95
- inFrustum: boolean;
96
110
  level: any;
97
111
  hasMeshContent: number;
98
112
  hasUnloadedJSONContent: number;
@@ -111,22 +125,37 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
111
125
  isSetup: boolean | undefined;
112
126
  _assembleURL(root: any, relative: any): string;
113
127
  _extractQueryParams(url: any, params: any): string;
114
- _load(): Promise<void>;
128
+ _load(loadJson?: boolean, loadMesh?: boolean): Promise<void>;
115
129
  /**
116
130
  * Disposes of all the resources used by the tileset.
117
131
  */
118
132
  dispose(): void;
119
133
  deleted: boolean | undefined;
134
+ _disposeMeshContent(): void;
120
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;
121
149
  _update(camera: any, frustum: any): void;
150
+ _loadJsonChildren(camera: any): void;
122
151
  _areAllChildrenLoadedAndHidden(): boolean;
123
152
  /**
124
153
  * Node is ready if it is outside frustum, if it was drawn at least once or if all it's children are ready
125
154
  * @returns true if ready
126
155
  */
127
156
  _isReady(): boolean;
157
+ _isReadyImmediate(): boolean;
128
158
  _changeContentVisibility(visibility: any): void;
129
- meshDisplayed: boolean | undefined;
130
159
  _calculateUpdateMetric(camera: any, frustum: any): number;
131
160
  _getSiblings(): any[];
132
161
  _calculateDistanceToCamera(camera: any): number;
@@ -141,5 +170,9 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
141
170
  setGeometricErrorMultiplier(geometricErrorMultiplier: number): void;
142
171
  _transformWGS84ToCartesian(lon: any, lat: any, h: any, sfct: any): void;
143
172
  }
173
+ /**
174
+ * @returns a list of vendors that require copyright to be displayed in the app
175
+ */
176
+ export function getOGC3DTilesCopyrightInfo(): string;
144
177
  import * as THREE from 'three';
145
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.10",
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",