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