@jdultra/threedtiles 12.0.0 → 12.0.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/README.md CHANGED
@@ -7,9 +7,13 @@
7
7
  A faster 3DTiles viewer for three.js, now with OGC3DTiles 1.1 support
8
8
 
9
9
  ## sample getting started projects
10
- [Getting started vanilla js](https://drive.google.com/file/d/14lipb5eUqfad-n7EUgXuXul-drPdLifV/view?usp=sharing)
10
+ Getting started vanilla js:
11
+ [app](https://www.jdultra.com/threedtiles/demos/gettingStarted)
12
+ [code](https://www.jdultra.com/threedtiles/demos/gettingStarted/threedtiles-gettingStarted.zip)
11
13
 
12
- [Getting started react-three-fiber](https://drive.google.com/file/d/1C102qriCsnra9EUbb8WzO4jZStp-eEah/view?usp=sharing)
14
+ GettingStarted RTF:
15
+ [app](https://www.jdultra.com/threedtiles/demos/gettingStartedRTF)
16
+ [code](https://www.jdultra.com/threedtiles/demos/gettingStartedRTF/threedtiles-gettingStarted-RTF.zip)
13
17
 
14
18
  ## Demos
15
19
 
@@ -1,9 +1,10 @@
1
1
  export class B3DMDecoder {
2
2
  constructor(aGltfLoader: any);
3
3
  gltfLoader: any;
4
- tempMatrix: any;
5
- zUpToYUpMatrix: any;
4
+ tempMatrix: THREE.Matrix4;
5
+ zUpToYUpMatrix: THREE.Matrix4;
6
6
  parseB3DM(arrayBuffer: any, meshCallback: any, sceneZupToYUp: any, meshZUpToYUp: any): Promise<any>;
7
7
  checkLoaderInitialized: () => Promise<any>;
8
- parseB3DMInstanced(arrayBuffer: any, meshCallback: any, maxCount: any, sceneZupToYUp: any, meshZupToYup: any): Promise<any>;
8
+ parseB3DMInstanced(arrayBuffer: any, meshCallback: any, maxCount: any, sceneZupToYUp: any, meshZupToYup: any): Promise<THREE.InstancedMesh<any, any[], THREE.InstancedMeshEventMap>>;
9
9
  }
10
+ import * as THREE from 'three';
@@ -1,12 +1,16 @@
1
1
  export class OBB {
2
2
  constructor(values: any);
3
- center: any;
4
- halfWidth: any;
5
- halfHeight: any;
6
- halfDepth: any;
7
- aabb: any;
8
- sphere: any;
9
- matrixToOBBCoordinateSystem: any;
3
+ center: Vector3;
4
+ halfWidth: number;
5
+ halfHeight: number;
6
+ halfDepth: number;
7
+ aabb: Box3;
8
+ sphere: Sphere;
9
+ matrixToOBBCoordinateSystem: Matrix3;
10
10
  inFrustum(frustum: any): any;
11
11
  distanceToPoint(point: any): number;
12
12
  }
13
+ import { Vector3 } from "three";
14
+ import { Box3 } from "three";
15
+ import { Sphere } from "three";
16
+ import { Matrix3 } from "three";
@@ -3,7 +3,7 @@
3
3
  * @class
4
4
  * @extends {THREE.Object3D}
5
5
  */
6
- export class OGC3DTile {
6
+ 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
@@ -52,11 +52,11 @@ export class OGC3DTile {
52
52
  parentGeometricError?: number | undefined;
53
53
  parentBoundingVolume?: Object | undefined;
54
54
  parentRefine?: string | undefined;
55
- cameraOnLoad?: any;
55
+ cameraOnLoad?: THREE.Camera | undefined;
56
56
  parentTile?: OGC3DTile | undefined;
57
57
  proxy?: string | undefined;
58
58
  displayErrors?: boolean | undefined;
59
- renderer?: any;
59
+ renderer?: THREE.Renderer | undefined;
60
60
  domWidth?: number | undefined;
61
61
  domHeight?: number | undefined;
62
62
  dracoLoader?: any;
@@ -66,7 +66,7 @@ export class OGC3DTile {
66
66
  drawBoundingVolume?: string | undefined;
67
67
  } | undefined);
68
68
  contentURL: any[];
69
- rendererSize: any;
69
+ rendererSize: THREE.Vector2;
70
70
  loadingStrategy: string;
71
71
  distanceBias: number;
72
72
  proxy: string | undefined;
@@ -96,17 +96,15 @@ export class OGC3DTile {
96
96
  percentageLoaded: number;
97
97
  };
98
98
  geometricErrorMultiplier: number;
99
- renderer: any;
99
+ renderer: THREE.Renderer | undefined;
100
100
  meshCallback: Function | undefined;
101
101
  loadOutsideView: boolean | undefined;
102
- cameraOnLoad: any;
102
+ cameraOnLoad: THREE.Camera | undefined;
103
103
  parentTile: OGC3DTile | undefined;
104
104
  occlusionCullingService: any;
105
105
  static: boolean | undefined;
106
- color: any;
106
+ color: THREE.Color | undefined;
107
107
  colorID: number | undefined;
108
- matrixAutoUpdate: boolean | undefined;
109
- matrixWorldAutoUpdate: boolean | undefined;
110
108
  childrenTiles: any[];
111
109
  meshContent: any[];
112
110
  materialVisibility: boolean;
@@ -140,7 +138,6 @@ export class OGC3DTile {
140
138
  */
141
139
  dispose(): void;
142
140
  deleted: boolean | undefined;
143
- parent: any;
144
141
  _disposeMeshContent(): void;
145
142
  _disposeChildren(): void;
146
143
  _updateImmediate(camera: any, frustum: any): void;
@@ -192,4 +189,5 @@ export class OGC3DTile {
192
189
  * @returns a list of vendors that are required by copyright to be displayed in the app.
193
190
  */
194
191
  export function getOGC3DTilesCopyrightInfo(): string[];
192
+ import * as THREE from 'three';
195
193
  import { TileLoader } from "./TileLoader";
@@ -6,15 +6,15 @@
6
6
  */
7
7
  export class OcclusionCullingService {
8
8
  cullMap: any[];
9
- cullMaterial: any;
10
- cullTarget: any;
9
+ cullMaterial: THREE.MeshBasicMaterial;
10
+ cullTarget: THREE.WebGLRenderTarget<THREE.Texture>;
11
11
  cullPixels: Uint8Array;
12
12
  /**
13
13
  *
14
14
  * @param {Integer} side use THREE.FrontSide, THREE.BackSide or THREE.DoubleSide (FrontSide default)
15
15
  */
16
16
  setSide(side: Integer): void;
17
- _createCullTarget(): any;
17
+ _createCullTarget(): THREE.WebGLRenderTarget<THREE.Texture>;
18
18
  /**
19
19
  * Update function to be called on every frame in the render loop.
20
20
  * @param {THREE.scene} scene
@@ -29,3 +29,4 @@ export class OcclusionCullingService {
29
29
  */
30
30
  hasID(id: string | number): any;
31
31
  }
32
+ import * as THREE from 'three';
@@ -33,7 +33,7 @@ export class TileLoader {
33
33
  dracoLoader?: any;
34
34
  renderer?: any;
35
35
  } | undefined);
36
- zUpToYUpMatrix: any;
36
+ zUpToYUpMatrix: THREE.Matrix4;
37
37
  maxCachedItems: number;
38
38
  proxy: any;
39
39
  meshCallback: Function | undefined;
@@ -87,4 +87,5 @@ export class TileLoader {
87
87
  invalidate(path: string, tileIdentifier: string | number): void;
88
88
  _checkSize(): void;
89
89
  }
90
+ import * as THREE from 'three';
90
91
  import { B3DMDecoder } from "../decoder/B3DMDecoder";
@@ -5,7 +5,7 @@
5
5
  * Each tile content is instanced but each {@link InstancedOGC3DTile} object also has it's own LOD tree making this scenario very efficient.
6
6
  * @class
7
7
  */
8
- export class InstancedOGC3DTile {
8
+ export class InstancedOGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
9
9
  /**
10
10
  *
11
11
  * @param {Object} [properties] - the properties for this tileset
@@ -54,12 +54,11 @@ export class InstancedOGC3DTile {
54
54
  renderer?: Object | undefined;
55
55
  distanceBias?: number | undefined;
56
56
  } | undefined);
57
- rendererSize: any;
57
+ rendererSize: THREE.Vector2;
58
58
  renderer: Object | undefined;
59
59
  distanceBias: number;
60
60
  geometricErrorMultiplier: number | Object;
61
61
  tileset: InstancedTile;
62
- matrixAutoUpdate: boolean | undefined;
63
62
  tileLoader: Object | undefined;
64
63
  _renderSize(size: any): void;
65
64
  /**
@@ -85,4 +84,5 @@ export class InstancedOGC3DTile {
85
84
  */
86
85
  setGeometricErrorMultiplier(geometricErrorMultiplier: number): void;
87
86
  }
87
+ import * as THREE from 'three';
88
88
  import { InstancedTile } from "./InstancedTile.js";
@@ -1,4 +1,4 @@
1
- export class InstancedTile {
1
+ export class InstancedTile extends THREE.Object3D<THREE.Object3DEventMap> {
2
2
  /**
3
3
  *
4
4
  * @param {
@@ -31,8 +31,6 @@ export class InstancedTile {
31
31
  jsonChildren: any;
32
32
  meshContent: Set<any>;
33
33
  static: any;
34
- matrixAutoUpdate: boolean | undefined;
35
- matrixWorldAutoUpdate: boolean | undefined;
36
34
  materialVisibility: boolean;
37
35
  inFrustum: boolean;
38
36
  level: any;
@@ -44,7 +42,6 @@ export class InstancedTile {
44
42
  rootPath: any;
45
43
  loadJson(json: any, url: any): void;
46
44
  setup(properties: any): Promise<void>;
47
- matrixWorldNeedsUpdate: boolean | undefined;
48
45
  isSetup: boolean | undefined;
49
46
  isAbsolutePathOrURL(input: any): any;
50
47
  assembleURL(root: any, relative: any): string;
@@ -52,7 +49,6 @@ export class InstancedTile {
52
49
  load(): void;
53
50
  loadMesh(mesh: any): void;
54
51
  dispose(): void;
55
- parent: any;
56
52
  disposeChildren(): void;
57
53
  _update(camera: any, frustum: any): void;
58
54
  areAllChildrenLoadedAndHidden(): boolean;
@@ -65,6 +61,7 @@ export class InstancedTile {
65
61
  calculateUpdateMetric(camera: any, frustum: any): number;
66
62
  getSiblings(): any[];
67
63
  calculateDistanceToCamera(camera: any): number;
68
- getWorldMatrix(): any;
64
+ getWorldMatrix(): THREE.Matrix4;
69
65
  transformWGS84ToCartesian(lon: any, lat: any, h: any, sfct: any): void;
70
66
  }
67
+ import * as THREE from 'three';
@@ -35,7 +35,7 @@ export class InstancedTileLoader {
35
35
  dracoLoader?: any;
36
36
  renderer?: any;
37
37
  } | undefined);
38
- zUpToYUpMatrix: any;
38
+ zUpToYUpMatrix: THREE.Matrix4;
39
39
  maxCachedItems: number;
40
40
  maxInstances: number;
41
41
  proxy: any;
@@ -78,5 +78,6 @@ export class InstancedTileLoader {
78
78
  _getNextDownloads(): void;
79
79
  _checkSize(): void;
80
80
  }
81
+ import * as THREE from 'three';
81
82
  import { B3DMDecoder } from "../../decoder/B3DMDecoder";
82
83
  import { InstancedOGC3DTile } from './InstancedOGC3DTile';
@@ -2,7 +2,7 @@ export class MeshTile {
2
2
  constructor(scene: any);
3
3
  scene: any;
4
4
  instancedTiles: any[];
5
- reuseableMatrix: any;
5
+ reuseableMatrix: THREE.Matrix4;
6
6
  addInstance(instancedTile: any): void;
7
7
  addToScene(): void;
8
8
  setObject(instancedMesh: any): void;
@@ -11,3 +11,4 @@ export class MeshTile {
11
11
  getCount(): number;
12
12
  dispose(): boolean;
13
13
  }
14
+ import * as THREE from 'three';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdultra/threedtiles",
3
- "version": "12.0.0",
3
+ "version": "12.0.1",
4
4
  "author": "Emeric Beaufays",
5
5
  "description": "An OGC 3DTiles viewer for Three.js",
6
6
  "main": "dist/threedtiles.cjs.js",
@@ -38,6 +38,7 @@
38
38
  "@rollup/plugin-terser": "^0.4.4",
39
39
  "typescript": "^5.6.3",
40
40
  "vite": "^5.4.10",
41
- "vite-plugin-static-copy": "^2.0.0"
41
+ "vite-plugin-static-copy": "^2.0.0",
42
+ "@types/three": "^0.169.0"
42
43
  }
43
44
  }