@jdultra/threedtiles 10.0.2 → 10.1.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/decoder/B3DMDecoder.d.ts +1 -1
- package/dist/threedtiles.min.js +1 -1
- package/dist/threedtiles.min.js.map +1 -1
- package/dist/tileset/OGC3DTile.d.ts +19 -2
- package/dist/tileset/TileLoader.d.ts +8 -2
- package/dist/tileset/instanced/InstancedOGC3DTile.d.ts +16 -2
- package/dist/tileset/instanced/InstancedTileLoader.d.ts +9 -2
- package/package.json +1 -1
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
export class OGC3DTile {
|
|
7
7
|
/**
|
|
8
8
|
* @param {Object} [properties] - the properties for this tileset
|
|
9
|
-
* @param {THREE.Renderer} [properties.renderer] - the renderer used to display the tileset
|
|
10
9
|
* @param {String} [properties.url] - the url to the parent tileset.json
|
|
11
10
|
* @param {String} [properties.queryParams] - optional, path params to add to individual tile urls (starts with "?").
|
|
12
11
|
* @param {Number} [properties.geometricErrorMultiplier] - the geometric error of the parent. 1.0 by default corresponds to a maxScreenSpaceError of 16
|
|
@@ -27,9 +26,13 @@ export class OGC3DTile {
|
|
|
27
26
|
* @param {OGC3DTile} [properties.parentTile] - optional the OGC3DTile object that loaded this tile as a child
|
|
28
27
|
* @param {String} [properties.proxy] - optional the url to a proxy service. Instead of fetching tiles via a GET request, a POST will be sent to the proxy url with the real tile address in the body of the request.
|
|
29
28
|
* @param {Boolean} [properties.displayErrors] - optional value indicating that errors should be shown on screen.
|
|
29
|
+
* @param {THREE.Renderer} [properties.renderer] - optional the renderer used to display the tileset. Used to infer render resolution at runtime and to instantiate a ktx2loader on the fly if not provided.
|
|
30
|
+
* @param {Number} [properties.domWidth] - 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.
|
|
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
|
+
* @param {DracoLoader} [properties.dracoLoader] - optional a draco loader (three/addons).
|
|
33
|
+
* @param {KTX2Loader} [properties.ktx2Loader] - optional a ktx2 loader (three/addons).
|
|
30
34
|
*/
|
|
31
35
|
constructor(properties?: {
|
|
32
|
-
renderer?: any;
|
|
33
36
|
url?: string | undefined;
|
|
34
37
|
queryParams?: string | undefined;
|
|
35
38
|
geometricErrorMultiplier?: number | undefined;
|
|
@@ -50,7 +53,13 @@ export class OGC3DTile {
|
|
|
50
53
|
parentTile?: OGC3DTile | undefined;
|
|
51
54
|
proxy?: string | undefined;
|
|
52
55
|
displayErrors?: boolean | undefined;
|
|
56
|
+
renderer?: any;
|
|
57
|
+
domWidth?: number | undefined;
|
|
58
|
+
domHeight?: number | undefined;
|
|
59
|
+
dracoLoader?: any;
|
|
60
|
+
ktx2Loader?: any;
|
|
53
61
|
} | undefined);
|
|
62
|
+
rendererSize: any;
|
|
54
63
|
proxy: string | undefined;
|
|
55
64
|
displayErrors: boolean | undefined;
|
|
56
65
|
displayCopyright: boolean;
|
|
@@ -83,6 +92,14 @@ export class OGC3DTile {
|
|
|
83
92
|
hasUnloadedJSONContent: number;
|
|
84
93
|
centerModel: boolean | undefined;
|
|
85
94
|
abortController: AbortController;
|
|
95
|
+
/**
|
|
96
|
+
* Call this to specify the canvas width/height when it changes (used to compute tiles geometric error that controls tile refinement).
|
|
97
|
+
* It's unnecessary to call this when the {@link OGC3DTile} is instantiated with the renderer.
|
|
98
|
+
*
|
|
99
|
+
* @param {Number} width
|
|
100
|
+
* @param {Number} height
|
|
101
|
+
*/
|
|
102
|
+
setCanvasSize(width: number, height: number): void;
|
|
86
103
|
_setup(properties: any): Promise<void>;
|
|
87
104
|
rootPath: any;
|
|
88
105
|
isSetup: boolean | undefined;
|
|
@@ -16,24 +16,30 @@ export class TileLoader {
|
|
|
16
16
|
*
|
|
17
17
|
*
|
|
18
18
|
* @param {Object} [options] - Optional configuration object.
|
|
19
|
-
* @param {renderer} [options.renderer] - The renderer, this is required for KTX2 support.
|
|
20
19
|
* @param {number} [options.maxCachedItems=100] - the cache size.
|
|
21
20
|
* @param {function} [options.meshCallback = undefined] - A callback to call on newly decoded meshes.
|
|
22
21
|
* @param {function} [options.pointsCallback = undefined] - A callback to call on newly decoded points.
|
|
23
22
|
* @param {sring} [options.proxy = undefined] - An optional proxy that tile requests will be directed too as POST requests with the actual tile url in the body of the request.
|
|
23
|
+
* @param {KTX2Loader} [options.ktx2Loader = undefined] - A KTX2Loader (three/addons)
|
|
24
|
+
* @param {DRACOLoader} [options.dracoLoader = undefined] - A DRACOLoader (three/addons)
|
|
25
|
+
* @param {renderer} [options.renderer = undefined] - optional the renderer, this is required only for on the fly ktx2 support. not needed if you pass a ktx2Loader manually
|
|
24
26
|
*/
|
|
25
27
|
constructor(options?: {
|
|
26
|
-
renderer?: any;
|
|
27
28
|
maxCachedItems?: number | undefined;
|
|
28
29
|
meshCallback?: Function | undefined;
|
|
29
30
|
pointsCallback?: Function | undefined;
|
|
30
31
|
proxy?: any;
|
|
32
|
+
ktx2Loader?: any;
|
|
33
|
+
dracoLoader?: any;
|
|
34
|
+
renderer?: any;
|
|
31
35
|
} | undefined);
|
|
32
36
|
maxCachedItems: number;
|
|
33
37
|
proxy: any;
|
|
34
38
|
meshCallback: Function | undefined;
|
|
35
39
|
pointsCallback: Function | undefined;
|
|
36
40
|
gltfLoader: any;
|
|
41
|
+
hasDracoLoader: boolean | undefined;
|
|
42
|
+
hasKTX2Loader: boolean | undefined;
|
|
37
43
|
b3dmDecoder: B3DMDecoder;
|
|
38
44
|
cache: any;
|
|
39
45
|
register: {};
|
|
@@ -9,7 +9,6 @@ export class InstancedOGC3DTile {
|
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
11
|
* @param {Object} [properties] - the properties for this tileset
|
|
12
|
-
* @param {Object} [properties.renderer] - the renderer used to display the tileset
|
|
13
12
|
* @param {Object} [properties.url] - the url to the parent tileset.json
|
|
14
13
|
* @param {Object} [properties.pathParams] - optional, path params to add to individual tile urls (starts with "?").
|
|
15
14
|
* @param {Object} [properties.geometricErrorMultiplier] - the geometric error of the parent. 1.0 by default corresponds to a maxScreenSpaceError of 16
|
|
@@ -28,9 +27,11 @@ export class InstancedOGC3DTile {
|
|
|
28
27
|
* @param {Object} [properties.parentRefinement] - optional refinement strategy of the parent of the parent
|
|
29
28
|
* @param {Object} [properties.cameraOnLoad] - optional the camera used when loading this particular sub-tile
|
|
30
29
|
* @param {Object} [properties.parentTile] - optional the OGC3DTile object that loaded this tile as a child
|
|
30
|
+
* @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.
|
|
31
|
+
* @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.
|
|
32
|
+
* @param {Object} [properties.renderer = undefined] - optional the renderer is used to infer the canvas size and compute tiles geometric error.
|
|
31
33
|
*/
|
|
32
34
|
constructor(properties?: {
|
|
33
|
-
renderer?: Object | undefined;
|
|
34
35
|
url?: Object | undefined;
|
|
35
36
|
pathParams?: Object | undefined;
|
|
36
37
|
geometricErrorMultiplier?: Object | undefined;
|
|
@@ -49,12 +50,25 @@ export class InstancedOGC3DTile {
|
|
|
49
50
|
parentRefinement?: Object | undefined;
|
|
50
51
|
cameraOnLoad?: Object | undefined;
|
|
51
52
|
parentTile?: Object | undefined;
|
|
53
|
+
domWidth?: number | undefined;
|
|
54
|
+
domHeight?: number | undefined;
|
|
55
|
+
renderer?: Object | undefined;
|
|
52
56
|
} | undefined);
|
|
57
|
+
rendererSize: any;
|
|
53
58
|
renderer: Object | undefined;
|
|
54
59
|
geometricErrorMultiplier: number | Object;
|
|
55
60
|
tileset: InstancedTile;
|
|
56
61
|
matrixAutoUpdate: boolean | undefined;
|
|
57
62
|
tileLoader: Object | undefined;
|
|
63
|
+
_renderSize(size: any): void;
|
|
64
|
+
/**
|
|
65
|
+
* Call this to specify the canvas width/height when it changes (used to compute tiles geometric error that controls tile refinement).
|
|
66
|
+
* It's unnecessary to call this when the {@link OGC3DTile} is instantiated with the renderer.
|
|
67
|
+
*
|
|
68
|
+
* @param {Number} width
|
|
69
|
+
* @param {Number} height
|
|
70
|
+
*/
|
|
71
|
+
setCanvasSize(width: number, height: number): void;
|
|
58
72
|
/**
|
|
59
73
|
* To be called in the render loop.
|
|
60
74
|
* @param {Three.Camera} camera a camera that the tileset will be rendered with.
|
|
@@ -19,16 +19,21 @@ export class InstancedTileLoader {
|
|
|
19
19
|
* @param {number} [options.maxInstances=1] - the cache size.
|
|
20
20
|
* @param {function} [options.meshCallback] - A callback to call on newly decoded meshes.
|
|
21
21
|
* @param {function} [options.pointsCallback] - A callback to call on newly decoded points.
|
|
22
|
-
* @param {renderer} [options.renderer] - The renderer, this is required for KTX2 support.
|
|
23
22
|
* @param {sring} [options.proxy] - An optional proxy that tile requests will be directed too as POST requests with the actual tile url in the body of the request.
|
|
23
|
+
* @param {KTX2Loader} [options.ktx2Loader = undefined] - A KTX2Loader (three/addons)
|
|
24
|
+
* @param {DRACOLoader} [options.dracoLoader = undefined] - A DRACOLoader (three/addons)
|
|
25
|
+
* @param {renderer} [options.renderer = undefined] - optional the renderer, this is required only for on the fly ktx2 support. not needed if you pass a ktx2Loader manually
|
|
26
|
+
|
|
24
27
|
*/
|
|
25
28
|
constructor(scene?: any, options?: {
|
|
26
29
|
maxCachedItems?: number | undefined;
|
|
27
30
|
maxInstances?: number | undefined;
|
|
28
31
|
meshCallback?: Function | undefined;
|
|
29
32
|
pointsCallback?: Function | undefined;
|
|
30
|
-
renderer?: any;
|
|
31
33
|
proxy?: any;
|
|
34
|
+
ktx2Loader?: any;
|
|
35
|
+
dracoLoader?: any;
|
|
36
|
+
renderer?: any;
|
|
32
37
|
} | undefined);
|
|
33
38
|
maxCachedItems: number;
|
|
34
39
|
maxInstances: number;
|
|
@@ -36,6 +41,8 @@ export class InstancedTileLoader {
|
|
|
36
41
|
meshCallback: Function | undefined;
|
|
37
42
|
pointsCallback: Function | undefined;
|
|
38
43
|
gltfLoader: any;
|
|
44
|
+
hasDracoLoader: boolean | undefined;
|
|
45
|
+
hasKTX2Loader: boolean | undefined;
|
|
39
46
|
b3dmDecoder: B3DMDecoder;
|
|
40
47
|
cache: any;
|
|
41
48
|
scene: any;
|