@miris-inc/core 0.0.8-9c5b021 → 0.0.8-9c67bb6
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 +24 -3
- package/dist/core.js +89 -17
- package/dist/core.prod.js +1 -1
- package/dist/core.standalone.js +391 -319
- 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 = {
|
|
@@ -308,8 +309,15 @@ declare class Engine {
|
|
|
308
309
|
getActiveClientSideIdsCheckSum(): number;
|
|
309
310
|
unlockScene(...args: [handle: AquaClientHandle]): boolean;
|
|
310
311
|
updateSceneExecution(...args: [handle: AquaClientHandle]): AquaStatus;
|
|
311
|
-
recordFrameTime(...args: [handle: AquaClientHandle, frameTimeMs: number]): AquaStatus;
|
|
312
312
|
takeRenderRequired(...args: [handle: AquaClientHandle]): boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Advances the runtime by one frame and recomputes the streaming budget. Call once per
|
|
315
|
+
* displayed frame per context, before the per-client updateSceneExecution() calls.
|
|
316
|
+
* `previousFrameTimeMs` is how long the previous frame took; pass 0 when there is no plausible
|
|
317
|
+
* measurement (first frame, or a resume from a stall) and the frame advances without recording
|
|
318
|
+
* one.
|
|
319
|
+
*/
|
|
320
|
+
beginFrame(...args: [contextHandle: AquaContextHandle, previousFrameTimeMs: number]): AquaStatus;
|
|
313
321
|
createDeserializeWorker(_url: string, _workerUrl: string, poolSize: number): boolean;
|
|
314
322
|
cancelRequest(requestIdLow: number, requestIdHigh: number): boolean;
|
|
315
323
|
submitToWorker(requestIdLow: number, requestIdHigh: number, descriptorBuffer: ArrayBuffer, contextPtr: number): boolean;
|
|
@@ -423,6 +431,7 @@ declare interface MainModule {
|
|
|
423
431
|
TakeEvictedClientSideAttributeIds(handle: number): EmbindVector<bigint>;
|
|
424
432
|
GetActiveClientSideIdsCheckSum(): number;
|
|
425
433
|
TakeRenderRequired(handle: number): boolean;
|
|
434
|
+
BeginFrame(contextHandle: number, previousFrameTimeMs: number): number;
|
|
426
435
|
modifiedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
427
436
|
setMaxCacheSize(maxSizeBytes: number): void;
|
|
428
437
|
}
|
|
@@ -467,7 +476,7 @@ export declare class Miris {
|
|
|
467
476
|
/* Excluded from this release type: _update */
|
|
468
477
|
getLocalTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
469
478
|
getWorldTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
470
|
-
|
|
479
|
+
/* Excluded from this release type: _updateForScene */
|
|
471
480
|
applyChanges(_entries: Change[]): void;
|
|
472
481
|
_computeAdditionalRenderNeeded(): boolean;
|
|
473
482
|
onColorSpaceDetected(_isLinear: boolean): void;
|
|
@@ -524,6 +533,18 @@ export declare class Scene extends EventTarget {
|
|
|
524
533
|
readonly client: Client;
|
|
525
534
|
readonly handle?: number;
|
|
526
535
|
constructor({ miris, viewerKey }: SceneInit);
|
|
536
|
+
/**
|
|
537
|
+
* Drives a frame and answers whether *this* scene's canvas needs repainting. Call it once per
|
|
538
|
+
* displayed frame from the host's animation loop, and render when it returns true.
|
|
539
|
+
*
|
|
540
|
+
* Every scene on the page calls this from its own loop. The first call in a displayed frame
|
|
541
|
+
* drives one engine tick for all of them; the rest recognise the frame and reuse it.
|
|
542
|
+
*
|
|
543
|
+
* @param ts the host's frame timestamp. Optional - the document timeline supplies one, and it
|
|
544
|
+
* reads the same for every scene in a displayed frame. Pass it when the host runs its own
|
|
545
|
+
* clock, as an immersive XR session does, because XRFrame time is not the document timeline.
|
|
546
|
+
*/
|
|
547
|
+
update(ts?: DOMHighResTimeStamp): boolean;
|
|
527
548
|
dispose(): void;
|
|
528
549
|
/* Excluded from this release type: _getViewingVolumeObb */
|
|
529
550
|
fetchAssets(tags?: string | Iterable<string>): Promise<{
|