@miris-inc/core 0.0.8-37fe19a → 0.0.8-387b04a
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 +61 -42
- package/dist/core.js +2142 -2465
- package/dist/core.prod.js +1 -1
- package/dist/core.standalone.js +5785 -5445
- 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,10 +7,36 @@ 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_ELLIPSOIDS_COMPRESSED: string;
|
|
24
|
+
static readonly SHARK_SPHERICAL_HARMONICS: string;
|
|
25
|
+
static readonly COLOR: string;
|
|
26
|
+
static readonly OCTANT_OFFSETS: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare type CachedAttribute = {
|
|
30
|
+
paddedData: Uint32Array<ArrayBuffer>;
|
|
31
|
+
originalSizeInUints: number;
|
|
32
|
+
};
|
|
33
|
+
|
|
10
34
|
export declare class Camera {
|
|
11
35
|
#private;
|
|
12
36
|
readonly id: number;
|
|
13
37
|
update(): void;
|
|
38
|
+
get viewportHeight(): number;
|
|
39
|
+
set viewportHeight(viewportHeight: number);
|
|
14
40
|
get aspect(): number;
|
|
15
41
|
set aspect(aspect: number);
|
|
16
42
|
get fov(): number;
|
|
@@ -24,7 +50,7 @@ export declare class Camera {
|
|
|
24
50
|
readonly engine: Engine;
|
|
25
51
|
readonly miris: Miris;
|
|
26
52
|
readonly scene: Scene;
|
|
27
|
-
constructor({ aspect, fov, near, far, matrix, scene }: CameraInit);
|
|
53
|
+
constructor({ aspect, fov, near, far, matrix, scene, viewportHeight, }: CameraInit);
|
|
28
54
|
}
|
|
29
55
|
|
|
30
56
|
export declare type CameraInit = {
|
|
@@ -34,6 +60,7 @@ export declare type CameraInit = {
|
|
|
34
60
|
far: number;
|
|
35
61
|
matrix: Matrix4x4Tuple;
|
|
36
62
|
scene: Scene;
|
|
63
|
+
viewportHeight?: number;
|
|
37
64
|
};
|
|
38
65
|
|
|
39
66
|
export declare class Change {
|
|
@@ -43,7 +70,7 @@ export declare class Change {
|
|
|
43
70
|
}
|
|
44
71
|
|
|
45
72
|
export declare type ChangeInit = {
|
|
46
|
-
type: "created" | "activated" | "modified" | "deactivated" | "deleted";
|
|
73
|
+
type: "created" | "activated" | "modified" | "deactivated" | "deleted" | "remasked";
|
|
47
74
|
lod: Lod;
|
|
48
75
|
};
|
|
49
76
|
|
|
@@ -56,7 +83,6 @@ declare class Client {
|
|
|
56
83
|
constructor({ engine, context }: ClientInit);
|
|
57
84
|
dispose(): void;
|
|
58
85
|
addStreamById(...args: ClientMethodParameters["addStreamById"]): number;
|
|
59
|
-
addPrefetchStreamById(...args: ClientMethodParameters["addPrefetchStreamById"]): number;
|
|
60
86
|
destroyClient(...args: ClientMethodParameters["destroyClient"]): AquaStatus;
|
|
61
87
|
getAssetsAsync(...args: ClientMethodParameters["getAssetsAsync"]): AssetInfo[];
|
|
62
88
|
getAttribute(...args: ClientMethodParameters["getAttribute"]): AquaStatus;
|
|
@@ -70,6 +96,7 @@ declare class Client {
|
|
|
70
96
|
getSceneMetadata(...args: ClientMethodParameters["getSceneMetadata"]): number;
|
|
71
97
|
getSceneObjectParent(...args: ClientMethodParameters["getSceneObjectParent"]): number;
|
|
72
98
|
getSceneObjectType(...args: ClientMethodParameters["getSceneObjectType"]): SceneObjectType;
|
|
99
|
+
getDrawnOctantMask(...args: ClientMethodParameters["getDrawnOctantMask"]): number;
|
|
73
100
|
getLocalTransform(...args: ClientMethodParameters["getLocalTransform"]): AquaStatus;
|
|
74
101
|
getWorldTransform(...args: ClientMethodParameters["getWorldTransform"]): AquaStatus;
|
|
75
102
|
hasAttribute(...args: ClientMethodParameters["hasAttribute"]): boolean;
|
|
@@ -183,13 +210,6 @@ declare class Engine {
|
|
|
183
210
|
assetId: string,
|
|
184
211
|
doNotRefine: boolean
|
|
185
212
|
]): number;
|
|
186
|
-
addPrefetchStreamById(...args: [
|
|
187
|
-
handle: AquaClientHandle,
|
|
188
|
-
streamName: string,
|
|
189
|
-
assetId: string,
|
|
190
|
-
maxPrefetchDepth: number,
|
|
191
|
-
keepPrefetch: boolean
|
|
192
|
-
]): number;
|
|
193
213
|
allocateSceneChangesArrays(...args: [sceneChangeIds: SceneChangeIds]): void;
|
|
194
214
|
createContext(...args: []): AquaContextHandle;
|
|
195
215
|
destroyContext(...args: [handle: AquaContextHandle]): AquaStatus;
|
|
@@ -198,6 +218,8 @@ declare class Engine {
|
|
|
198
218
|
deletedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
199
219
|
dataPtrView(...args: [attributeInfo: AttributeInfo]): Uint32Array;
|
|
200
220
|
deactivatedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
221
|
+
remaskedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
222
|
+
getDrawnOctantMask(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
201
223
|
destroyClient(...args: [handle: AquaClientHandle]): AquaStatus;
|
|
202
224
|
free(...args: [size: number]): number;
|
|
203
225
|
getAssetsAsync(...args: [handle: AquaClientHandle, tags: StringVector]): AssetInfo[];
|
|
@@ -264,7 +286,8 @@ declare class Engine {
|
|
|
264
286
|
aspectRatio: number,
|
|
265
287
|
verticalFov: number,
|
|
266
288
|
nearPlane: number,
|
|
267
|
-
farPlane: number
|
|
289
|
+
farPlane: number,
|
|
290
|
+
viewportHeightPixels: number
|
|
268
291
|
]): AquaStatus;
|
|
269
292
|
setMaxCacheSize(...args: [maxSizeBytes: number]): void;
|
|
270
293
|
setSceneObjectTransform(...args: [
|
|
@@ -306,25 +329,9 @@ export declare class Lod {
|
|
|
306
329
|
#private;
|
|
307
330
|
readonly id: LodInit["id"];
|
|
308
331
|
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
332
|
get key(): unknown;
|
|
319
333
|
set key(key: unknown);
|
|
320
334
|
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
335
|
set bounds(bounds: Float32Array<ArrayBuffer> | null);
|
|
329
336
|
/**
|
|
330
337
|
* Retrieves the cached world bounds of this object
|
|
@@ -342,21 +349,26 @@ export declare class Lod {
|
|
|
342
349
|
get localBounds(): Float32Array<ArrayBuffer> | null;
|
|
343
350
|
set lodIndex(index: number);
|
|
344
351
|
get lodIndex(): number | null;
|
|
345
|
-
set
|
|
346
|
-
get
|
|
352
|
+
set paddingSplatsCount(count: number);
|
|
353
|
+
get paddingSplatsCount(): number;
|
|
347
354
|
set transform(transform: Float32Array<ArrayBuffer> | null);
|
|
348
355
|
get transform(): Float32Array<ArrayBuffer> | null;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
356
|
+
get _drawnOctantMask(): number;
|
|
357
|
+
set _drawnOctantMask(mask: number);
|
|
358
|
+
get _octantOffsets(): Uint32Array<ArrayBuffer> | null;
|
|
359
|
+
get _hasOctantOffsets(): boolean;
|
|
360
|
+
_readOctantOffsets(engine: Engine): void;
|
|
361
|
+
hasAttribute(attributeName: string): boolean;
|
|
362
|
+
getDataFromAttribute(engine: Engine, attributeName: string, attributeInfo: AttributeInfo): CachedAttribute | null;
|
|
352
363
|
dispose(): void;
|
|
353
|
-
constructor({ id, modelRoot, lodStore }: LodInit);
|
|
364
|
+
constructor({ id, modelRoot, lodStore, client }: LodInit);
|
|
354
365
|
}
|
|
355
366
|
|
|
356
367
|
export declare type LodInit = {
|
|
357
368
|
id: number;
|
|
358
369
|
modelRoot: ModelRoot;
|
|
359
370
|
lodStore: LodStore;
|
|
371
|
+
client: Client;
|
|
360
372
|
};
|
|
361
373
|
|
|
362
374
|
export declare class LodStore {
|
|
@@ -397,7 +409,9 @@ declare interface MainModule {
|
|
|
397
409
|
createdObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
398
410
|
dataPtrView(attributeInfo: AttributeInfo): Uint32Array;
|
|
399
411
|
deactivatedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
412
|
+
remaskedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
400
413
|
deletedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
414
|
+
GetDrawnOctantMask(handle: number, sceneObjectId: number): number;
|
|
401
415
|
GetAssetsAsync(handle: number, tags: StringVector): unknown[];
|
|
402
416
|
GetSceneChanges(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
403
417
|
GetSceneChangesCounts(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
@@ -425,6 +439,7 @@ declare interface MainModule {
|
|
|
425
439
|
*/
|
|
426
440
|
export declare class Miris {
|
|
427
441
|
#private;
|
|
442
|
+
static tryUseShark: boolean;
|
|
428
443
|
static _instance: Miris;
|
|
429
444
|
static instance<T extends typeof Miris>(this: T): Promise<InstanceType<T>>;
|
|
430
445
|
readonly engine: Engine;
|
|
@@ -443,6 +458,7 @@ export declare class Miris {
|
|
|
443
458
|
protected _xrSession: XRSession | null;
|
|
444
459
|
protected _requestAnimationFrame: RequestAnimationFrameFn | null;
|
|
445
460
|
signalResumeFromIdle(): void;
|
|
461
|
+
get _splatCountBudget(): number;
|
|
446
462
|
/**
|
|
447
463
|
* Why 43? Because the AVP throttles down to 45Hz :(
|
|
448
464
|
*/
|
|
@@ -511,7 +527,7 @@ export declare class Scene extends EventTarget {
|
|
|
511
527
|
readonly handle?: number;
|
|
512
528
|
constructor({ miris, viewerKey }: SceneInit);
|
|
513
529
|
dispose(): void;
|
|
514
|
-
/* Excluded from this release type:
|
|
530
|
+
/* Excluded from this release type: _getViewingVolumeObb */
|
|
515
531
|
fetchAssets(tags?: string | Iterable<string>): Promise<{
|
|
516
532
|
name: string;
|
|
517
533
|
thumbnailUrl: string;
|
|
@@ -537,6 +553,7 @@ declare interface SceneChangeIds extends EmbindObject {
|
|
|
537
553
|
readonly modifiedObjectsCount: number;
|
|
538
554
|
readonly deactivatedObjectsCount: number;
|
|
539
555
|
readonly deletedObjectsCount: number;
|
|
556
|
+
readonly remaskedObjectsCount: number;
|
|
540
557
|
}
|
|
541
558
|
|
|
542
559
|
export declare type SceneInit = {
|
|
@@ -548,6 +565,13 @@ declare interface SceneMetadata extends EmbindObject {
|
|
|
548
565
|
readonly inputColorSpace: string;
|
|
549
566
|
}
|
|
550
567
|
|
|
568
|
+
declare type SparkAttributeInfo = {
|
|
569
|
+
elementsPerSplat: number;
|
|
570
|
+
discard: boolean;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
export declare const sparkAttributeList: Record<string, SparkAttributeInfo>;
|
|
574
|
+
|
|
551
575
|
declare interface SpatialFormat extends EmbindObject {
|
|
552
576
|
metersPerUnit: number;
|
|
553
577
|
upAxis: number;
|
|
@@ -575,6 +599,8 @@ export declare class Stream extends EventTarget {
|
|
|
575
599
|
set key(key: unknown);
|
|
576
600
|
get matrix(): Matrix4x4Tuple;
|
|
577
601
|
set matrix(matrix: Matrix4x4Tuple);
|
|
602
|
+
get opacity(): number;
|
|
603
|
+
set opacity(opacity: number);
|
|
578
604
|
get boundingBox(): {
|
|
579
605
|
min: {
|
|
580
606
|
x: number;
|
|
@@ -603,7 +629,7 @@ export declare class Stream extends EventTarget {
|
|
|
603
629
|
*/
|
|
604
630
|
get chunks(): Set<ModelRoot>;
|
|
605
631
|
constructor(options: StreamInit);
|
|
606
|
-
_initStream({ uuid
|
|
632
|
+
_initStream({ uuid }: StreamInit): void;
|
|
607
633
|
/* Excluded from this release type: _onStreamLoaded */
|
|
608
634
|
/* Excluded from this release type: _onRootLoaded */
|
|
609
635
|
add(modelRoot: ModelRoot): void;
|
|
@@ -615,13 +641,6 @@ export declare type StreamInit = {
|
|
|
615
641
|
scene: Scene;
|
|
616
642
|
authToken?: string;
|
|
617
643
|
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
644
|
};
|
|
626
645
|
|
|
627
646
|
declare type StringVector = EmbindVector<string>;
|