@miris-inc/core 0.0.8-605dd07 → 0.0.8-628ad08

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 CHANGED
Binary file
Binary file
package/dist/core.d.ts CHANGED
@@ -1,9 +1,17 @@
1
+ export declare const AssetFormat: {
2
+ readonly GaussianSplats: 1;
3
+ readonly GES: 2;
4
+ };
5
+
1
6
  declare interface AttributeInfo extends EmbindObject {
2
- readonly dataType: number;
3
- readonly componentCount: number;
4
- readonly dataPtr: number;
5
- readonly dataByteLength: number;
7
+ // Logical elements from the drop metadata: splats for a per-splat attribute, records for a
8
+ // per-surfel one. Not necessarily dataSizeBytes / bytesPerElement.
9
+ readonly elementCount: number;
10
+ readonly dataSizeBytes: number;
6
11
  readonly clientSideId: bigint;
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 };
7
15
  readonly maxValue: { x: number; y: number; z: number };
8
16
  }
9
17
 
@@ -24,6 +32,12 @@ export declare class AttributeNames {
24
32
  static readonly SHARK_SPHERICAL_HARMONICS: string;
25
33
  static readonly COLOR: string;
26
34
  static readonly OCTANT_OFFSETS: string;
35
+ static readonly SURFEL_OCTANT_OFFSETS: string;
36
+ static readonly SURFEL_COUNT: string;
37
+ static readonly REFLECTANCE_DATA_V1: string;
38
+ static readonly GLASS_MESH_GEOMETRY: string;
39
+ static readonly GLASS_MESH_PANELS: string;
40
+ static readonly MOD_DEPTH: string;
27
41
  }
28
42
 
29
43
  declare type CachedAttribute = {
@@ -112,6 +126,8 @@ declare class Client {
112
126
  hasFeature(...args: ClientMethodParameters["hasFeature"]): boolean;
113
127
  getFeatureVersion(...args: ClientMethodParameters["getFeatureVersion"]): number;
114
128
  getFeatureState(...args: ClientMethodParameters["getFeatureState"]): number;
129
+ getAssetFormatVersion(...args: ClientMethodParameters["getAssetFormatVersion"]): number;
130
+ getDrMapLadderRoughnessLevels(...args: ClientMethodParameters["getDrMapLadderRoughnessLevels"]): number[];
115
131
  getName(...args: ClientMethodParameters["getName"]): string;
116
132
  setVariantSelection(...args: ClientMethodParameters["setVariantSelection"]): AquaStatus;
117
133
  takeAttribute(...args: ClientMethodParameters["takeAttribute"]): AquaStatus;
@@ -182,6 +198,10 @@ declare class Engine {
182
198
  get module(): MainModule;
183
199
  constructor(moduleOptions?: Record<string, unknown>);
184
200
  get AttributeInfo(): new () => AttributeInfo;
201
+ get CompressionType(): {
202
+ SHARK_ELLIPSOID_COMPRESSED: unknown;
203
+ SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE: unknown;
204
+ };
185
205
  get Handedness(): {
186
206
  Right: number;
187
207
  Left: number;
@@ -228,8 +248,8 @@ declare class Engine {
228
248
  attributeName: string,
229
249
  attributeInfo: AttributeInfo
230
250
  ]): AquaStatus;
231
- getDefaultCameraId(...args: [handle: AquaClientHandle]): number;
232
- getViewingVolumeId(...args: [handle: AquaClientHandle]): number;
251
+ getDefaultCameraId(...args: [handle: AquaClientHandle, streamObjectId: number]): number;
252
+ getViewingVolumeId(...args: [handle: AquaClientHandle, streamObjectId: number]): number;
233
253
  getLocalBoundingBox(...args: [handle: AquaClientHandle, sceneObjectId: number, boxData: number]): AquaStatus;
234
254
  getWorldBoundingBox(...args: [handle: AquaClientHandle, sceneObjectId: number, boxData: number]): AquaStatus;
235
255
  getLodIndex(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
@@ -298,6 +318,8 @@ declare class Engine {
298
318
  hasFeature(...args: [handle: AquaClientHandle, sceneObjectId: number, feature: number]): boolean;
299
319
  getFeatureVersion(...args: [handle: AquaClientHandle, sceneObjectId: number, feature: number]): number;
300
320
  getFeatureState(...args: [handle: AquaClientHandle, sceneObjectId: number, feature: number]): number;
321
+ getDrMapLadderRoughnessLevels(...args: [handle: AquaClientHandle, sceneObjectId: number]): number[];
322
+ getAssetFormatVersion(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
301
323
  getName(...args: [handle: AquaClientHandle, sceneObjectId: number]): string;
302
324
  setVariantSelection(...args: [handle: AquaClientHandle, sceneObjectId: number]): AquaStatus;
303
325
  takeAttribute(...args: [
@@ -364,9 +386,13 @@ export declare class Lod {
364
386
  set _drawnOctantMask(mask: number);
365
387
  get _octantOffsets(): Uint32Array<ArrayBuffer> | null;
366
388
  get _hasOctantOffsets(): boolean;
389
+ get _surfelOctantOffsets(): Uint32Array<ArrayBuffer> | null;
390
+ get _surfelCount(): number;
367
391
  _readOctantOffsets(engine: Engine): void;
368
392
  hasAttribute(attributeName: string): boolean;
369
393
  getDataFromAttribute(engine: Engine, attributeName: string, attributeInfo: AttributeInfo): CachedAttribute | null;
394
+ _getRawByteAttribute(engine: Engine, attributeName: string): Uint8Array<ArrayBuffer> | null;
395
+ _getRawByteAttributeWithBounds(engine: Engine, attributeName: string): RawByteAttributeWithBounds | null;
370
396
  dispose(): void;
371
397
  constructor({ id, modelRoot, lodStore, client }: LodInit);
372
398
  }
@@ -391,6 +417,10 @@ export declare class LodStore {
391
417
 
392
418
  declare interface MainModule {
393
419
  AttributeInfo: new () => AttributeInfo;
420
+ CompressionType: {
421
+ SHARK_ELLIPSOID_COMPRESSED: unknown;
422
+ SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE: unknown;
423
+ };
394
424
  Handedness: { Right: number; Left: number };
395
425
  HEAPF32: Float32Array<ArrayBuffer>;
396
426
  HEAPU8: Uint8Array<ArrayBuffer>;
@@ -427,6 +457,8 @@ declare interface MainModule {
427
457
  HasFeature(handle: number, sceneObjectId: number, feature: number): boolean;
428
458
  GetFeatureVersion(handle: number, sceneObjectId: number, feature: number): number;
429
459
  GetFeatureState(handle: number, sceneObjectId: number, feature: number): number;
460
+ GetAssetFormatVersion(handle: number, sceneObjectId: number): number;
461
+ GetDrMapLadderRoughnessLevels(handle: number, sceneObjectId: number): number[];
430
462
  SetClientSpatialFormat(handle: number, spatialFormat: SpatialFormat): { value: number };
431
463
  SetRuntimeSettings(handle: number, settings: RuntimeSettings): { value: number };
432
464
  TakeEvictedClientSideAttributeIds(handle: number): EmbindVector<bigint>;
@@ -473,6 +505,13 @@ export declare class Miris {
473
505
  */
474
506
  static readonly _XR_TARGET_FRAME_RATE = 43;
475
507
  /* Excluded from this release type: _XR_SPLAT_COUNT_BUDGET */
508
+ /* Excluded from this release type: _SHARK_SPLAT_CAPACITY_MOBILE */
509
+ static readonly _SHARK_SPLAT_CAPACITY_DESKTOP = 3000000;
510
+ /* Excluded from this release type: _SHARK_SPLAT_BUDGET_CAP_MOBILE */
511
+ static readonly _SHARK_SPLAT_BUDGET_CAP_DESKTOP = 2500000;
512
+ /* Excluded from this release type: _isMobileDevice */
513
+ /* Excluded from this release type: _sharkSplatCapacity */
514
+ /* Excluded from this release type: _sharkSplatBudgetCap */
476
515
  /* Excluded from this release type: _setTargetFrameRate */
477
516
  /* Excluded from this release type: _setXRModeActive */
478
517
  /* Excluded from this release type: _setSplatCountBudgetOverride */
@@ -508,6 +547,28 @@ export declare type ModelRootInit = {
508
547
  stream: Stream;
509
548
  };
510
549
 
550
+ /**
551
+ * The byte-exact counterpart of getRawUint32Attribute above: same no-padding, no-takeAttribute
552
+ * contract, returning bytes rather than words.
553
+ *
554
+ * Use this rather than that one wherever the stride is not a whole number of words:
555
+ * reflectanceDataV1's 26-byte record is not, and an odd record count would lose that record's
556
+ * last field to dataPtrView's truncation.
557
+ */
558
+ export declare type RawByteAttributeWithBounds = {
559
+ bytes: Uint8Array<ArrayBuffer>;
560
+ minValue: {
561
+ x: number;
562
+ y: number;
563
+ z: number;
564
+ };
565
+ maxValue: {
566
+ x: number;
567
+ y: number;
568
+ z: number;
569
+ };
570
+ };
571
+
511
572
  declare type RequestAnimationFrameFn = ((callback: FrameRequestCallback) => number) | ((callback: XRFrameRequestCallback) => void);
512
573
 
513
574
  declare interface RuntimeSettings extends EmbindObject {
@@ -516,6 +577,7 @@ declare interface RuntimeSettings extends EmbindObject {
516
577
  targetFramesPerSecond: number;
517
578
  xrModeActive: boolean;
518
579
  splatCountBudget: number;
580
+ splatCountBudgetCap: number;
519
581
  }
520
582
 
521
583
  export declare class Scene extends EventTarget {
@@ -527,6 +589,7 @@ export declare class Scene extends EventTarget {
527
589
  readonly id: number;
528
590
  get key(): unknown;
529
591
  set key(key: unknown);
592
+ /* Excluded from this release type: _assetFormat */
530
593
  get viewerKey(): string | null;
531
594
  set viewerKey(viewerKey: string | null);
532
595
  get streams(): Set<Stream>;
@@ -549,20 +612,20 @@ export declare class Scene extends EventTarget {
549
612
  */
550
613
  update(ts?: DOMHighResTimeStamp): boolean;
551
614
  dispose(): void;
552
- /* Excluded from this release type: _getViewingVolumeObb */
553
615
  fetchAssets(tags?: string | Iterable<string>): Promise<{
554
616
  name: string;
555
617
  thumbnailUrl: string;
556
618
  uuid: string;
557
619
  tags: string[];
558
620
  }[]>;
559
- getDefaultCameraTransform(): Float32Array<ArrayBuffer> | null | undefined;
560
621
  add(stream: Stream): void;
561
622
  getStreamForId(streamObjectId: number): Stream | undefined;
562
623
  getStreamForDescendentId(descendentObjectId: number): Stream | null;
563
624
  getModelRootForDescendentId(descendentObjectId: number): ModelRoot | null;
625
+ _recordAssetFormat(modelRoot: ModelRoot, formatVersion: number): void;
564
626
  /* Excluded from this release type: _getFeatureMesh */
565
627
  /* Excluded from this release type: _getDrMap */
628
+ /* Excluded from this release type: _onDrMapLadder */
566
629
  /* Excluded from this release type: _onFeatureData */
567
630
  /* Excluded from this release type: _onSceneLoaded */
568
631
  delete(stream: Stream): void;
@@ -653,6 +716,8 @@ export declare class Stream extends EventTarget {
653
716
  constructor(options: StreamInit);
654
717
  _initStream({ uuid }: StreamInit): void;
655
718
  /* Excluded from this release type: _onStreamLoaded */
719
+ getDefaultCameraTransform(): Float32Array<ArrayBuffer> | null | undefined;
720
+ /* Excluded from this release type: _getViewingVolumeObb */
656
721
  /* Excluded from this release type: _onRootLoaded */
657
722
  add(modelRoot: ModelRoot): void;
658
723
  end(): void;