@miris-inc/core 0.0.8-5fc4d15 → 0.0.8-61fda5c
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 +94 -6
- package/dist/core.js +231 -68
- package/dist/core.prod.js +1 -1
- package/dist/core.standalone.js +593 -412
- package/dist/core.standalone.prod.js +1 -1
- package/{webshark.d.ts → dist/webshark.d.ts} +86 -6
- package/dist/webshark.js +2 -0
- package/dist/webshark.wasm +0 -0
- package/package.json +3 -6
package/dist/AquaApi.wasm
CHANGED
|
Binary file
|
package/dist/aqua-parser.wasm
CHANGED
|
Binary file
|
package/dist/core.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ declare interface AttributeInfo extends EmbindObject {
|
|
|
9
9
|
readonly elementCount: number;
|
|
10
10
|
readonly dataSizeBytes: number;
|
|
11
11
|
readonly clientSideId: bigint;
|
|
12
|
-
|
|
12
|
+
// An embind CompressionType value, compared by identity against MainModule.CompressionType
|
|
13
|
+
readonly compressionType: unknown;
|
|
14
|
+
readonly minValue: { x: number; y: number; z: number; w: number };
|
|
13
15
|
readonly maxValue: { x: number; y: number; z: number };
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -32,7 +34,12 @@ export declare class AttributeNames {
|
|
|
32
34
|
static readonly OCTANT_OFFSETS: string;
|
|
33
35
|
static readonly SURFEL_OCTANT_OFFSETS: string;
|
|
34
36
|
static readonly SURFEL_COUNT: string;
|
|
37
|
+
static readonly SURFEL_OWNER_GROUPS: string;
|
|
38
|
+
static readonly OCTANT_CELL: string;
|
|
35
39
|
static readonly REFLECTANCE_DATA_V1: string;
|
|
40
|
+
static readonly REFLECTANCE_DATA_V2: string;
|
|
41
|
+
static readonly GLASS_MESH_GEOMETRY: string;
|
|
42
|
+
static readonly GLASS_MESH_PANELS: string;
|
|
36
43
|
static readonly MOD_DEPTH: string;
|
|
37
44
|
}
|
|
38
45
|
|
|
@@ -106,7 +113,9 @@ declare class Client {
|
|
|
106
113
|
getSceneMetadata(...args: ClientMethodParameters["getSceneMetadata"]): number;
|
|
107
114
|
getSceneObjectParent(...args: ClientMethodParameters["getSceneObjectParent"]): number;
|
|
108
115
|
getSceneObjectType(...args: ClientMethodParameters["getSceneObjectType"]): SceneObjectType;
|
|
116
|
+
getStreamStatus(...args: ClientMethodParameters["getStreamStatus"]): StreamStatus;
|
|
109
117
|
getDrawnOctantMask(...args: ClientMethodParameters["getDrawnOctantMask"]): number;
|
|
118
|
+
getOctantLocalBoundingBoxes(...args: ClientMethodParameters["getOctantLocalBoundingBoxes"]): number[];
|
|
110
119
|
getLocalTransform(...args: ClientMethodParameters["getLocalTransform"]): AquaStatus;
|
|
111
120
|
getWorldTransform(...args: ClientMethodParameters["getWorldTransform"]): AquaStatus;
|
|
112
121
|
hasAttribute(...args: ClientMethodParameters["hasAttribute"]): boolean;
|
|
@@ -189,11 +198,23 @@ declare class Engine {
|
|
|
189
198
|
readonly Loaded: 2;
|
|
190
199
|
readonly Failed: 3;
|
|
191
200
|
};
|
|
201
|
+
static StreamStatus: {
|
|
202
|
+
readonly Unknown: 0;
|
|
203
|
+
readonly Resolving: 1;
|
|
204
|
+
readonly Loading: 2;
|
|
205
|
+
readonly Ready: 3;
|
|
206
|
+
readonly Failed: 4;
|
|
207
|
+
};
|
|
192
208
|
readonly ready: Promise<this>;
|
|
193
209
|
readonly pending: boolean;
|
|
194
210
|
get module(): MainModule;
|
|
195
211
|
constructor(moduleOptions?: Record<string, unknown>);
|
|
196
212
|
get AttributeInfo(): new () => AttributeInfo;
|
|
213
|
+
get CompressionType(): {
|
|
214
|
+
SHARK_ELLIPSOID_COMPRESSED: unknown;
|
|
215
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE: unknown;
|
|
216
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE_V2: unknown;
|
|
217
|
+
};
|
|
197
218
|
get Handedness(): {
|
|
198
219
|
Right: number;
|
|
199
220
|
Left: number;
|
|
@@ -214,6 +235,7 @@ declare class Engine {
|
|
|
214
235
|
Y: number;
|
|
215
236
|
Z: number;
|
|
216
237
|
};
|
|
238
|
+
get UsePadding(): boolean;
|
|
217
239
|
activatedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
218
240
|
addStreamById(...args: [
|
|
219
241
|
handle: AquaClientHandle,
|
|
@@ -231,6 +253,7 @@ declare class Engine {
|
|
|
231
253
|
deactivatedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
232
254
|
remaskedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
233
255
|
getDrawnOctantMask(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
256
|
+
getOctantLocalBoundingBoxes(...args: [handle: AquaClientHandle, sceneObjectId: number]): number[];
|
|
234
257
|
destroyClient(...args: [handle: AquaClientHandle]): AquaStatus;
|
|
235
258
|
free(...args: [size: number]): number;
|
|
236
259
|
getAssetsAsync(...args: [handle: AquaClientHandle, tags: StringVector]): AssetInfo[];
|
|
@@ -249,6 +272,7 @@ declare class Engine {
|
|
|
249
272
|
getSceneChangesCounts(...args: [handle: AquaClientHandle, sceneChangeIds: SceneChangeIds]): void;
|
|
250
273
|
getSceneMetadata(...args: [handle: AquaClientHandle, metadata: SceneMetadata]): number;
|
|
251
274
|
getSceneObjectParent(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
275
|
+
getStreamStatus(...args: [handle: AquaClientHandle, streamObjectId: number]): StreamStatus;
|
|
252
276
|
getSceneObjectType(...args: [handle: AquaClientHandle, sceneObjectId: number]): SceneObjectType;
|
|
253
277
|
getLocalTransform(...args: [
|
|
254
278
|
handle: AquaClientHandle,
|
|
@@ -302,6 +326,7 @@ declare class Engine {
|
|
|
302
326
|
]): AquaStatus;
|
|
303
327
|
setMaxCacheSize(...args: [maxSizeBytes: number]): void;
|
|
304
328
|
setPreferSharkEncodingProfiles(...args: [preferShark: boolean]): void;
|
|
329
|
+
setPadSplatAttributes(usePadding: boolean): void;
|
|
305
330
|
setSceneObjectTransform(...args: [
|
|
306
331
|
handle: AquaClientHandle,
|
|
307
332
|
sceneObjectId: number,
|
|
@@ -330,9 +355,16 @@ declare class Engine {
|
|
|
330
355
|
* displayed frame per context, before the per-client updateSceneExecution() calls.
|
|
331
356
|
* `previousFrameTimeMs` is how long the previous frame took; pass 0 when there is no plausible
|
|
332
357
|
* measurement (first frame, or a resume from a stall) and the frame advances without recording
|
|
333
|
-
*
|
|
358
|
+
* `primsResident` is what the renderer held at the end of the previous frame, fading
|
|
359
|
+
* prims included, and `primCapacity` what it can hold; activations that would not fit are
|
|
360
|
+
* deferred, where primCapacity 0 means deferral is disabled.
|
|
334
361
|
*/
|
|
335
|
-
beginFrame(...args: [
|
|
362
|
+
beginFrame(...args: [
|
|
363
|
+
contextHandle: AquaContextHandle,
|
|
364
|
+
previousFrameTimeMs: number,
|
|
365
|
+
primsResident: number,
|
|
366
|
+
primCapacity: number
|
|
367
|
+
]): AquaStatus;
|
|
336
368
|
createDeserializeWorker(_url: string, _workerUrl: string, poolSize: number): boolean;
|
|
337
369
|
cancelRequest(requestIdLow: number, requestIdHigh: number): boolean;
|
|
338
370
|
submitToWorker(requestIdLow: number, requestIdHigh: number, descriptorBuffer: ArrayBuffer, contextPtr: number): boolean;
|
|
@@ -346,6 +378,12 @@ declare type EngineMethodParameters<E extends Engine = Engine> = {
|
|
|
346
378
|
[Key in keyof E]: E[Key] extends (...args: any[]) => any ? Parameters<E[Key]> : never;
|
|
347
379
|
};
|
|
348
380
|
|
|
381
|
+
export declare const HaveData = 2;
|
|
382
|
+
|
|
383
|
+
export declare const HaveMetadata = 1;
|
|
384
|
+
|
|
385
|
+
export declare const HaveNothing = 0;
|
|
386
|
+
|
|
349
387
|
export declare class Lod {
|
|
350
388
|
#private;
|
|
351
389
|
readonly id: LodInit["id"];
|
|
@@ -376,14 +414,19 @@ export declare class Lod {
|
|
|
376
414
|
get transform(): Float32Array<ArrayBuffer> | null;
|
|
377
415
|
get _drawnOctantMask(): number;
|
|
378
416
|
set _drawnOctantMask(mask: number);
|
|
417
|
+
get _octantLocalBounds(): Float32Array<ArrayBuffer> | null;
|
|
418
|
+
set _octantLocalBounds(bounds: Float32Array<ArrayBuffer> | null);
|
|
379
419
|
get _octantOffsets(): Uint32Array<ArrayBuffer> | null;
|
|
380
420
|
get _hasOctantOffsets(): boolean;
|
|
381
421
|
get _surfelOctantOffsets(): Uint32Array<ArrayBuffer> | null;
|
|
382
422
|
get _surfelCount(): number;
|
|
423
|
+
get _surfelOwnerGroups(): Uint32Array<ArrayBuffer> | null;
|
|
424
|
+
get _octantCell(): Uint32Array<ArrayBuffer> | null;
|
|
383
425
|
_readOctantOffsets(engine: Engine): void;
|
|
384
426
|
hasAttribute(attributeName: string): boolean;
|
|
385
427
|
getDataFromAttribute(engine: Engine, attributeName: string, attributeInfo: AttributeInfo): CachedAttribute | null;
|
|
386
428
|
_getRawByteAttribute(engine: Engine, attributeName: string): Uint8Array<ArrayBuffer> | null;
|
|
429
|
+
_getRawByteAttributeWithBounds(engine: Engine, attributeName: string): RawByteAttributeWithBounds | null;
|
|
387
430
|
dispose(): void;
|
|
388
431
|
constructor({ id, modelRoot, lodStore, client }: LodInit);
|
|
389
432
|
}
|
|
@@ -408,6 +451,11 @@ export declare class LodStore {
|
|
|
408
451
|
|
|
409
452
|
declare interface MainModule {
|
|
410
453
|
AttributeInfo: new () => AttributeInfo;
|
|
454
|
+
CompressionType: {
|
|
455
|
+
SHARK_ELLIPSOID_COMPRESSED: unknown;
|
|
456
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE: unknown;
|
|
457
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE_V2: unknown;
|
|
458
|
+
};
|
|
411
459
|
Handedness: { Right: number; Left: number };
|
|
412
460
|
HEAPF32: Float32Array<ArrayBuffer>;
|
|
413
461
|
HEAPU8: Uint8Array<ArrayBuffer>;
|
|
@@ -436,6 +484,7 @@ declare interface MainModule {
|
|
|
436
484
|
remaskedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
437
485
|
deletedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
438
486
|
GetDrawnOctantMask(handle: number, sceneObjectId: number): number;
|
|
487
|
+
GetOctantLocalBoundingBoxes(handle: number, sceneObjectId: number): number[];
|
|
439
488
|
GetAssetsAsync(handle: number, tags: StringVector): unknown[];
|
|
440
489
|
GetSceneChanges(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
441
490
|
GetSceneChangesCounts(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
@@ -451,7 +500,12 @@ declare interface MainModule {
|
|
|
451
500
|
TakeEvictedClientSideAttributeIds(handle: number): EmbindVector<bigint>;
|
|
452
501
|
GetActiveClientSideIdsCheckSum(): number;
|
|
453
502
|
TakeRenderRequired(handle: number): boolean;
|
|
454
|
-
BeginFrame(
|
|
503
|
+
BeginFrame(
|
|
504
|
+
contextHandle: number,
|
|
505
|
+
previousFrameTimeMs: number,
|
|
506
|
+
primsResident: number,
|
|
507
|
+
primCapacity: number,
|
|
508
|
+
): number;
|
|
455
509
|
modifiedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
456
510
|
setMaxCacheSize(maxSizeBytes: number): void;
|
|
457
511
|
SetPreferSharkEncodingProfiles(prefer: boolean): void;
|
|
@@ -493,15 +547,20 @@ export declare class Miris {
|
|
|
493
547
|
static readonly _XR_TARGET_FRAME_RATE = 43;
|
|
494
548
|
/* Excluded from this release type: _XR_SPLAT_COUNT_BUDGET */
|
|
495
549
|
/* Excluded from this release type: _SHARK_SPLAT_CAPACITY_MOBILE */
|
|
496
|
-
static readonly _SHARK_SPLAT_CAPACITY_DESKTOP
|
|
550
|
+
static readonly _SHARK_SPLAT_CAPACITY_DESKTOP: number;
|
|
497
551
|
/* Excluded from this release type: _SHARK_SPLAT_BUDGET_CAP_MOBILE */
|
|
498
|
-
static readonly _SHARK_SPLAT_BUDGET_CAP_DESKTOP =
|
|
552
|
+
static readonly _SHARK_SPLAT_BUDGET_CAP_DESKTOP = 2400000;
|
|
499
553
|
/* Excluded from this release type: _isMobileDevice */
|
|
500
554
|
/* Excluded from this release type: _sharkSplatCapacity */
|
|
555
|
+
/* Excluded from this release type: _minimumSplatCount */
|
|
556
|
+
/* Excluded from this release type: _splatCountStorageKey */
|
|
557
|
+
/* Excluded from this release type: _reloadWithLowerSplatCapacity */
|
|
558
|
+
/* Excluded from this release type: _limitSharkSplatCapacity */
|
|
501
559
|
/* Excluded from this release type: _sharkSplatBudgetCap */
|
|
502
560
|
/* Excluded from this release type: _setTargetFrameRate */
|
|
503
561
|
/* Excluded from this release type: _setXRModeActive */
|
|
504
562
|
/* Excluded from this release type: _setSplatCountBudgetOverride */
|
|
563
|
+
/* Excluded from this release type: _reportRendererPrims */
|
|
505
564
|
/* Excluded from this release type: _update */
|
|
506
565
|
getLocalTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
507
566
|
getWorldTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
@@ -534,6 +593,31 @@ export declare type ModelRootInit = {
|
|
|
534
593
|
stream: Stream;
|
|
535
594
|
};
|
|
536
595
|
|
|
596
|
+
/**
|
|
597
|
+
* The byte-exact counterpart of getRawUint32Attribute above: same no-padding, no-takeAttribute
|
|
598
|
+
* contract, returning bytes rather than words.
|
|
599
|
+
*
|
|
600
|
+
* Use this rather than that one wherever the stride is not a whole number of words: the
|
|
601
|
+
* reflectance records' 18- and 26-byte strides are not, and an odd record count would lose that
|
|
602
|
+
* record's last field to dataPtrView's truncation.
|
|
603
|
+
*/
|
|
604
|
+
export declare type RawByteAttributeWithBounds = {
|
|
605
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
606
|
+
minValue: {
|
|
607
|
+
x: number;
|
|
608
|
+
y: number;
|
|
609
|
+
z: number;
|
|
610
|
+
};
|
|
611
|
+
maxValue: {
|
|
612
|
+
x: number;
|
|
613
|
+
y: number;
|
|
614
|
+
z: number;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
declare type ReadyState_2 = typeof HaveNothing | typeof HaveMetadata | typeof HaveData;
|
|
619
|
+
export { ReadyState_2 as ReadyState }
|
|
620
|
+
|
|
537
621
|
declare type RequestAnimationFrameFn = ((callback: FrameRequestCallback) => number) | ((callback: XRFrameRequestCallback) => void);
|
|
538
622
|
|
|
539
623
|
declare interface RuntimeSettings extends EmbindObject {
|
|
@@ -592,6 +676,7 @@ export declare class Scene extends EventTarget {
|
|
|
592
676
|
/* Excluded from this release type: _getDrMap */
|
|
593
677
|
/* Excluded from this release type: _onDrMapLadder */
|
|
594
678
|
/* Excluded from this release type: _onFeatureData */
|
|
679
|
+
/* Excluded from this release type: _updateStreamStatuses */
|
|
595
680
|
/* Excluded from this release type: _onSceneLoaded */
|
|
596
681
|
delete(stream: Stream): void;
|
|
597
682
|
close(): void;
|
|
@@ -683,6 +768,9 @@ export declare class Stream extends EventTarget {
|
|
|
683
768
|
/* Excluded from this release type: _onStreamLoaded */
|
|
684
769
|
getDefaultCameraTransform(): Float32Array<ArrayBuffer> | null | undefined;
|
|
685
770
|
/* Excluded from this release type: _getViewingVolumeObb */
|
|
771
|
+
/** How much of the stream has loaded, as of the last frame. */
|
|
772
|
+
get readyState(): ReadyState_2;
|
|
773
|
+
/* Excluded from this release type: _updateStatus */
|
|
686
774
|
/* Excluded from this release type: _onRootLoaded */
|
|
687
775
|
add(modelRoot: ModelRoot): void;
|
|
688
776
|
end(): void;
|