@jdultra/threedtiles 13.0.11 → 13.0.13

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.
@@ -34,6 +34,7 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
34
34
  * @param {Number} [properties.distanceBias = 1] - 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
35
  * @param {String} [properties.loadingStrategy = "INCREMENTAL"] - optional a strategy for loading tiles "INCREMENTAL" loads intermediate LODs while "IMMEDIATE" skips intermediate LODs.
36
36
  * @param {String} [properties.drawBoundingVolume = false] - optional draws the bounding volume (may cause flickering)
37
+ * @param {String} [properties.splatsFragmentShader = undefined] - optional pass a custom fragment shader for rendering splats
37
38
  */
38
39
  constructor(properties?: {
39
40
  url?: string | undefined;
@@ -64,6 +65,7 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
64
65
  distanceBias?: number | undefined;
65
66
  loadingStrategy?: string | undefined;
66
67
  drawBoundingVolume?: string | undefined;
68
+ splatsFragmentShader?: string | undefined;
67
69
  } | undefined);
68
70
  splatsMesh: any;
69
71
  contentURL: any[];
@@ -45,7 +45,7 @@ export class TileLoader {
45
45
  hasMeshOptDecoder: boolean;
46
46
  b3dmDecoder: B3DMDecoder;
47
47
  splatsDecoder: SplatsDecoder;
48
- cache: any;
48
+ cache: LinkedHashMap;
49
49
  register: {};
50
50
  ready: any[];
51
51
  downloads: any[];
@@ -92,3 +92,4 @@ export class TileLoader {
92
92
  import * as THREE from 'three';
93
93
  import { B3DMDecoder } from "../decoder/B3DMDecoder";
94
94
  import { SplatsDecoder } from "../decoder/SplatsDecoder";
95
+ import { LinkedHashMap } from '../utils/LinkedHashMap';
@@ -46,7 +46,7 @@ export class InstancedTileLoader {
46
46
  hasKTX2Loader: boolean | undefined;
47
47
  hasMeshOptDecoder: boolean;
48
48
  b3dmDecoder: B3DMDecoder;
49
- cache: any;
49
+ cache: LinkedHashMap;
50
50
  scene: any;
51
51
  ready: any[];
52
52
  downloads: any[];
@@ -80,4 +80,5 @@ export class InstancedTileLoader {
80
80
  }
81
81
  import * as THREE from 'three';
82
82
  import { B3DMDecoder } from "../../decoder/B3DMDecoder";
83
+ import { LinkedHashMap } from '../../utils/LinkedHashMap';
83
84
  import { InstancedOGC3DTile } from './InstancedOGC3DTile';
@@ -0,0 +1,134 @@
1
+ /**
2
+ * @copyright 2021 Aaron Zhao <yujianzhao2013@gmail.com>
3
+ * @license MIT
4
+ * Linked hash map data structure
5
+ * @class LinkedHashMap
6
+ */
7
+ export class LinkedHashMap {
8
+ _data: Map<any, any>;
9
+ _link: Map<any, any>;
10
+ _head: any;
11
+ _tail: any;
12
+ /**
13
+ * Add or update an item to the list
14
+ * @public
15
+ * @param {any} key
16
+ * @param {any} item
17
+ * @param {boolean} head add to the head if true; tail otherwise
18
+ */
19
+ public put(key: any, item: any, head?: boolean): void;
20
+ /**
21
+ * Returns the head key and item
22
+ * @public
23
+ * @returns {any} key, item, next(), previous()
24
+ */
25
+ public head(): any;
26
+ /**
27
+ * Returns the tail key and item
28
+ * @public
29
+ * @returns {any} key, item, next(), previous()
30
+ */
31
+ public tail(): any;
32
+ /**
33
+ * Returns an item from the map by key
34
+ * @public
35
+ * @param {any} key
36
+ * @returns {any} item
37
+ */
38
+ public get(key: any): any;
39
+ /**
40
+ * Returns previous key item of the key
41
+ * @public
42
+ * @param {any} key
43
+ * @returns {any} key
44
+ */
45
+ public previousKey(key: any): any;
46
+ /**
47
+ * Returns previous item of the key
48
+ * @public
49
+ * @param {any} key
50
+ * @returns {any} item
51
+ */
52
+ public previousValue(key: any): any;
53
+ /**
54
+ * Returns previous key, item of the key
55
+ * @public
56
+ * @param {any} key
57
+ * @returns {any} key, item, next(), previous()
58
+ */
59
+ public previous(key: any): any;
60
+ /**
61
+ * Returns next key of the key
62
+ * @public
63
+ * @param {any} key
64
+ * @returns {any} key
65
+ */
66
+ public nextKey(key: any): any;
67
+ /**
68
+ * Returns next item of the key
69
+ * @public
70
+ * @param {any} key
71
+ * @returns {any} item
72
+ */
73
+ public nextValue(key: any): any;
74
+ /**
75
+ * Returns next key, item of the key
76
+ * @public
77
+ * @param {any} key
78
+ * @returns {any} key, item, next(), previous()
79
+ */
80
+ public next(key: any): any;
81
+ /**
82
+ * Removes and returns an item from the map
83
+ * @public
84
+ * @param {any} key
85
+ * @returns {any} item
86
+ */
87
+ public remove(key: any): any;
88
+ /**
89
+ * Return if the key exists in the map
90
+ * @public
91
+ * @param {any} key;
92
+ * @returns {boolean}
93
+ */
94
+ public has(key: any): boolean;
95
+ /**
96
+ * Returns the size of the map
97
+ * @public
98
+ * @returns {number}
99
+ */
100
+ public size(): number;
101
+ /**
102
+ * Empties the map
103
+ * @public
104
+ */
105
+ public reset(): void;
106
+ /**
107
+ * Returns an iterator of keys
108
+ * @public
109
+ * @returns {Iterator[key]}
110
+ */
111
+ public keys(): key;
112
+ /**
113
+ * Returns an iterator of values
114
+ * @public
115
+ * @returns {Iterator[value]}
116
+ */
117
+ public values(): value;
118
+ /**
119
+ * Returns an iterator of keys and values
120
+ * @public
121
+ * @returns {Iterator[key, value]}
122
+ */
123
+ public entries(): key;
124
+ /**
125
+ * Returns array representation of the map values
126
+ * @public
127
+ * @param {'orderByInsert' | 'orderByLink'} order return by inserting order (default) or link order
128
+ * @returns {Array<{key: any, value: any}>}
129
+ */
130
+ public toArray(order?: "orderByInsert" | "orderByLink"): Array<{
131
+ key: any;
132
+ value: any;
133
+ }>;
134
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdultra/threedtiles",
3
- "version": "13.0.11",
3
+ "version": "13.0.13",
4
4
  "author": "Emeric Beaufays",
5
5
  "description": "An OGC 3DTiles viewer for Three.js",
6
6
  "main": "dist/threedtiles.cjs.js",
@@ -33,7 +33,6 @@
33
33
  "dependencies": {
34
34
  "@haragei/dag": "^1.1.0",
35
35
  "data-structure-typed": "^1.53.5",
36
- "js-utils-z": "^1.2.1",
37
36
  "meshoptimizer": "^0.20.0",
38
37
  "path-browserify": "^1.0.1",
39
38
  "three": "0.170.0",
@@ -47,10 +46,8 @@
47
46
  "@rollup/plugin-inject": "^5.0.5",
48
47
  "@rollup/plugin-terser": "^0.4.4",
49
48
  "@types/three": "^0.171.0",
50
- "buffer": "^6.0.3",
51
49
  "install": "^0.13.0",
52
50
  "jsdom": "^25.0.1",
53
- "process": "^0.11.10",
54
51
  "typescript": "^5.6.3",
55
52
  "vite": "^5.4.10",
56
53
  "vite-plugin-static-copy": "^2.2.0",