@miris-inc/core 0.0.8-76c6380 → 0.0.8-7bd29ff
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/AquaApi.wasm +0 -0
- package/dist/aqua-parser.wasm +0 -0
- package/dist/core.d.ts +52 -40
- package/dist/core.js +2111 -2452
- package/dist/core.prod.js +1 -1
- package/dist/core.standalone.js +5754 -5423
- package/dist/core.standalone.prod.js +1 -1
- package/package.json +16 -16
- package/dist/AquaApi.js +0 -15
- package/dist/aqua-parser.js +0 -14
package/dist/AquaApi.wasm
CHANGED
|
Binary file
|
package/dist/aqua-parser.wasm
CHANGED
|
Binary file
|
package/dist/core.d.ts
CHANGED
|
@@ -7,6 +7,28 @@ declare interface AttributeInfo extends EmbindObject {
|
|
|
7
7
|
readonly maxValue: { x: number; y: number; z: number };
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
export declare class AttributeNames {
|
|
11
|
+
static readonly SPARK_PACKED_SPLAT: string;
|
|
12
|
+
static readonly SPARK_EXTENDED_SPLAT_LOW: string;
|
|
13
|
+
static readonly SPARK_EXTENDED_SPLAT_HIGH: string;
|
|
14
|
+
static readonly SPARK_PACKED_SH1: string;
|
|
15
|
+
static readonly SPARK_PACKED_SH2: string;
|
|
16
|
+
static readonly SPARK_PACKED_SH3: string;
|
|
17
|
+
static readonly SPARK_EXTENDED_SH1: string;
|
|
18
|
+
static readonly SPARK_EXTENDED_SH2: string;
|
|
19
|
+
static readonly SPARK_EXTENDED_SH3_A: string;
|
|
20
|
+
static readonly SPARK_EXTENDED_SH3_B: string;
|
|
21
|
+
static readonly UNUSED: string;
|
|
22
|
+
static readonly SHARK_ELLIPSOIDS: string;
|
|
23
|
+
static readonly SHARK_SPHERICAL_HARMONICS: string;
|
|
24
|
+
static readonly OCTANT_OFFSETS: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare type CachedAttribute = {
|
|
28
|
+
paddedData: Uint32Array<ArrayBuffer>;
|
|
29
|
+
originalSizeInUints: number;
|
|
30
|
+
};
|
|
31
|
+
|
|
10
32
|
export declare class Camera {
|
|
11
33
|
#private;
|
|
12
34
|
readonly id: number;
|
|
@@ -43,7 +65,7 @@ export declare class Change {
|
|
|
43
65
|
}
|
|
44
66
|
|
|
45
67
|
export declare type ChangeInit = {
|
|
46
|
-
type: "created" | "activated" | "modified" | "deactivated" | "deleted";
|
|
68
|
+
type: "created" | "activated" | "modified" | "deactivated" | "deleted" | "remasked";
|
|
47
69
|
lod: Lod;
|
|
48
70
|
};
|
|
49
71
|
|
|
@@ -56,7 +78,6 @@ declare class Client {
|
|
|
56
78
|
constructor({ engine, context }: ClientInit);
|
|
57
79
|
dispose(): void;
|
|
58
80
|
addStreamById(...args: ClientMethodParameters["addStreamById"]): number;
|
|
59
|
-
addPrefetchStreamById(...args: ClientMethodParameters["addPrefetchStreamById"]): number;
|
|
60
81
|
destroyClient(...args: ClientMethodParameters["destroyClient"]): AquaStatus;
|
|
61
82
|
getAssetsAsync(...args: ClientMethodParameters["getAssetsAsync"]): AssetInfo[];
|
|
62
83
|
getAttribute(...args: ClientMethodParameters["getAttribute"]): AquaStatus;
|
|
@@ -70,6 +91,7 @@ declare class Client {
|
|
|
70
91
|
getSceneMetadata(...args: ClientMethodParameters["getSceneMetadata"]): number;
|
|
71
92
|
getSceneObjectParent(...args: ClientMethodParameters["getSceneObjectParent"]): number;
|
|
72
93
|
getSceneObjectType(...args: ClientMethodParameters["getSceneObjectType"]): SceneObjectType;
|
|
94
|
+
getDrawnOctantMask(...args: ClientMethodParameters["getDrawnOctantMask"]): number;
|
|
73
95
|
getLocalTransform(...args: ClientMethodParameters["getLocalTransform"]): AquaStatus;
|
|
74
96
|
getWorldTransform(...args: ClientMethodParameters["getWorldTransform"]): AquaStatus;
|
|
75
97
|
hasAttribute(...args: ClientMethodParameters["hasAttribute"]): boolean;
|
|
@@ -183,13 +205,6 @@ declare class Engine {
|
|
|
183
205
|
assetId: string,
|
|
184
206
|
doNotRefine: boolean
|
|
185
207
|
]): number;
|
|
186
|
-
addPrefetchStreamById(...args: [
|
|
187
|
-
handle: AquaClientHandle,
|
|
188
|
-
streamName: string,
|
|
189
|
-
assetId: string,
|
|
190
|
-
maxPrefetchDepth: number,
|
|
191
|
-
keepPrefetch: boolean
|
|
192
|
-
]): number;
|
|
193
208
|
allocateSceneChangesArrays(...args: [sceneChangeIds: SceneChangeIds]): void;
|
|
194
209
|
createContext(...args: []): AquaContextHandle;
|
|
195
210
|
destroyContext(...args: [handle: AquaContextHandle]): AquaStatus;
|
|
@@ -198,6 +213,8 @@ declare class Engine {
|
|
|
198
213
|
deletedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
199
214
|
dataPtrView(...args: [attributeInfo: AttributeInfo]): Uint32Array;
|
|
200
215
|
deactivatedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
216
|
+
remaskedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
217
|
+
getDrawnOctantMask(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
201
218
|
destroyClient(...args: [handle: AquaClientHandle]): AquaStatus;
|
|
202
219
|
free(...args: [size: number]): number;
|
|
203
220
|
getAssetsAsync(...args: [handle: AquaClientHandle, tags: StringVector]): AssetInfo[];
|
|
@@ -306,25 +323,9 @@ export declare class Lod {
|
|
|
306
323
|
#private;
|
|
307
324
|
readonly id: LodInit["id"];
|
|
308
325
|
readonly store: LodStore;
|
|
309
|
-
useExtSplats: boolean;
|
|
310
|
-
splatsExtendedData: Uint32Array<ArrayBuffer> | null;
|
|
311
|
-
sh1Data: Uint32Array<ArrayBuffer> | null;
|
|
312
|
-
sh1Max: number;
|
|
313
|
-
sh2Data: Uint32Array<ArrayBuffer> | null;
|
|
314
|
-
sh2Max: number;
|
|
315
|
-
sh3Data: Uint32Array<ArrayBuffer> | null;
|
|
316
|
-
sh3Max: number;
|
|
317
|
-
sh3ExtendedData: Uint32Array<ArrayBuffer> | null;
|
|
318
326
|
get key(): unknown;
|
|
319
327
|
set key(key: unknown);
|
|
320
328
|
readonly modelRoot: ModelRoot;
|
|
321
|
-
set splats(splats: Uint32Array<ArrayBuffer> | null);
|
|
322
|
-
get splats(): Uint32Array<ArrayBuffer> | null;
|
|
323
|
-
/**
|
|
324
|
-
* Sets the cached world bounds of this object
|
|
325
|
-
*
|
|
326
|
-
* @deprecated set the local bounds and transform as needed
|
|
327
|
-
*/
|
|
328
329
|
set bounds(bounds: Float32Array<ArrayBuffer> | null);
|
|
329
330
|
/**
|
|
330
331
|
* Retrieves the cached world bounds of this object
|
|
@@ -342,21 +343,26 @@ export declare class Lod {
|
|
|
342
343
|
get localBounds(): Float32Array<ArrayBuffer> | null;
|
|
343
344
|
set lodIndex(index: number);
|
|
344
345
|
get lodIndex(): number | null;
|
|
345
|
-
set
|
|
346
|
-
get
|
|
346
|
+
set paddingSplatsCount(count: number);
|
|
347
|
+
get paddingSplatsCount(): number;
|
|
347
348
|
set transform(transform: Float32Array<ArrayBuffer> | null);
|
|
348
349
|
get transform(): Float32Array<ArrayBuffer> | null;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
get _drawnOctantMask(): number;
|
|
351
|
+
set _drawnOctantMask(mask: number);
|
|
352
|
+
get _octantOffsets(): Uint32Array<ArrayBuffer> | null;
|
|
353
|
+
get _hasOctantOffsets(): boolean;
|
|
354
|
+
_readOctantOffsets(engine: Engine): void;
|
|
355
|
+
hasAttribute(attributeName: string): boolean;
|
|
356
|
+
getDataFromAttribute(engine: Engine, attributeName: string, attributeInfo: AttributeInfo): CachedAttribute | null;
|
|
352
357
|
dispose(): void;
|
|
353
|
-
constructor({ id, modelRoot, lodStore }: LodInit);
|
|
358
|
+
constructor({ id, modelRoot, lodStore, client }: LodInit);
|
|
354
359
|
}
|
|
355
360
|
|
|
356
361
|
export declare type LodInit = {
|
|
357
362
|
id: number;
|
|
358
363
|
modelRoot: ModelRoot;
|
|
359
364
|
lodStore: LodStore;
|
|
365
|
+
client: Client;
|
|
360
366
|
};
|
|
361
367
|
|
|
362
368
|
export declare class LodStore {
|
|
@@ -397,7 +403,9 @@ declare interface MainModule {
|
|
|
397
403
|
createdObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
398
404
|
dataPtrView(attributeInfo: AttributeInfo): Uint32Array;
|
|
399
405
|
deactivatedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
406
|
+
remaskedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
400
407
|
deletedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
408
|
+
GetDrawnOctantMask(handle: number, sceneObjectId: number): number;
|
|
401
409
|
GetAssetsAsync(handle: number, tags: StringVector): unknown[];
|
|
402
410
|
GetSceneChanges(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
403
411
|
GetSceneChangesCounts(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
@@ -425,6 +433,7 @@ declare interface MainModule {
|
|
|
425
433
|
*/
|
|
426
434
|
export declare class Miris {
|
|
427
435
|
#private;
|
|
436
|
+
static tryUseShark: boolean;
|
|
428
437
|
static _instance: Miris;
|
|
429
438
|
static instance<T extends typeof Miris>(this: T): Promise<InstanceType<T>>;
|
|
430
439
|
readonly engine: Engine;
|
|
@@ -511,7 +520,7 @@ export declare class Scene extends EventTarget {
|
|
|
511
520
|
readonly handle?: number;
|
|
512
521
|
constructor({ miris, viewerKey }: SceneInit);
|
|
513
522
|
dispose(): void;
|
|
514
|
-
/* Excluded from this release type:
|
|
523
|
+
/* Excluded from this release type: _getViewingVolumeObb */
|
|
515
524
|
fetchAssets(tags?: string | Iterable<string>): Promise<{
|
|
516
525
|
name: string;
|
|
517
526
|
thumbnailUrl: string;
|
|
@@ -537,6 +546,7 @@ declare interface SceneChangeIds extends EmbindObject {
|
|
|
537
546
|
readonly modifiedObjectsCount: number;
|
|
538
547
|
readonly deactivatedObjectsCount: number;
|
|
539
548
|
readonly deletedObjectsCount: number;
|
|
549
|
+
readonly remaskedObjectsCount: number;
|
|
540
550
|
}
|
|
541
551
|
|
|
542
552
|
export declare type SceneInit = {
|
|
@@ -548,6 +558,13 @@ declare interface SceneMetadata extends EmbindObject {
|
|
|
548
558
|
readonly inputColorSpace: string;
|
|
549
559
|
}
|
|
550
560
|
|
|
561
|
+
declare type SparkAttributeInfo = {
|
|
562
|
+
elementsPerSplat: number;
|
|
563
|
+
discard: boolean;
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
export declare const sparkAttributeList: Record<string, SparkAttributeInfo>;
|
|
567
|
+
|
|
551
568
|
declare interface SpatialFormat extends EmbindObject {
|
|
552
569
|
metersPerUnit: number;
|
|
553
570
|
upAxis: number;
|
|
@@ -575,6 +592,8 @@ export declare class Stream extends EventTarget {
|
|
|
575
592
|
set key(key: unknown);
|
|
576
593
|
get matrix(): Matrix4x4Tuple;
|
|
577
594
|
set matrix(matrix: Matrix4x4Tuple);
|
|
595
|
+
get opacity(): number;
|
|
596
|
+
set opacity(opacity: number);
|
|
578
597
|
get boundingBox(): {
|
|
579
598
|
min: {
|
|
580
599
|
x: number;
|
|
@@ -603,7 +622,7 @@ export declare class Stream extends EventTarget {
|
|
|
603
622
|
*/
|
|
604
623
|
get chunks(): Set<ModelRoot>;
|
|
605
624
|
constructor(options: StreamInit);
|
|
606
|
-
_initStream({ uuid
|
|
625
|
+
_initStream({ uuid }: StreamInit): void;
|
|
607
626
|
/* Excluded from this release type: _onStreamLoaded */
|
|
608
627
|
/* Excluded from this release type: _onRootLoaded */
|
|
609
628
|
add(modelRoot: ModelRoot): void;
|
|
@@ -615,13 +634,6 @@ export declare type StreamInit = {
|
|
|
615
634
|
scene: Scene;
|
|
616
635
|
authToken?: string;
|
|
617
636
|
drmKey?: string;
|
|
618
|
-
/** When true the stream runs in prefetch-only mode: it downloads and caches
|
|
619
|
-
* octree node data up to `prefetchMaxDepth` without rendering anything. */
|
|
620
|
-
prefetch?: boolean;
|
|
621
|
-
/** Maximum octree depth to prefetch. Set to -1 to disable prefetching. If omitted, defaults to 3 */
|
|
622
|
-
prefetchMaxDepth?: number;
|
|
623
|
-
/** Retain all prefetched data by the stream (make it non evictable) */
|
|
624
|
-
keepPrefetch?: boolean;
|
|
625
637
|
};
|
|
626
638
|
|
|
627
639
|
declare type StringVector = EmbindVector<string>;
|