@miris-inc/core 0.0.8-d72f09d → 0.0.8-d7fb73d
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 +27 -3
- package/dist/core.js +98 -18
- package/dist/core.prod.js +1 -1
- package/dist/core.standalone.js +400 -320
- package/dist/core.standalone.prod.js +1 -1
- package/package.json +1 -1
package/dist/AquaApi.wasm
CHANGED
|
Binary file
|
package/dist/aqua-parser.wasm
CHANGED
|
Binary file
|
package/dist/core.d.ts
CHANGED
|
@@ -20,7 +20,9 @@ export declare class AttributeNames {
|
|
|
20
20
|
static readonly SPARK_EXTENDED_SH3_B: string;
|
|
21
21
|
static readonly UNUSED: string;
|
|
22
22
|
static readonly SHARK_ELLIPSOIDS: string;
|
|
23
|
+
static readonly SHARK_ELLIPSOIDS_COMPRESSED: string;
|
|
23
24
|
static readonly SHARK_SPHERICAL_HARMONICS: string;
|
|
25
|
+
static readonly COLOR: string;
|
|
24
26
|
static readonly OCTANT_OFFSETS: string;
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -117,7 +119,6 @@ declare class Client {
|
|
|
117
119
|
takeRenderRequired(...args: ClientMethodParameters["takeRenderRequired"]): boolean;
|
|
118
120
|
unlockScene(...args: ClientMethodParameters["unlockScene"]): boolean;
|
|
119
121
|
updateSceneExecution(...args: ClientMethodParameters["updateSceneExecution"]): AquaStatus;
|
|
120
|
-
recordFrameTime(...args: ClientMethodParameters["recordFrameTime"]): AquaStatus;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
declare type ClientInit = {
|
|
@@ -288,6 +289,7 @@ declare class Engine {
|
|
|
288
289
|
viewportHeightPixels: number
|
|
289
290
|
]): AquaStatus;
|
|
290
291
|
setMaxCacheSize(...args: [maxSizeBytes: number]): void;
|
|
292
|
+
setPreferSharkEncodingProfiles(...args: [preferShark: boolean]): void;
|
|
291
293
|
setSceneObjectTransform(...args: [
|
|
292
294
|
handle: AquaClientHandle,
|
|
293
295
|
sceneObjectId: number,
|
|
@@ -308,8 +310,15 @@ declare class Engine {
|
|
|
308
310
|
getActiveClientSideIdsCheckSum(): number;
|
|
309
311
|
unlockScene(...args: [handle: AquaClientHandle]): boolean;
|
|
310
312
|
updateSceneExecution(...args: [handle: AquaClientHandle]): AquaStatus;
|
|
311
|
-
recordFrameTime(...args: [handle: AquaClientHandle, frameTimeMs: number]): AquaStatus;
|
|
312
313
|
takeRenderRequired(...args: [handle: AquaClientHandle]): boolean;
|
|
314
|
+
/**
|
|
315
|
+
* Advances the runtime by one frame and recomputes the streaming budget. Call once per
|
|
316
|
+
* displayed frame per context, before the per-client updateSceneExecution() calls.
|
|
317
|
+
* `previousFrameTimeMs` is how long the previous frame took; pass 0 when there is no plausible
|
|
318
|
+
* measurement (first frame, or a resume from a stall) and the frame advances without recording
|
|
319
|
+
* one.
|
|
320
|
+
*/
|
|
321
|
+
beginFrame(...args: [contextHandle: AquaContextHandle, previousFrameTimeMs: number]): AquaStatus;
|
|
313
322
|
createDeserializeWorker(_url: string, _workerUrl: string, poolSize: number): boolean;
|
|
314
323
|
cancelRequest(requestIdLow: number, requestIdHigh: number): boolean;
|
|
315
324
|
submitToWorker(requestIdLow: number, requestIdHigh: number, descriptorBuffer: ArrayBuffer, contextPtr: number): boolean;
|
|
@@ -423,8 +432,10 @@ declare interface MainModule {
|
|
|
423
432
|
TakeEvictedClientSideAttributeIds(handle: number): EmbindVector<bigint>;
|
|
424
433
|
GetActiveClientSideIdsCheckSum(): number;
|
|
425
434
|
TakeRenderRequired(handle: number): boolean;
|
|
435
|
+
BeginFrame(contextHandle: number, previousFrameTimeMs: number): number;
|
|
426
436
|
modifiedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
427
437
|
setMaxCacheSize(maxSizeBytes: number): void;
|
|
438
|
+
SetPreferSharkEncodingProfiles(prefer: boolean): void;
|
|
428
439
|
}
|
|
429
440
|
|
|
430
441
|
/**
|
|
@@ -461,13 +472,14 @@ export declare class Miris {
|
|
|
461
472
|
* Why 43? Because the AVP throttles down to 45Hz :(
|
|
462
473
|
*/
|
|
463
474
|
static readonly _XR_TARGET_FRAME_RATE = 43;
|
|
475
|
+
/* Excluded from this release type: _XR_SPLAT_COUNT_BUDGET */
|
|
464
476
|
/* Excluded from this release type: _setTargetFrameRate */
|
|
465
477
|
/* Excluded from this release type: _setXRModeActive */
|
|
466
478
|
/* Excluded from this release type: _setSplatCountBudgetOverride */
|
|
467
479
|
/* Excluded from this release type: _update */
|
|
468
480
|
getLocalTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
469
481
|
getWorldTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
470
|
-
|
|
482
|
+
/* Excluded from this release type: _updateForScene */
|
|
471
483
|
applyChanges(_entries: Change[]): void;
|
|
472
484
|
_computeAdditionalRenderNeeded(): boolean;
|
|
473
485
|
onColorSpaceDetected(_isLinear: boolean): void;
|
|
@@ -524,6 +536,18 @@ export declare class Scene extends EventTarget {
|
|
|
524
536
|
readonly client: Client;
|
|
525
537
|
readonly handle?: number;
|
|
526
538
|
constructor({ miris, viewerKey }: SceneInit);
|
|
539
|
+
/**
|
|
540
|
+
* Drives a frame and answers whether *this* scene's canvas needs repainting. Call it once per
|
|
541
|
+
* displayed frame from the host's animation loop, and render when it returns true.
|
|
542
|
+
*
|
|
543
|
+
* Every scene on the page calls this from its own loop. The first call in a displayed frame
|
|
544
|
+
* drives one engine tick for all of them; the rest recognise the frame and reuse it.
|
|
545
|
+
*
|
|
546
|
+
* @param ts the host's frame timestamp. Optional - the document timeline supplies one, and it
|
|
547
|
+
* reads the same for every scene in a displayed frame. Pass it when the host runs its own
|
|
548
|
+
* clock, as an immersive XR session does, because XRFrame time is not the document timeline.
|
|
549
|
+
*/
|
|
550
|
+
update(ts?: DOMHighResTimeStamp): boolean;
|
|
527
551
|
dispose(): void;
|
|
528
552
|
/* Excluded from this release type: _getViewingVolumeObb */
|
|
529
553
|
fetchAssets(tags?: string | Iterable<string>): Promise<{
|