@juun-roh/cesium-utils 0.3.0 → 0.3.2
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 +7 -4
- package/dist/chunk-6I4THOWX.js +1 -0
- package/dist/chunk-EGWUHR3C.js +1 -0
- package/dist/chunk-PSCNWZUR.js +1 -0
- package/dist/collection/index.cjs +1 -1
- package/dist/collection/index.d.cts +1 -1
- package/dist/collection/index.d.ts +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/dev/index.cjs +1 -1
- package/dist/dev/index.d.cts +3 -3
- package/dist/dev/index.d.ts +3 -3
- package/dist/dev/index.js +1 -1
- package/dist/experimental/index.cjs +1 -1
- package/dist/experimental/index.d.cts +8 -5
- package/dist/experimental/index.d.ts +8 -5
- package/dist/experimental/index.js +1 -1
- package/dist/highlight/index.cjs +1 -1
- package/dist/highlight/index.d.cts +32 -32
- package/dist/highlight/index.d.ts +32 -32
- package/dist/highlight/index.js +1 -1
- package/dist/{hybrid-terrain-provider-C2V-igd9.d.cts → hybrid-terrain-provider-CzdhZJyg.d.cts} +1 -21
- package/dist/{hybrid-terrain-provider-C2V-igd9.d.ts → hybrid-terrain-provider-CzdhZJyg.d.ts} +1 -21
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/terrain/index.cjs +1 -1
- package/dist/terrain/index.d.cts +1 -1
- package/dist/terrain/index.d.ts +1 -1
- package/dist/terrain/index.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-OUTUX3ZP.js +0 -1
- package/dist/chunk-RZ3PTU3G.js +0 -1
- package/dist/chunk-TC3IX3JL.js +0 -1
- package/dist/chunk-WVFPGF7U.js +0 -1
- package/dist/{index-Bfd24d9-.d.cts → index-iIlou-Sq.d.cts} +59 -59
- package/dist/{index-Bfd24d9-.d.ts → index-iIlou-Sq.d.ts} +59 -59
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { DataSourceCollection, EntityCollection, ImageryLayerCollection, PrimitiveCollection, Billboard, Cesium3DTileset, GroundPrimitive, Label, PointPrimitive, Polyline, Primitive, DataSource, Entity, ImageryLayer } from 'cesium';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Runtime type validator to identify the non-function property.
|
|
5
|
+
*/
|
|
6
|
+
type NonFunction<T> = {
|
|
7
|
+
[K in keyof T]: T[K] extends Function ? never : K;
|
|
8
|
+
}[keyof T];
|
|
3
9
|
/**
|
|
4
10
|
* Examine the property descriptors at runtime
|
|
5
11
|
* to detect properties that only have getters.
|
|
@@ -8,12 +14,6 @@ import { DataSourceCollection, EntityCollection, ImageryLayerCollection, Primiti
|
|
|
8
14
|
* @param k The key value of the property.
|
|
9
15
|
*/
|
|
10
16
|
declare function isGetterOnly(o: object, k: string | number | symbol): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Runtime type validator to identify the non-function property.
|
|
13
|
-
*/
|
|
14
|
-
type NonFunction<T> = {
|
|
15
|
-
[K in keyof T]: T[K] extends Function ? never : K;
|
|
16
|
-
}[keyof T];
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @class
|
|
@@ -171,44 +171,29 @@ declare class Collection<C extends Collection.Base, I extends Collection.ItemFor
|
|
|
171
171
|
*/
|
|
172
172
|
[Symbol.iterator](): Iterator<I>;
|
|
173
173
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* @private
|
|
177
|
-
* @param type - The event type
|
|
178
|
-
* @param data - Additional event data
|
|
179
|
-
*/
|
|
180
|
-
private _emit;
|
|
181
|
-
/**
|
|
182
|
-
* Adds an item to the internal tag map for quick lookups.
|
|
183
|
-
*
|
|
184
|
-
* @private
|
|
185
|
-
* @param item - The item to add
|
|
186
|
-
* @param tag - The tag to associate with the item
|
|
187
|
-
*/
|
|
188
|
-
private _addToTagMap;
|
|
189
|
-
/**
|
|
190
|
-
* Removes an item from the internal tag map.
|
|
174
|
+
* Gets all item instances in the collection.
|
|
175
|
+
* This array should not be modified directly.
|
|
191
176
|
*
|
|
192
|
-
* @
|
|
193
|
-
* @param item - The item to remove
|
|
177
|
+
* @returns An array of all items in the collection
|
|
194
178
|
*/
|
|
195
|
-
|
|
179
|
+
get values(): I[];
|
|
196
180
|
/**
|
|
197
|
-
*
|
|
181
|
+
* Gets the number of items in the collection.
|
|
198
182
|
*
|
|
199
|
-
* @
|
|
183
|
+
* @returns The item count
|
|
200
184
|
*/
|
|
201
|
-
|
|
185
|
+
get length(): number;
|
|
202
186
|
/**
|
|
203
|
-
*
|
|
187
|
+
* Gets all unique tags currently in use in the collection.
|
|
204
188
|
*
|
|
205
|
-
* @
|
|
206
|
-
* @param collection - The Cesium collection to monitor for changes
|
|
189
|
+
* @returns An array of all unique tags
|
|
207
190
|
*
|
|
208
|
-
* @
|
|
209
|
-
*
|
|
191
|
+
* @example
|
|
192
|
+
* // Get all tags
|
|
193
|
+
* const tags = collection.tags;
|
|
194
|
+
* console.log(`Collection has these tags: ${tags.join(', ')}`);
|
|
210
195
|
*/
|
|
211
|
-
|
|
196
|
+
get tags(): Collection.Tag[];
|
|
212
197
|
/**
|
|
213
198
|
* Registers an event listener for collection events.
|
|
214
199
|
*
|
|
@@ -300,19 +285,6 @@ declare class Collection<C extends Collection.Base, I extends Collection.ItemFor
|
|
|
300
285
|
* The Collection instance should not be used after calling this method.
|
|
301
286
|
*/
|
|
302
287
|
destroy(): void;
|
|
303
|
-
/**
|
|
304
|
-
* Gets all item instances in the collection.
|
|
305
|
-
* This array should not be modified directly.
|
|
306
|
-
*
|
|
307
|
-
* @returns An array of all items in the collection
|
|
308
|
-
*/
|
|
309
|
-
get values(): I[];
|
|
310
|
-
/**
|
|
311
|
-
* Gets the number of items in the collection.
|
|
312
|
-
*
|
|
313
|
-
* @returns The item count
|
|
314
|
-
*/
|
|
315
|
-
get length(): number;
|
|
316
288
|
/**
|
|
317
289
|
* Gets all items with the specified tag from the collection.
|
|
318
290
|
* Uses an optimized internal map for faster lookups.
|
|
@@ -337,17 +309,6 @@ declare class Collection<C extends Collection.Base, I extends Collection.ItemFor
|
|
|
337
309
|
* const firstBuilding = collection.first('buildings');
|
|
338
310
|
*/
|
|
339
311
|
first(by: Collection.Tag): I | undefined;
|
|
340
|
-
/**
|
|
341
|
-
* Gets all unique tags currently in use in the collection.
|
|
342
|
-
*
|
|
343
|
-
* @returns An array of all unique tags
|
|
344
|
-
*
|
|
345
|
-
* @example
|
|
346
|
-
* // Get all tags
|
|
347
|
-
* const tags = collection.tags;
|
|
348
|
-
* console.log(`Collection has these tags: ${tags.join(', ')}`);
|
|
349
|
-
*/
|
|
350
|
-
get tags(): Collection.Tag[];
|
|
351
312
|
/**
|
|
352
313
|
* Updates the tag for all items with the specified tag.
|
|
353
314
|
*
|
|
@@ -482,6 +443,45 @@ declare class Collection<C extends Collection.Base, I extends Collection.ItemFor
|
|
|
482
443
|
* );
|
|
483
444
|
*/
|
|
484
445
|
find(predicate: (value: I) => boolean, by?: Collection.Tag): I | undefined;
|
|
446
|
+
/**
|
|
447
|
+
* Emits an event to all registered listeners.
|
|
448
|
+
*
|
|
449
|
+
* @private
|
|
450
|
+
* @param type - The event type
|
|
451
|
+
* @param data - Additional event data
|
|
452
|
+
*/
|
|
453
|
+
private _emit;
|
|
454
|
+
/**
|
|
455
|
+
* Adds an item to the internal tag map for quick lookups.
|
|
456
|
+
*
|
|
457
|
+
* @private
|
|
458
|
+
* @param item - The item to add
|
|
459
|
+
* @param tag - The tag to associate with the item
|
|
460
|
+
*/
|
|
461
|
+
private _addToTagMap;
|
|
462
|
+
/**
|
|
463
|
+
* Removes an item from the internal tag map.
|
|
464
|
+
*
|
|
465
|
+
* @private
|
|
466
|
+
* @param item - The item to remove
|
|
467
|
+
*/
|
|
468
|
+
private _removeFromTagMap;
|
|
469
|
+
/**
|
|
470
|
+
* Invalidates the values cache when collection changes.
|
|
471
|
+
*
|
|
472
|
+
* @private
|
|
473
|
+
*/
|
|
474
|
+
private _invalidateCache;
|
|
475
|
+
/**
|
|
476
|
+
* Sets up automatic cache invalidation by registering event listeners on the underlying Cesium collection.
|
|
477
|
+
*
|
|
478
|
+
* @private
|
|
479
|
+
* @param collection - The Cesium collection to monitor for changes
|
|
480
|
+
*
|
|
481
|
+
* @see {@link destroy} For cleanup of event listeners
|
|
482
|
+
* @see {@link _invalidateCache} For the actual cache invalidation logic
|
|
483
|
+
*/
|
|
484
|
+
private _setupCacheInvalidator;
|
|
485
485
|
}
|
|
486
486
|
/**
|
|
487
487
|
* @namespace
|