@miris-inc/core 0.0.8-ec1b54d → 0.0.8-ed219cf
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/LICENSE +201 -0
- package/README.md +82 -0
- package/banner.svg +34 -0
- package/dist/AquaApi.wasm +0 -0
- package/dist/aqua-parser.wasm +0 -0
- package/dist/core.d.ts +1151 -0
- package/dist/core.js +2701 -0
- package/dist/core.prod.js +1 -0
- package/dist/core.standalone.js +7912 -0
- package/dist/core.standalone.prod.js +1 -0
- package/package.json +49 -6
- package/core.js +0 -6318
- package/icon-black.svg +0 -10
- package/icon-white.svg +0 -11
- package/social-card.png +0 -3
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,1151 @@
|
|
|
1
|
+
export declare const AssetFormat: {
|
|
2
|
+
readonly GaussianSplats: 1;
|
|
3
|
+
readonly GES: 2;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
declare interface AttributeInfo extends EmbindObject {
|
|
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;
|
|
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 };
|
|
15
|
+
readonly maxValue: { x: number; y: number; z: number };
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class AttributeNames {
|
|
19
|
+
static readonly SPARK_PACKED_SPLAT: string;
|
|
20
|
+
static readonly SPARK_EXTENDED_SPLAT_LOW: string;
|
|
21
|
+
static readonly SPARK_EXTENDED_SPLAT_HIGH: string;
|
|
22
|
+
static readonly SPARK_PACKED_SH1: string;
|
|
23
|
+
static readonly SPARK_PACKED_SH2: string;
|
|
24
|
+
static readonly SPARK_PACKED_SH3: string;
|
|
25
|
+
static readonly SPARK_EXTENDED_SH1: string;
|
|
26
|
+
static readonly SPARK_EXTENDED_SH2: string;
|
|
27
|
+
static readonly SPARK_EXTENDED_SH3_A: string;
|
|
28
|
+
static readonly SPARK_EXTENDED_SH3_B: string;
|
|
29
|
+
static readonly UNUSED: string;
|
|
30
|
+
static readonly SHARK_ELLIPSOIDS: string;
|
|
31
|
+
static readonly SHARK_ELLIPSOIDS_COMPRESSED: string;
|
|
32
|
+
static readonly SHARK_SPHERICAL_HARMONICS: string;
|
|
33
|
+
static readonly COLOR: string;
|
|
34
|
+
static readonly OCTANT_OFFSETS: string;
|
|
35
|
+
static readonly SURFEL_OCTANT_OFFSETS: string;
|
|
36
|
+
static readonly SURFEL_COUNT: string;
|
|
37
|
+
static readonly SURFEL_OWNER_GROUPS: string;
|
|
38
|
+
static readonly OCTANT_CELL: string;
|
|
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;
|
|
43
|
+
static readonly MOD_DEPTH: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare type CachedAttribute = {
|
|
47
|
+
paddedData: Uint32Array<ArrayBuffer>;
|
|
48
|
+
originalSizeInUints: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export declare class Camera {
|
|
52
|
+
#private;
|
|
53
|
+
readonly id: number;
|
|
54
|
+
update(): void;
|
|
55
|
+
get viewportHeight(): number;
|
|
56
|
+
set viewportHeight(viewportHeight: number);
|
|
57
|
+
get aspect(): number;
|
|
58
|
+
set aspect(aspect: number);
|
|
59
|
+
get fov(): number;
|
|
60
|
+
set fov(fov: number);
|
|
61
|
+
get near(): number;
|
|
62
|
+
set near(near: number);
|
|
63
|
+
get far(): number;
|
|
64
|
+
set far(far: number);
|
|
65
|
+
get matrix(): Matrix4x4Tuple;
|
|
66
|
+
set matrix(matrix: Matrix4x4Tuple);
|
|
67
|
+
readonly engine: Engine;
|
|
68
|
+
readonly miris: Miris;
|
|
69
|
+
readonly scene: Scene;
|
|
70
|
+
constructor({ aspect, fov, near, far, matrix, scene, viewportHeight, }: CameraInit);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare interface Camera_2 {
|
|
74
|
+
dir: vec4;
|
|
75
|
+
U: vec4;
|
|
76
|
+
V: vec4;
|
|
77
|
+
eye: vec4;
|
|
78
|
+
l: number;
|
|
79
|
+
fov: number;
|
|
80
|
+
zNear: number;
|
|
81
|
+
zFar: number;
|
|
82
|
+
delete(): void;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export declare type CameraInit = {
|
|
86
|
+
aspect: number;
|
|
87
|
+
fov: number;
|
|
88
|
+
near: number;
|
|
89
|
+
far: number;
|
|
90
|
+
matrix: Matrix4x4Tuple;
|
|
91
|
+
scene: Scene;
|
|
92
|
+
viewportHeight?: number;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export declare class Change {
|
|
96
|
+
readonly type: ChangeInit["type"];
|
|
97
|
+
readonly lod: ChangeInit["lod"];
|
|
98
|
+
constructor({ type, lod }: ChangeInit);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export declare type ChangeInit = {
|
|
102
|
+
type: "created" | "activated" | "modified" | "deactivated" | "deleted" | "remasked";
|
|
103
|
+
lod: Lod;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
declare class Client {
|
|
107
|
+
#private;
|
|
108
|
+
readonly engine: Engine;
|
|
109
|
+
readonly handle: AquaClientHandle;
|
|
110
|
+
get viewerKey(): string | null;
|
|
111
|
+
set viewerKey(key: string | null);
|
|
112
|
+
constructor({ engine, context, id }: ClientInit);
|
|
113
|
+
dispose(): void;
|
|
114
|
+
addStreamById(...args: ClientMethodParameters["addStreamById"]): number;
|
|
115
|
+
destroyClient(...args: ClientMethodParameters["destroyClient"]): AquaStatus;
|
|
116
|
+
getAssetsAsync(...args: ClientMethodParameters["getAssetsAsync"]): AssetInfo[];
|
|
117
|
+
getAttribute(...args: ClientMethodParameters["getAttribute"]): AquaStatus;
|
|
118
|
+
getDefaultCameraId(...args: ClientMethodParameters["getDefaultCameraId"]): number;
|
|
119
|
+
getViewingVolumeId(...args: ClientMethodParameters["getViewingVolumeId"]): number;
|
|
120
|
+
getLocalBoundingBox(...args: ClientMethodParameters["getLocalBoundingBox"]): AquaStatus;
|
|
121
|
+
getWorldBoundingBox(...args: ClientMethodParameters["getWorldBoundingBox"]): AquaStatus;
|
|
122
|
+
getLodIndex(...args: ClientMethodParameters["getLodIndex"]): number;
|
|
123
|
+
getSceneChanges(...args: ClientMethodParameters["getSceneChanges"]): void;
|
|
124
|
+
getSceneChangesCounts(...args: ClientMethodParameters["getSceneChangesCounts"]): void;
|
|
125
|
+
getSceneMetadata(...args: ClientMethodParameters["getSceneMetadata"]): number;
|
|
126
|
+
getSceneObjectParent(...args: ClientMethodParameters["getSceneObjectParent"]): number;
|
|
127
|
+
getSceneObjectType(...args: ClientMethodParameters["getSceneObjectType"]): SceneObjectType;
|
|
128
|
+
getStreamStatus(...args: ClientMethodParameters["getStreamStatus"]): StreamStatus;
|
|
129
|
+
getDrawnOctantMask(...args: ClientMethodParameters["getDrawnOctantMask"]): number;
|
|
130
|
+
getOctantLocalBoundingBoxes(...args: ClientMethodParameters["getOctantLocalBoundingBoxes"]): number[];
|
|
131
|
+
getLocalTransform(...args: ClientMethodParameters["getLocalTransform"]): AquaStatus;
|
|
132
|
+
getWorldTransform(...args: ClientMethodParameters["getWorldTransform"]): AquaStatus;
|
|
133
|
+
hasAttribute(...args: ClientMethodParameters["hasAttribute"]): boolean;
|
|
134
|
+
isSceneObjectAncestorOf(...args: ClientMethodParameters["isSceneObjectAncestorOf"]): boolean;
|
|
135
|
+
lockScene(...args: ClientMethodParameters["lockScene"]): boolean;
|
|
136
|
+
removeStream(...args: ClientMethodParameters["removeStream"]): boolean;
|
|
137
|
+
setAssetViewerKey(...args: ClientMethodParameters["setAssetViewerKey"]): AquaStatus;
|
|
138
|
+
setClientSpatialFormat(...args: ClientMethodParameters["setClientSpatialFormat"]): AquaStatus;
|
|
139
|
+
setRuntimeSettings(...args: ClientMethodParameters["setRuntimeSettings"]): AquaStatus;
|
|
140
|
+
setStreamFetchMode(...args: ClientMethodParameters["setStreamFetchMode"]): boolean;
|
|
141
|
+
getStreamFetchMode(...args: ClientMethodParameters["getStreamFetchMode"]): number;
|
|
142
|
+
setMainCameraTransform(...args: ClientMethodParameters["setMainCameraTransform"]): AquaStatus;
|
|
143
|
+
setMainCameraViewFrustum(...args: ClientMethodParameters["setMainCameraViewFrustum"]): AquaStatus;
|
|
144
|
+
setSceneObjectTransform(...args: ClientMethodParameters["setSceneObjectTransform"]): AquaStatus;
|
|
145
|
+
hasFeature(...args: ClientMethodParameters["hasFeature"]): boolean;
|
|
146
|
+
getFeatureVersion(...args: ClientMethodParameters["getFeatureVersion"]): number;
|
|
147
|
+
getFeatureState(...args: ClientMethodParameters["getFeatureState"]): number;
|
|
148
|
+
getAssetFormatVersion(...args: ClientMethodParameters["getAssetFormatVersion"]): number;
|
|
149
|
+
getDrMapLadderRoughnessLevels(...args: ClientMethodParameters["getDrMapLadderRoughnessLevels"]): number[];
|
|
150
|
+
getName(...args: ClientMethodParameters["getName"]): string;
|
|
151
|
+
setVariantSelection(...args: ClientMethodParameters["setVariantSelection"]): AquaStatus;
|
|
152
|
+
takeAttribute(...args: ClientMethodParameters["takeAttribute"]): AquaStatus;
|
|
153
|
+
takeEvictedClientSideAttributeIds(...args: ClientMethodParameters["takeEvictedClientSideAttributeIds"]): EmbindVector<bigint>;
|
|
154
|
+
takeRenderRequired(...args: ClientMethodParameters["takeRenderRequired"]): boolean;
|
|
155
|
+
unlockScene(...args: ClientMethodParameters["unlockScene"]): boolean;
|
|
156
|
+
updateSceneExecution(...args: ClientMethodParameters["updateSceneExecution"]): AquaStatus;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
declare type ClientAttributeInfo = {
|
|
160
|
+
elementsPerSplat: number;
|
|
161
|
+
discard: boolean;
|
|
162
|
+
bytes?: true;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export declare const clientAttributeList: Record<string, ClientAttributeInfo>;
|
|
166
|
+
|
|
167
|
+
declare type ClientInit = {
|
|
168
|
+
engine: Engine;
|
|
169
|
+
context?: AquaContextHandle;
|
|
170
|
+
id: number;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
declare type ClientMethodParameters<Parameters extends EngineMethodParameters = EngineMethodParameters> = {
|
|
174
|
+
[Key in keyof Parameters]: Parameters[Key] extends [any, ...infer Rest] ? Rest : [];
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
declare interface EmbindObject {
|
|
178
|
+
delete(): void;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
declare interface EmbindVector<T> extends EmbindObject {
|
|
182
|
+
size(): number;
|
|
183
|
+
get(index: number): T;
|
|
184
|
+
push_back(value: T): void;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The main Aqua wrapper.
|
|
189
|
+
*
|
|
190
|
+
* @remarks
|
|
191
|
+
* The engine is asynchronously initialized, meaning synchronous operations may
|
|
192
|
+
* fail if is not ready. To ensure the engine is ready, await `engine.ready`
|
|
193
|
+
* or check `engine.pending`.
|
|
194
|
+
*/
|
|
195
|
+
declare class Engine {
|
|
196
|
+
#private;
|
|
197
|
+
static AquaStatus: {
|
|
198
|
+
readonly Success: 0;
|
|
199
|
+
readonly Failure: 1;
|
|
200
|
+
};
|
|
201
|
+
static SceneObjectType: {
|
|
202
|
+
readonly ModelRoot: 0;
|
|
203
|
+
readonly SceneObject: 1;
|
|
204
|
+
readonly StreamObject: 2;
|
|
205
|
+
readonly GaussianSplats: 3;
|
|
206
|
+
readonly PointsObject: 4;
|
|
207
|
+
readonly Camera: 5;
|
|
208
|
+
readonly LodOctree: 6;
|
|
209
|
+
readonly VariantSetCollection: 7;
|
|
210
|
+
readonly VariantSet: 8;
|
|
211
|
+
readonly VariantSetOption: 9;
|
|
212
|
+
};
|
|
213
|
+
static Feature: {
|
|
214
|
+
readonly DrMap: 0;
|
|
215
|
+
readonly ReflMesh: 1;
|
|
216
|
+
readonly GlassMesh: 2;
|
|
217
|
+
readonly RenderAsPointCloud: 3;
|
|
218
|
+
};
|
|
219
|
+
static FeatureState: {
|
|
220
|
+
readonly NotLoaded: 0;
|
|
221
|
+
readonly Pending: 1;
|
|
222
|
+
readonly Loaded: 2;
|
|
223
|
+
readonly Failed: 3;
|
|
224
|
+
};
|
|
225
|
+
static StreamStatus: {
|
|
226
|
+
readonly Unknown: 0;
|
|
227
|
+
readonly Resolving: 1;
|
|
228
|
+
readonly Loading: 2;
|
|
229
|
+
readonly Ready: 3;
|
|
230
|
+
readonly Failed: 4;
|
|
231
|
+
};
|
|
232
|
+
static StreamFetchMode: {
|
|
233
|
+
readonly Regular: 0;
|
|
234
|
+
readonly Prefetch: 1;
|
|
235
|
+
readonly Parked: 2;
|
|
236
|
+
};
|
|
237
|
+
readonly ready: Promise<this>;
|
|
238
|
+
readonly pending: boolean;
|
|
239
|
+
get module(): MainModule;
|
|
240
|
+
constructor(moduleOptions?: Record<string, unknown>);
|
|
241
|
+
get AttributeInfo(): new () => AttributeInfo;
|
|
242
|
+
get CompressionType(): {
|
|
243
|
+
SHARK_ELLIPSOID_COMPRESSED: unknown;
|
|
244
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE: unknown;
|
|
245
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE_V2: unknown;
|
|
246
|
+
};
|
|
247
|
+
get Handedness(): {
|
|
248
|
+
Right: number;
|
|
249
|
+
Left: number;
|
|
250
|
+
};
|
|
251
|
+
get heapF32(): Float32Array<ArrayBuffer>;
|
|
252
|
+
get heapU8(): Uint8Array<ArrayBuffer>;
|
|
253
|
+
get MatrixOrder(): {
|
|
254
|
+
ColumnMajor: number;
|
|
255
|
+
RowMajor: number;
|
|
256
|
+
};
|
|
257
|
+
get SceneChangeIds(): new () => SceneChangeIds;
|
|
258
|
+
get SceneMetadata(): new () => SceneMetadata;
|
|
259
|
+
get RuntimeSettings(): new () => RuntimeSettings;
|
|
260
|
+
get SpatialFormat(): new () => SpatialFormat;
|
|
261
|
+
get StringVector(): new () => StringVector;
|
|
262
|
+
get UpAxis(): {
|
|
263
|
+
X: number;
|
|
264
|
+
Y: number;
|
|
265
|
+
Z: number;
|
|
266
|
+
};
|
|
267
|
+
get UsePadding(): boolean;
|
|
268
|
+
activatedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
269
|
+
addStreamById(...args: [
|
|
270
|
+
handle: AquaClientHandle,
|
|
271
|
+
streamName: string,
|
|
272
|
+
assetId: string,
|
|
273
|
+
doNotRefine: boolean
|
|
274
|
+
]): number;
|
|
275
|
+
allocateSceneChangesArrays(...args: [sceneChangeIds: SceneChangeIds]): void;
|
|
276
|
+
createContext(...args: []): AquaContextHandle;
|
|
277
|
+
destroyContext(...args: [handle: AquaContextHandle]): AquaStatus;
|
|
278
|
+
createClient(id: number, context?: AquaContextHandle): AquaClientHandle;
|
|
279
|
+
createdObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
280
|
+
deletedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
281
|
+
dataPtrView(...args: [attributeInfo: AttributeInfo]): Uint32Array;
|
|
282
|
+
deactivatedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
283
|
+
remaskedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
284
|
+
getDrawnOctantMask(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
285
|
+
getOctantLocalBoundingBoxes(...args: [handle: AquaClientHandle, sceneObjectId: number]): number[];
|
|
286
|
+
destroyClient(...args: [handle: AquaClientHandle]): AquaStatus;
|
|
287
|
+
free(...args: [size: number]): number;
|
|
288
|
+
getAssetsAsync(...args: [handle: AquaClientHandle, tags: StringVector]): AssetInfo[];
|
|
289
|
+
getAttribute(...args: [
|
|
290
|
+
handle: AquaClientHandle,
|
|
291
|
+
sceneObjectId: number,
|
|
292
|
+
attributeName: string,
|
|
293
|
+
attributeInfo: AttributeInfo
|
|
294
|
+
]): AquaStatus;
|
|
295
|
+
getDefaultCameraId(...args: [handle: AquaClientHandle, streamObjectId: number]): number;
|
|
296
|
+
getViewingVolumeId(...args: [handle: AquaClientHandle, streamObjectId: number]): number;
|
|
297
|
+
getLocalBoundingBox(...args: [handle: AquaClientHandle, sceneObjectId: number, boxData: number]): AquaStatus;
|
|
298
|
+
getWorldBoundingBox(...args: [handle: AquaClientHandle, sceneObjectId: number, boxData: number]): AquaStatus;
|
|
299
|
+
getLodIndex(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
300
|
+
getSceneChanges(...args: [handle: AquaClientHandle, sceneChangeIds: SceneChangeIds]): void;
|
|
301
|
+
getSceneChangesCounts(...args: [handle: AquaClientHandle, sceneChangeIds: SceneChangeIds]): void;
|
|
302
|
+
getSceneMetadata(...args: [handle: AquaClientHandle, metadata: SceneMetadata]): number;
|
|
303
|
+
getSceneObjectParent(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
304
|
+
getStreamStatus(...args: [handle: AquaClientHandle, streamObjectId: number]): StreamStatus;
|
|
305
|
+
getSceneObjectType(...args: [handle: AquaClientHandle, sceneObjectId: number]): SceneObjectType;
|
|
306
|
+
getLocalTransform(...args: [
|
|
307
|
+
handle: AquaClientHandle,
|
|
308
|
+
sceneObjectId: number,
|
|
309
|
+
transform: number
|
|
310
|
+
]): AquaStatus;
|
|
311
|
+
getWorldTransform(...args: [
|
|
312
|
+
handle: AquaClientHandle,
|
|
313
|
+
sceneObjectId: number,
|
|
314
|
+
transform: number
|
|
315
|
+
]): AquaStatus;
|
|
316
|
+
hasAttribute(...args: [
|
|
317
|
+
handle: AquaClientHandle,
|
|
318
|
+
sceneObjectId: number,
|
|
319
|
+
attributeName: string
|
|
320
|
+
]): boolean;
|
|
321
|
+
isSceneObjectAncestorOf(...args: [
|
|
322
|
+
handle: AquaClientHandle,
|
|
323
|
+
sceneObjectId: number,
|
|
324
|
+
descendantObjectId: number
|
|
325
|
+
]): boolean;
|
|
326
|
+
lockScene(...args: [handle: AquaClientHandle]): boolean;
|
|
327
|
+
malloc(...args: [size: number]): number;
|
|
328
|
+
modifiedObjectIdsView(...args: [sceneChangeIds: SceneChangeIds]): Uint32Array;
|
|
329
|
+
onWorkerResult(...args: [
|
|
330
|
+
requestIdLow: number,
|
|
331
|
+
requestIdHigh: number,
|
|
332
|
+
bufferPtr: number,
|
|
333
|
+
bufferSize: number,
|
|
334
|
+
httpStatus: number,
|
|
335
|
+
duration: number,
|
|
336
|
+
ttfb: number,
|
|
337
|
+
success: boolean,
|
|
338
|
+
dataType: number,
|
|
339
|
+
errorPtr: string,
|
|
340
|
+
responseHeadersJson: string,
|
|
341
|
+
contextPtr: number
|
|
342
|
+
]): void;
|
|
343
|
+
removeStream(...args: [handle: AquaClientHandle, streamObjectId: number]): boolean;
|
|
344
|
+
setAssetViewerKey(...args: [handle: AquaClientHandle, key: string]): AquaStatus;
|
|
345
|
+
setClientSpatialFormat(...args: [handle: AquaClientHandle, spatialFormat: SpatialFormat]): AquaStatus;
|
|
346
|
+
setRuntimeSettings(...args: [handle: AquaClientHandle, settings: RuntimeSettings]): AquaStatus;
|
|
347
|
+
setMainCameraTransform(...args: [handle: AquaClientHandle, cameraTransform: number]): AquaStatus;
|
|
348
|
+
setMainCameraViewFrustum(...args: [
|
|
349
|
+
handle: AquaClientHandle,
|
|
350
|
+
aspectRatio: number,
|
|
351
|
+
verticalFov: number,
|
|
352
|
+
nearPlane: number,
|
|
353
|
+
farPlane: number,
|
|
354
|
+
viewportHeightPixels: number
|
|
355
|
+
]): AquaStatus;
|
|
356
|
+
setStreamFetchMode(...args: [handle: AquaClientHandle, streamObjectId: number, mode: number]): boolean;
|
|
357
|
+
getStreamFetchMode(...args: [handle: AquaClientHandle, streamObjectId: number]): number;
|
|
358
|
+
setMaxCacheSize(...args: [maxSizeBytes: number]): void;
|
|
359
|
+
setPreferSharkEncodingProfiles(...args: [preferShark: boolean]): void;
|
|
360
|
+
setPadSplatAttributes(usePadding: boolean): void;
|
|
361
|
+
setSceneObjectTransform(...args: [
|
|
362
|
+
handle: AquaClientHandle,
|
|
363
|
+
sceneObjectId: number,
|
|
364
|
+
transform: number
|
|
365
|
+
]): AquaStatus;
|
|
366
|
+
hasFeature(...args: [handle: AquaClientHandle, sceneObjectId: number, feature: number]): boolean;
|
|
367
|
+
getFeatureVersion(...args: [handle: AquaClientHandle, sceneObjectId: number, feature: number]): number;
|
|
368
|
+
getFeatureState(...args: [handle: AquaClientHandle, sceneObjectId: number, feature: number]): number;
|
|
369
|
+
getDrMapLadderRoughnessLevels(...args: [handle: AquaClientHandle, sceneObjectId: number]): number[];
|
|
370
|
+
getAssetFormatVersion(...args: [handle: AquaClientHandle, sceneObjectId: number]): number;
|
|
371
|
+
getName(...args: [handle: AquaClientHandle, sceneObjectId: number]): string;
|
|
372
|
+
setVariantSelection(...args: [handle: AquaClientHandle, sceneObjectId: number]): AquaStatus;
|
|
373
|
+
takeAttribute(...args: [
|
|
374
|
+
handle: AquaClientHandle,
|
|
375
|
+
sceneObjectId: number,
|
|
376
|
+
attributeName: string,
|
|
377
|
+
clientSideId: bigint
|
|
378
|
+
]): AquaStatus;
|
|
379
|
+
takeEvictedClientSideAttributeIds(...args: [handle: AquaClientHandle]): EmbindVector<bigint>;
|
|
380
|
+
getActiveClientSideIdsCheckSum(): number;
|
|
381
|
+
unlockScene(...args: [handle: AquaClientHandle]): boolean;
|
|
382
|
+
updateSceneExecution(...args: [handle: AquaClientHandle]): AquaStatus;
|
|
383
|
+
takeRenderRequired(...args: [handle: AquaClientHandle]): boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Advances the runtime by one frame and recomputes the streaming budget. Call once per
|
|
386
|
+
* displayed frame per context, before the per-client updateSceneExecution() calls.
|
|
387
|
+
* `previousFrameTimeMs` is how long the previous frame took; pass 0 when there is no plausible
|
|
388
|
+
* measurement (first frame, or a resume from a stall) and the frame advances without recording
|
|
389
|
+
* `primsResident` is what the renderer held at the end of the previous frame, fading
|
|
390
|
+
* prims included, and `primCapacity` what it can hold; activations that would not fit are
|
|
391
|
+
* deferred, where primCapacity 0 means deferral is disabled.
|
|
392
|
+
*/
|
|
393
|
+
beginFrame(...args: [
|
|
394
|
+
contextHandle: AquaContextHandle,
|
|
395
|
+
previousFrameTimeMs: number,
|
|
396
|
+
primsResident: number,
|
|
397
|
+
primCapacity: number
|
|
398
|
+
]): AquaStatus;
|
|
399
|
+
createDeserializeWorker(_url: string, _workerUrl: string, poolSize: number): boolean;
|
|
400
|
+
cancelRequest(requestIdLow: number, requestIdHigh: number): boolean;
|
|
401
|
+
submitToWorker(requestIdLow: number, requestIdHigh: number, descriptorBuffer: ArrayBuffer, contextPtr: number): boolean;
|
|
402
|
+
terminateWorker(): void;
|
|
403
|
+
requestWorkerHeapSnapshots(topN: number): Promise<(string | null)[]>;
|
|
404
|
+
setWorkerHeapTrackingEnabled(enabled: boolean): Promise<void>;
|
|
405
|
+
resetWorkerHeapTracking(): Promise<void>;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
declare type EngineMethodParameters<E extends Engine = Engine> = {
|
|
409
|
+
[Key in keyof E]: E[Key] extends (...args: any[]) => any ? Parameters<E[Key]> : never;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
declare interface GlassMeshRegistry {
|
|
413
|
+
// Decodes one octree node's glass payload and registers it, replacing any previous entry for
|
|
414
|
+
// that object. False for a malformed or empty payload, leaving the registry unchanged.
|
|
415
|
+
//
|
|
416
|
+
// The two slot arguments are different numbers here, unlike on the native path, and swapping
|
|
417
|
+
// them renders glass that does not follow its asset: modelRootSlot scopes the panel dedupe to
|
|
418
|
+
// one asset instance, while chunkModelRootIndex is stamped into every vertex and read back as
|
|
419
|
+
// chunkModelRoots[pos.w], so that one takes the chunk's fade slot.
|
|
420
|
+
//
|
|
421
|
+
// geometryPtr/panelPtr address THIS module's heap - _malloc here and copy the bytes in, since
|
|
422
|
+
// the attributes live in the engine module's. The AABB is the geometry attribute's own range.
|
|
423
|
+
registerObject(
|
|
424
|
+
objectId: number,
|
|
425
|
+
lodIndex: number,
|
|
426
|
+
modelRootSlot: number,
|
|
427
|
+
chunkModelRootIndex: number,
|
|
428
|
+
geometryPtr: number,
|
|
429
|
+
geometryByteCount: number,
|
|
430
|
+
panelPtr: number,
|
|
431
|
+
panelByteCount: number,
|
|
432
|
+
aabbMinX: number,
|
|
433
|
+
aabbMinY: number,
|
|
434
|
+
aabbMinZ: number,
|
|
435
|
+
aabbMaxX: number,
|
|
436
|
+
aabbMaxY: number,
|
|
437
|
+
aabbMaxZ: number,
|
|
438
|
+
): boolean;
|
|
439
|
+
// Returns true if the object had glass, which is what says the buffers need rebuilding.
|
|
440
|
+
removeObject(objectId: number): boolean;
|
|
441
|
+
clear(): void;
|
|
442
|
+
isDirty(): boolean;
|
|
443
|
+
// Rebuilds the flattened buffers, keeping each panel from its deepest resident LOD. Stays dirty
|
|
444
|
+
// so uploadIfDirty still fires. Walks every registered object, so not per frame.
|
|
445
|
+
flattenIfDirty(): void;
|
|
446
|
+
uploadIfDirty(renderState: RenderState): void;
|
|
447
|
+
vertexCount(): number;
|
|
448
|
+
panelCount(): number;
|
|
449
|
+
delete(): void;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export declare const HaveData = 2;
|
|
453
|
+
|
|
454
|
+
export declare const HaveMetadata = 1;
|
|
455
|
+
|
|
456
|
+
export declare const HaveNothing = 0;
|
|
457
|
+
|
|
458
|
+
export declare class Lod {
|
|
459
|
+
#private;
|
|
460
|
+
readonly id: LodInit["id"];
|
|
461
|
+
readonly store: LodStore;
|
|
462
|
+
get key(): unknown;
|
|
463
|
+
set key(key: unknown);
|
|
464
|
+
readonly modelRoot: ModelRoot;
|
|
465
|
+
set bounds(bounds: Float32Array<ArrayBuffer> | null);
|
|
466
|
+
/**
|
|
467
|
+
* Retrieves the cached world bounds of this object
|
|
468
|
+
*
|
|
469
|
+
* @deprecated Retrieve the local bounds and transform as needed
|
|
470
|
+
*/
|
|
471
|
+
get bounds(): Float32Array<ArrayBuffer> | null;
|
|
472
|
+
/**
|
|
473
|
+
* Sets the local bounds of this lod
|
|
474
|
+
*/
|
|
475
|
+
set localBounds(bounds: Float32Array<ArrayBuffer> | null);
|
|
476
|
+
/**
|
|
477
|
+
* Retrieves the local bounds of this lod
|
|
478
|
+
*/
|
|
479
|
+
get localBounds(): Float32Array<ArrayBuffer> | null;
|
|
480
|
+
set lodIndex(index: number);
|
|
481
|
+
get lodIndex(): number | null;
|
|
482
|
+
set paddingSplatsCount(count: number);
|
|
483
|
+
get paddingSplatsCount(): number;
|
|
484
|
+
set transform(transform: Float32Array<ArrayBuffer> | null);
|
|
485
|
+
get transform(): Float32Array<ArrayBuffer> | null;
|
|
486
|
+
get _drawnOctantMask(): number;
|
|
487
|
+
set _drawnOctantMask(mask: number);
|
|
488
|
+
get _octantLocalBounds(): Float32Array<ArrayBuffer> | null;
|
|
489
|
+
set _octantLocalBounds(bounds: Float32Array<ArrayBuffer> | null);
|
|
490
|
+
get _octantOffsets(): Uint32Array<ArrayBuffer> | null;
|
|
491
|
+
get _hasOctantOffsets(): boolean;
|
|
492
|
+
get _surfelOctantOffsets(): Uint32Array<ArrayBuffer> | null;
|
|
493
|
+
get _surfelCount(): number;
|
|
494
|
+
get _surfelOwnerGroups(): Uint32Array<ArrayBuffer> | null;
|
|
495
|
+
get _octantCell(): Uint32Array<ArrayBuffer> | null;
|
|
496
|
+
_readOctantOffsets(engine: Engine): void;
|
|
497
|
+
hasAttribute(attributeName: string): boolean;
|
|
498
|
+
getDataFromAttribute(engine: Engine, attributeName: string, attributeInfo: AttributeInfo): CachedAttribute | null;
|
|
499
|
+
_getRawByteAttribute(engine: Engine, attributeName: string): Uint8Array<ArrayBuffer> | null;
|
|
500
|
+
_getRawByteAttributeWithBounds(engine: Engine, attributeName: string): RawByteAttributeWithBounds | null;
|
|
501
|
+
dispose(): void;
|
|
502
|
+
constructor({ id, modelRoot, lodStore, client }: LodInit);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export declare type LodInit = {
|
|
506
|
+
id: number;
|
|
507
|
+
modelRoot: ModelRoot;
|
|
508
|
+
lodStore: LodStore;
|
|
509
|
+
client: Client;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
export declare class LodStore {
|
|
513
|
+
#private;
|
|
514
|
+
forKey(key: unknown): Lod | undefined;
|
|
515
|
+
forId(id: number): Lod | undefined;
|
|
516
|
+
setKey(key: unknown, lod: Lod): void;
|
|
517
|
+
setId(id: number, lod: Lod): Map<number, Lod>;
|
|
518
|
+
delete(lod: Lod): void;
|
|
519
|
+
deleteKey(key: unknown): void;
|
|
520
|
+
deleteId(id: number): void;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare interface MainModule extends SharkModule {
|
|
524
|
+
AttributeInfo: new () => AttributeInfo;
|
|
525
|
+
CompressionType: {
|
|
526
|
+
SHARK_ELLIPSOID_COMPRESSED: unknown;
|
|
527
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE: unknown;
|
|
528
|
+
SHARK_ELLIPSOID_COMPRESSED_ROOT_RELATIVE_V2: unknown;
|
|
529
|
+
};
|
|
530
|
+
Handedness: { Right: number; Left: number };
|
|
531
|
+
HEAPF32: Float32Array<ArrayBuffer>;
|
|
532
|
+
HEAPU8: Uint8Array<ArrayBuffer>;
|
|
533
|
+
HEAPU32: Uint32Array<ArrayBuffer>;
|
|
534
|
+
MatrixOrder: { ColumnMajor: number; RowMajor: number };
|
|
535
|
+
SceneChangeIds: new () => SceneChangeIds;
|
|
536
|
+
SceneMetadata: new () => SceneMetadata;
|
|
537
|
+
RuntimeSettings: new () => RuntimeSettings;
|
|
538
|
+
SpatialFormat: new () => SpatialFormat;
|
|
539
|
+
StringVector: new () => StringVector;
|
|
540
|
+
UpAxis: { X: number; Y: number; Z: number };
|
|
541
|
+
ENV: Record<string, string>;
|
|
542
|
+
|
|
543
|
+
ccall(
|
|
544
|
+
ident: string,
|
|
545
|
+
returnType: string | null,
|
|
546
|
+
argTypes: string[],
|
|
547
|
+
args: unknown[],
|
|
548
|
+
): number;
|
|
549
|
+
|
|
550
|
+
activatedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
551
|
+
AllocateSceneChangesArrays(sceneChangeIds: SceneChangeIds): void;
|
|
552
|
+
createdObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
553
|
+
dataPtrView(attributeInfo: AttributeInfo): Uint32Array;
|
|
554
|
+
deactivatedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
555
|
+
remaskedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
556
|
+
deletedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
557
|
+
GetDrawnOctantMask(handle: number, sceneObjectId: number): number;
|
|
558
|
+
GetOctantLocalBoundingBoxes(handle: number, sceneObjectId: number): number[];
|
|
559
|
+
GetAssetsAsync(handle: number, tags: StringVector): unknown[];
|
|
560
|
+
GetSceneChanges(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
561
|
+
GetSceneChangesCounts(handle: number, sceneChangeIds: SceneChangeIds): void;
|
|
562
|
+
GetSceneMetadata(handle: number, metadata: SceneMetadata): { value: number };
|
|
563
|
+
GetName(handle: number, sceneObjectId: number): string;
|
|
564
|
+
HasFeature(handle: number, sceneObjectId: number, feature: number): boolean;
|
|
565
|
+
GetFeatureVersion(handle: number, sceneObjectId: number, feature: number): number;
|
|
566
|
+
GetFeatureState(handle: number, sceneObjectId: number, feature: number): number;
|
|
567
|
+
GetAssetFormatVersion(handle: number, sceneObjectId: number): number;
|
|
568
|
+
GetDrMapLadderRoughnessLevels(handle: number, sceneObjectId: number): number[];
|
|
569
|
+
SetClientSpatialFormat(handle: number, spatialFormat: SpatialFormat): { value: number };
|
|
570
|
+
SetRuntimeSettings(handle: number, settings: RuntimeSettings): { value: number };
|
|
571
|
+
SetStreamFetchMode(handle: number, streamObjectId: number, mode: number): boolean;
|
|
572
|
+
GetStreamFetchMode(handle: number, streamObjectId: number): number;
|
|
573
|
+
TakeEvictedClientSideAttributeIds(handle: number): EmbindVector<bigint>;
|
|
574
|
+
GetActiveClientSideIdsCheckSum(): number;
|
|
575
|
+
TakeRenderRequired(handle: number): boolean;
|
|
576
|
+
BeginFrame(
|
|
577
|
+
contextHandle: number,
|
|
578
|
+
previousFrameTimeMs: number,
|
|
579
|
+
primsResident: number,
|
|
580
|
+
primCapacity: number,
|
|
581
|
+
): number;
|
|
582
|
+
modifiedObjectIdsView(sceneChangeIds: SceneChangeIds): Uint32Array;
|
|
583
|
+
setMaxCacheSize(maxSizeBytes: number): void;
|
|
584
|
+
SetPreferSharkEncodingProfiles(prefer: boolean): void;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The main Miris application.
|
|
589
|
+
*
|
|
590
|
+
* @remarks
|
|
591
|
+
* This class is initialized asynchronously, so synchronous operations may
|
|
592
|
+
* fail if Miris is not ready. To ensure Miris is ready, await `miris.ready`
|
|
593
|
+
* or get `miris.pending`.
|
|
594
|
+
*/
|
|
595
|
+
export declare class Miris {
|
|
596
|
+
#private;
|
|
597
|
+
static tryUseShark: boolean;
|
|
598
|
+
static _instance: Miris;
|
|
599
|
+
static instance<T extends typeof Miris>(this: T): Promise<InstanceType<T>>;
|
|
600
|
+
readonly engine: Engine;
|
|
601
|
+
readonly ready: Promise<this>;
|
|
602
|
+
readonly pending: boolean;
|
|
603
|
+
get sharedContext(): number | undefined;
|
|
604
|
+
get viewerKey(): string | null | undefined;
|
|
605
|
+
set viewerKey(viewerKey: string | null | undefined);
|
|
606
|
+
get scenes(): Set<Scene>;
|
|
607
|
+
/* Excluded from this release type: _createNewClientId */
|
|
608
|
+
get useSphericalHarmonics(): boolean;
|
|
609
|
+
set useSphericalHarmonics(value: boolean);
|
|
610
|
+
constructor();
|
|
611
|
+
dispose(): void;
|
|
612
|
+
updateParentedTransform(_modelTransform: Float32Array<ArrayBuffer>, _parentTransform: Float32Array<ArrayBuffer>): Float32Array<ArrayBuffer> | undefined;
|
|
613
|
+
protected _xrModeActive: boolean;
|
|
614
|
+
protected _xrSession: XRSession | null;
|
|
615
|
+
protected _requestAnimationFrame: RequestAnimationFrameFn | null;
|
|
616
|
+
signalResumeFromIdle(): void;
|
|
617
|
+
get _splatCountBudget(): number;
|
|
618
|
+
/**
|
|
619
|
+
* Why 43? Because the AVP throttles down to 45Hz :(
|
|
620
|
+
*/
|
|
621
|
+
static readonly _XR_TARGET_FRAME_RATE = 43;
|
|
622
|
+
/* Excluded from this release type: _XR_SPLAT_COUNT_BUDGET */
|
|
623
|
+
/* Excluded from this release type: _SHARK_SPLAT_CAPACITY_MOBILE */
|
|
624
|
+
static readonly _SHARK_SPLAT_CAPACITY_DESKTOP: number;
|
|
625
|
+
/* Excluded from this release type: _SHARK_SPLAT_BUDGET_CAP_MOBILE */
|
|
626
|
+
static readonly _SHARK_SPLAT_BUDGET_CAP_DESKTOP = 2400000;
|
|
627
|
+
/* Excluded from this release type: _isMobileDevice */
|
|
628
|
+
/* Excluded from this release type: _sharkSplatCapacity */
|
|
629
|
+
/* Excluded from this release type: _minimumSplatCount */
|
|
630
|
+
/* Excluded from this release type: _splatCountStorageKey */
|
|
631
|
+
/* Excluded from this release type: _reloadWithLowerSplatCapacity */
|
|
632
|
+
/* Excluded from this release type: _limitSharkSplatCapacity */
|
|
633
|
+
/* Excluded from this release type: _sharkSplatBudgetCap */
|
|
634
|
+
/* Excluded from this release type: _setTargetFrameRate */
|
|
635
|
+
/* Excluded from this release type: _setXRModeActive */
|
|
636
|
+
/* Excluded from this release type: _setSplatCountBudgetOverride */
|
|
637
|
+
/* Excluded from this release type: _reportRendererPrims */
|
|
638
|
+
/* Excluded from this release type: _update */
|
|
639
|
+
getLocalTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
640
|
+
getWorldTransform(client: Client, sceneObjectId: number): Float32Array<ArrayBuffer> | undefined;
|
|
641
|
+
/* Excluded from this release type: _updateForScene */
|
|
642
|
+
applyChanges(_entries: Change[]): void;
|
|
643
|
+
_computeAdditionalRenderNeeded(): boolean;
|
|
644
|
+
onColorSpaceDetected(_isLinear: boolean): void;
|
|
645
|
+
add(scene: Scene): void;
|
|
646
|
+
delete(scene: Scene): void;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export declare class ModelRoot {
|
|
650
|
+
#private;
|
|
651
|
+
static forKey(key: unknown): ModelRoot | undefined;
|
|
652
|
+
static forId(id: number): ModelRoot | undefined;
|
|
653
|
+
readonly id: ModelRootInit["id"];
|
|
654
|
+
get key(): unknown;
|
|
655
|
+
set key(key: unknown);
|
|
656
|
+
get lods(): Set<Lod>;
|
|
657
|
+
set transform(transform: Float32Array<ArrayBuffer>);
|
|
658
|
+
get transform(): Float32Array<ArrayBuffer>;
|
|
659
|
+
readonly stream: Stream;
|
|
660
|
+
constructor({ id, stream }: ModelRootInit);
|
|
661
|
+
add(lod: Lod): void;
|
|
662
|
+
dispose(): void;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export declare type ModelRootInit = {
|
|
666
|
+
id: number;
|
|
667
|
+
stream: Stream;
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* The byte-exact counterpart of getRawUint32Attribute above: same no-padding, no-takeAttribute
|
|
672
|
+
* contract, returning bytes rather than words.
|
|
673
|
+
*
|
|
674
|
+
* Use this rather than that one wherever the stride is not a whole number of words: the
|
|
675
|
+
* reflectance records' 18- and 26-byte strides are not, and an odd record count would lose that
|
|
676
|
+
* record's last field to dataPtrView's truncation.
|
|
677
|
+
*/
|
|
678
|
+
export declare type RawByteAttributeWithBounds = {
|
|
679
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
680
|
+
minValue: {
|
|
681
|
+
x: number;
|
|
682
|
+
y: number;
|
|
683
|
+
z: number;
|
|
684
|
+
};
|
|
685
|
+
maxValue: {
|
|
686
|
+
x: number;
|
|
687
|
+
y: number;
|
|
688
|
+
z: number;
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
declare type ReadyState_2 = typeof HaveNothing | typeof HaveMetadata | typeof HaveData;
|
|
693
|
+
export { ReadyState_2 as ReadyState }
|
|
694
|
+
|
|
695
|
+
declare interface RendererWGPU {
|
|
696
|
+
getProgramCount(): number;
|
|
697
|
+
getTextureCount(): number;
|
|
698
|
+
getEstimatedTextureSize(): number;
|
|
699
|
+
getTotalBufferSize(): number;
|
|
700
|
+
getGpuBufferSize(): number;
|
|
701
|
+
getUploadBufferSize(): number;
|
|
702
|
+
info: SharkInfo;
|
|
703
|
+
delete(): void;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
declare interface RenderState {
|
|
707
|
+
delete(): void;
|
|
708
|
+
initRenderState(
|
|
709
|
+
renderer: RendererWGPU,
|
|
710
|
+
width: number,
|
|
711
|
+
height: number,
|
|
712
|
+
vertices: number,
|
|
713
|
+
splats: number,
|
|
714
|
+
cubes: number,
|
|
715
|
+
sortThreads: number,
|
|
716
|
+
sortGroupSize: number,
|
|
717
|
+
sortKeySize: number,
|
|
718
|
+
): void;
|
|
719
|
+
initGraphicsState(
|
|
720
|
+
width: number,
|
|
721
|
+
height: number,
|
|
722
|
+
renderTextureFormat: TextureFormatValue,
|
|
723
|
+
depthTextureFormat: TextureFormatValue,
|
|
724
|
+
): void;
|
|
725
|
+
updateRenderDetails(
|
|
726
|
+
width: number,
|
|
727
|
+
height: number,
|
|
728
|
+
splatTriangles: number,
|
|
729
|
+
): void;
|
|
730
|
+
// Decodes Radiance .hdr bytes into roughness-ladder level `level` (0 is the sharp mirror).
|
|
731
|
+
// hdrPtr must address THIS module's heap - _malloc here and copy the bytes in.
|
|
732
|
+
// Returns false for bytes that are not a usable Radiance image, or a level out of range.
|
|
733
|
+
uploadEnvironmentLadderLevelFromHdr(
|
|
734
|
+
level: number,
|
|
735
|
+
sigmaDeg: number,
|
|
736
|
+
hdrPtr: number,
|
|
737
|
+
hdrSizeBytes: number,
|
|
738
|
+
): boolean;
|
|
739
|
+
// Republish the ladder's shape. Call after any level lands, or it is sampled at whatever shape
|
|
740
|
+
// the last uploadSplatSetData declared. Pass SplatSet.hasReflectionParams().
|
|
741
|
+
uploadReflectionLadderParams(reflectionsEnabled: boolean): void;
|
|
742
|
+
// Debug controls. Drop the reflection term, or replace the surfel colour with one of the layers
|
|
743
|
+
// it is shaded from, numbered as RenderViewModes.h's AOV_* defines. setRenderView below sets
|
|
744
|
+
// the AOV together with the rest of a named view.
|
|
745
|
+
setReflectionsEnabled(enabled: boolean): void;
|
|
746
|
+
// Render textured gaussians on pixels no surfel covers, resolved as fvdb's open gate does.
|
|
747
|
+
// Off by default: those pixels show the clear colour.
|
|
748
|
+
setSurfelLessTextureSplatsEnabled(enabled: boolean): void;
|
|
749
|
+
setDebugAovMode(mode: number): void;
|
|
750
|
+
// GPU pass timing. Turning it on makes every pass write timestamps; a no-op on a device without
|
|
751
|
+
// timestamp-query. resolveTimeStamps goes after a frame's render; passTimingsMs starts a readback
|
|
752
|
+
// of them unless one is in flight and maps pass name to milliseconds from the last that landed.
|
|
753
|
+
setPassTimingEnabled(enabled: boolean): void;
|
|
754
|
+
resolveTimeStamps(): void;
|
|
755
|
+
passTimingsMs(): Record<string, number>;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
declare type RequestAnimationFrameFn = ((callback: FrameRequestCallback) => number) | ((callback: XRFrameRequestCallback) => void);
|
|
759
|
+
|
|
760
|
+
declare interface RuntimeSettings extends EmbindObject {
|
|
761
|
+
maxBandwidthBitsPerSecond: number;
|
|
762
|
+
maxConcurrentRequests: number;
|
|
763
|
+
targetFramesPerSecond: number;
|
|
764
|
+
xrModeActive: boolean;
|
|
765
|
+
splatCountBudget: number;
|
|
766
|
+
splatCountBudgetCap: number;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export declare class Scene extends EventTarget {
|
|
770
|
+
#private;
|
|
771
|
+
get camera(): Camera | null;
|
|
772
|
+
set camera(camera: Camera | null);
|
|
773
|
+
static forId(id: number): Scene | undefined;
|
|
774
|
+
static forKey(key: unknown): Scene | undefined;
|
|
775
|
+
readonly id: number;
|
|
776
|
+
get key(): unknown;
|
|
777
|
+
set key(key: unknown);
|
|
778
|
+
/* Excluded from this release type: _assetFormat */
|
|
779
|
+
get viewerKey(): string | null;
|
|
780
|
+
set viewerKey(viewerKey: string | null);
|
|
781
|
+
get streams(): Set<Stream>;
|
|
782
|
+
get lods(): LodStore;
|
|
783
|
+
readonly miris: Miris;
|
|
784
|
+
readonly engine: Engine;
|
|
785
|
+
readonly client: Client;
|
|
786
|
+
readonly handle?: number;
|
|
787
|
+
constructor({ miris, viewerKey }: SceneInit);
|
|
788
|
+
/**
|
|
789
|
+
* Drives a frame and answers whether *this* scene's canvas needs repainting. Call it once per
|
|
790
|
+
* displayed frame from the host's animation loop, and render when it returns true.
|
|
791
|
+
*
|
|
792
|
+
* Every scene on the page calls this from its own loop. The first call in a displayed frame
|
|
793
|
+
* drives one engine tick for all of them; the rest recognise the frame and reuse it.
|
|
794
|
+
*
|
|
795
|
+
* @param ts the host's frame timestamp. Optional - the document timeline supplies one, and it
|
|
796
|
+
* reads the same for every scene in a displayed frame. Pass it when the host runs its own
|
|
797
|
+
* clock, as an immersive XR session does, because XRFrame time is not the document timeline.
|
|
798
|
+
*/
|
|
799
|
+
update(ts?: DOMHighResTimeStamp): boolean;
|
|
800
|
+
dispose(): void;
|
|
801
|
+
fetchAssets(tags?: string | Iterable<string>): Promise<{
|
|
802
|
+
name: string;
|
|
803
|
+
thumbnailUrl: string;
|
|
804
|
+
uuid: string;
|
|
805
|
+
tags: string[];
|
|
806
|
+
}[]>;
|
|
807
|
+
add(stream: Stream): void;
|
|
808
|
+
getStreamForId(streamObjectId: number): Stream | undefined;
|
|
809
|
+
getStreamForDescendentId(descendentObjectId: number): Stream | null;
|
|
810
|
+
getModelRootForDescendentId(descendentObjectId: number): ModelRoot | null;
|
|
811
|
+
_recordAssetFormat(modelRoot: ModelRoot, formatVersion: number): void;
|
|
812
|
+
/* Excluded from this release type: _getFeatureMesh */
|
|
813
|
+
/* Excluded from this release type: _getDrMap */
|
|
814
|
+
/* Excluded from this release type: _onDrMapLadder */
|
|
815
|
+
/* Excluded from this release type: _onFeatureData */
|
|
816
|
+
/* Excluded from this release type: _applyStreamFetchModes */
|
|
817
|
+
/* Excluded from this release type: _updateStreamStatuses */
|
|
818
|
+
/* Excluded from this release type: _onSceneLoaded */
|
|
819
|
+
delete(stream: Stream): void;
|
|
820
|
+
close(): void;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
declare interface SceneChangeIds extends EmbindObject {
|
|
824
|
+
readonly createdObjectsCount: number;
|
|
825
|
+
readonly activatedObjectsCount: number;
|
|
826
|
+
readonly modifiedObjectsCount: number;
|
|
827
|
+
readonly deactivatedObjectsCount: number;
|
|
828
|
+
readonly deletedObjectsCount: number;
|
|
829
|
+
readonly remaskedObjectsCount: number;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export declare type SceneInit = {
|
|
833
|
+
miris: Miris;
|
|
834
|
+
viewerKey?: string | null;
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
declare interface SceneMetadata extends EmbindObject {
|
|
838
|
+
readonly inputColorSpace: string;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare interface SharkInfo {
|
|
842
|
+
renderCalls: number;
|
|
843
|
+
render: SharkRenderInfo;
|
|
844
|
+
reset(): void;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
declare interface SharkModule {
|
|
848
|
+
Camera: new () => Camera_2;
|
|
849
|
+
RenderState: new () => RenderState;
|
|
850
|
+
SplatSet: new () => SplatSet;
|
|
851
|
+
GlassMeshRegistry: new () => GlassMeshRegistry;
|
|
852
|
+
vec4: new (x: number, y: number, z: number, w: number) => vec4;
|
|
853
|
+
|
|
854
|
+
SortType: {
|
|
855
|
+
RADIX_SORT: SortTypeValue;
|
|
856
|
+
OCTREE_SORT: SortTypeValue;
|
|
857
|
+
KDTREE_SORT: SortTypeValue;
|
|
858
|
+
STD_SORT: SortTypeValue;
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
TextureFormat: {
|
|
862
|
+
RGBA32_Float: TextureFormatValue;
|
|
863
|
+
RGBA16_Float: TextureFormatValue;
|
|
864
|
+
RG16_Float: TextureFormatValue;
|
|
865
|
+
RGBA32_UInt: TextureFormatValue;
|
|
866
|
+
RGBA32_SInt: TextureFormatValue;
|
|
867
|
+
RGBA16_UInt: TextureFormatValue;
|
|
868
|
+
RGBA16_SInt: TextureFormatValue;
|
|
869
|
+
RGBA8_UInt: TextureFormatValue;
|
|
870
|
+
RGBA8_SInt: TextureFormatValue;
|
|
871
|
+
RGBA8_UNorm: TextureFormatValue;
|
|
872
|
+
RGBA8_SNorm: TextureFormatValue;
|
|
873
|
+
RGBA16_UNorm: TextureFormatValue;
|
|
874
|
+
RGBA16_SNorm: TextureFormatValue;
|
|
875
|
+
BGRA8_UNorm: TextureFormatValue;
|
|
876
|
+
BC6HRGB_UFloat: TextureFormatValue;
|
|
877
|
+
BC6HRGB_Float: TextureFormatValue;
|
|
878
|
+
BC7RGBA_UNorm: TextureFormatValue;
|
|
879
|
+
BC7RGBA_UNormSrgb: TextureFormatValue;
|
|
880
|
+
BC3RGBA_UNorm: TextureFormatValue;
|
|
881
|
+
BC3RGBA_UNormSrgb: TextureFormatValue;
|
|
882
|
+
Depth16Unorm: TextureFormatValue;
|
|
883
|
+
Depth24Plus: TextureFormatValue;
|
|
884
|
+
Depth32Float: TextureFormatValue;
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
WebGPU: WebGPUInterface;
|
|
888
|
+
|
|
889
|
+
// HEAPU8 is replaced whenever the heap grows, so read it fresh rather than caching it.
|
|
890
|
+
_malloc(byteCount: number): number;
|
|
891
|
+
_free(ptr: number): void;
|
|
892
|
+
readonly HEAPU8: Uint8Array;
|
|
893
|
+
|
|
894
|
+
uploadSplatSetData(
|
|
895
|
+
set: SplatSet,
|
|
896
|
+
renderState: RenderState,
|
|
897
|
+
start: number,
|
|
898
|
+
): void;
|
|
899
|
+
uploadChunkFades(set: SplatSet, renderState: RenderState): void;
|
|
900
|
+
// One mat4 per model root, so cheap enough to call every frame while an asset is moving
|
|
901
|
+
uploadModelRootTransforms(set: SplatSet, renderState: RenderState): void;
|
|
902
|
+
processSplatSet(
|
|
903
|
+
camera: Camera_2,
|
|
904
|
+
set: SplatSet,
|
|
905
|
+
renderState: RenderState,
|
|
906
|
+
width: number,
|
|
907
|
+
height: number,
|
|
908
|
+
triangles: number,
|
|
909
|
+
projectOnGPU: boolean,
|
|
910
|
+
cullEllipsoid: boolean,
|
|
911
|
+
useAffineApprox: boolean,
|
|
912
|
+
depthSortOnGPU: boolean,
|
|
913
|
+
useInvZ: boolean,
|
|
914
|
+
rasterizeWithCompute: boolean,
|
|
915
|
+
useSOGS: boolean,
|
|
916
|
+
sortType: SortTypeValue,
|
|
917
|
+
skipSort: boolean,
|
|
918
|
+
): number;
|
|
919
|
+
createRendererWGPUWithoutSurface(
|
|
920
|
+
colorTargetFormat: TextureFormatValue,
|
|
921
|
+
): RendererWGPU;
|
|
922
|
+
/// Gives back the reference WebGPU.importJsTexture returned for a texture.
|
|
923
|
+
releaseImportedTexture(texture: number): void;
|
|
924
|
+
renderSplatSetToSceneTextures(
|
|
925
|
+
splatSet: SplatSet,
|
|
926
|
+
renderState: RenderState,
|
|
927
|
+
colorTarget: number,
|
|
928
|
+
depthTarget: number,
|
|
929
|
+
renderGES: boolean,
|
|
930
|
+
): void;
|
|
931
|
+
// Render view registry, indexed as RenderViews.h orders it. setRenderView ignores an index
|
|
932
|
+
// Shark cannot produce.
|
|
933
|
+
setRenderView(viewIndex: number): void;
|
|
934
|
+
renderView(): number;
|
|
935
|
+
renderViewCount(): number;
|
|
936
|
+
renderViewName(viewIndex: number): string;
|
|
937
|
+
renderViewSupported(viewIndex: number): boolean;
|
|
938
|
+
// The next supported view, forwards for direction 1 and backwards for -1.
|
|
939
|
+
stepRenderView(from: number, direction: number): number;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
declare interface SharkRenderInfo {
|
|
943
|
+
triangles: number;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
declare interface SortTypeValue {
|
|
947
|
+
value: number;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
/** @deprecated Use clientAttributeList. */
|
|
951
|
+
export declare const sparkAttributeList: Record<string, ClientAttributeInfo>;
|
|
952
|
+
|
|
953
|
+
declare interface SpatialFormat extends EmbindObject {
|
|
954
|
+
metersPerUnit: number;
|
|
955
|
+
upAxis: number;
|
|
956
|
+
matrixOrder: number;
|
|
957
|
+
handedness: number;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
declare interface SplatSet {
|
|
961
|
+
splatCount: number;
|
|
962
|
+
// Number of splats actually drawn: ordering[0, activeSplats) holds the unmasked splat indices.
|
|
963
|
+
// Set alongside orderingView() to restrict the draw to unmasked octant ranges.
|
|
964
|
+
activeSplats: number;
|
|
965
|
+
// Selects which ellipsoid layout to allocate and what ellipsoidsView() exposes:
|
|
966
|
+
// packed (16 bytes/splat) or uncompressed (48). Must be set before the first resize.
|
|
967
|
+
usePackedEllipsoids: boolean;
|
|
968
|
+
// direct-write upload: resize -> write into the views -> finalize.
|
|
969
|
+
// views are valid only until the next resize.
|
|
970
|
+
resize(splatCount: number): void;
|
|
971
|
+
ellipsoidsView(): Uint32Array;
|
|
972
|
+
colorsView(): Uint32Array;
|
|
973
|
+
sh1View(): Uint32Array;
|
|
974
|
+
sh2View(): Uint32Array;
|
|
975
|
+
sh3aView(): Uint32Array;
|
|
976
|
+
sh3bView(): Uint32Array;
|
|
977
|
+
// mod_depth is a half-float per primitive slot (dense, padded for non-surfels), so this is a
|
|
978
|
+
// Uint16Array unlike every other view here -- do not address it with the uint32 splat strides
|
|
979
|
+
// used for ellipsoids/colors/sh*.
|
|
980
|
+
modDepthView(): Uint16Array;
|
|
981
|
+
// Per-chunk fade (opacity multiplier), one float per chunk, defaults to 1.0.
|
|
982
|
+
// Also sizes the chunk slot to model root slot map below, since both are indexed by chunk slot
|
|
983
|
+
resizeChunkFades(chunkCount: number): void;
|
|
984
|
+
chunkFadesView(): Float32Array;
|
|
985
|
+
// Per-splat chunk index, defaults to slot 0. Write before finalize()
|
|
986
|
+
chunkIndicesView(): Int32Array;
|
|
987
|
+
// Model transforms, resolved per splat as
|
|
988
|
+
// modelRootTransforms[chunkModelRoots[chunkIndices[splat]]]
|
|
989
|
+
// Slot 0 of both tables is reserved as identity, so real slots start at 1 and a set that
|
|
990
|
+
// never writes them renders untransformed.
|
|
991
|
+
resizeModelRootSlots(modelRootCount: number): void;
|
|
992
|
+
// 16 floats per model root, COLUMN-major - i.e. write THREE's Matrix4.toArray() straight in
|
|
993
|
+
modelRootTransformsView(): Float32Array;
|
|
994
|
+
// The inverses, same slots and layout. The true-perspective projection (Project.glsl) transforms
|
|
995
|
+
// a quadratic form and needs them; writing a transform without its inverse leaves that path
|
|
996
|
+
// projecting the splat as if untransformed. Use Matrix4.invert() on a copy
|
|
997
|
+
modelRootInverseTransformsView(): Float32Array;
|
|
998
|
+
// Sized by resizeChunkFades. Defaults to slot 0 (identity) for every chunk
|
|
999
|
+
chunkModelRootsView(): Int32Array;
|
|
1000
|
+
// resizeModelRootSlots resets every slot to the absolute decode. False for a slot outside the table
|
|
1001
|
+
setModelRootRootRelativeDecode(
|
|
1002
|
+
slot: number,
|
|
1003
|
+
originX: number,
|
|
1004
|
+
originY: number,
|
|
1005
|
+
originZ: number,
|
|
1006
|
+
step: number,
|
|
1007
|
+
lnScaleOffset: number,
|
|
1008
|
+
): boolean;
|
|
1009
|
+
// int32 render-order buffer (sized 2*splatCount after finalize). Valid only until the next resize.
|
|
1010
|
+
orderingView(): Int32Array;
|
|
1011
|
+
finalize(): void;
|
|
1012
|
+
// like finalize() but keeps splats in their delivered (octant-sorted) order — no kd-tree reorder —
|
|
1013
|
+
// so sparse-octant range masking can index child-octant ranges directly. RADIX_SORT only.
|
|
1014
|
+
finalizeBounds(): void;
|
|
1015
|
+
// Whether the asset carries per-surfel reflectance records, which is what decides whether
|
|
1016
|
+
// reflections are shaded at all. Pass to RenderState.uploadReflectionLadderParams.
|
|
1017
|
+
hasReflectionParams(): boolean;
|
|
1018
|
+
// Widens packed reflectance records - recordVersion 2 for 18-byte reflectanceDataV2, 1 for
|
|
1019
|
+
// 26-byte reflectanceDataV1 - into the per-splat GPU records at bufferOffset. wirePtr must
|
|
1020
|
+
// address THIS module's heap - _malloc here and copy the bytes in, since the attribute lives in
|
|
1021
|
+
// the engine module's. Records cover a node's surfel range, which starts at its first splat.
|
|
1022
|
+
// Returns the records written; 0 if the data was rejected.
|
|
1023
|
+
decodeReflectionParams(
|
|
1024
|
+
recordVersion: number,
|
|
1025
|
+
wirePtr: number,
|
|
1026
|
+
wireSizeBytes: number,
|
|
1027
|
+
elementCount: number,
|
|
1028
|
+
bufferOffset: number,
|
|
1029
|
+
nodeSplatCount: number,
|
|
1030
|
+
logId: number,
|
|
1031
|
+
): number;
|
|
1032
|
+
// Zeroes records in [startSplat, endSplat). Needed wherever splats are re-packed at fresh
|
|
1033
|
+
// offsets, or a reused slot shades its splat from the previous occupant's material.
|
|
1034
|
+
clearReflectionParams(startSplat: number, endSplat: number): void;
|
|
1035
|
+
// Splats in [0, count) holding a non-zero record. Diagnostic.
|
|
1036
|
+
populatedReflectionParamCount(count: number): number;
|
|
1037
|
+
delete(): void;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export declare class Stream extends EventTarget {
|
|
1041
|
+
#private;
|
|
1042
|
+
static readonly _idMap: Map<number, Stream>;
|
|
1043
|
+
static readonly _keyMap: Map<unknown, Stream>;
|
|
1044
|
+
static forId(id?: number): Stream | undefined;
|
|
1045
|
+
static forKey(key: unknown): Stream | undefined;
|
|
1046
|
+
readonly id: number;
|
|
1047
|
+
readonly scene: Scene;
|
|
1048
|
+
readonly miris: Miris;
|
|
1049
|
+
readonly client: Client;
|
|
1050
|
+
readonly engine: Engine;
|
|
1051
|
+
/* Excluded from this release type: _addVariantCollection */
|
|
1052
|
+
/* Excluded from this release type: _findAndAddToVariantSet */
|
|
1053
|
+
/* Excluded from this release type: _addVariant */
|
|
1054
|
+
/* Excluded from this release type: _exportVariantHierarchies */
|
|
1055
|
+
/* Excluded from this release type: _setVariantSelection */
|
|
1056
|
+
get key(): unknown;
|
|
1057
|
+
set key(key: unknown);
|
|
1058
|
+
get matrix(): Matrix4x4Tuple;
|
|
1059
|
+
set matrix(matrix: Matrix4x4Tuple);
|
|
1060
|
+
get opacity(): number;
|
|
1061
|
+
set opacity(opacity: number);
|
|
1062
|
+
get fetchMode(): StreamFetchMode;
|
|
1063
|
+
set fetchMode(fetchMode: StreamFetchMode);
|
|
1064
|
+
/* Excluded from this release type: _applyFetchMode */
|
|
1065
|
+
get boundingBox(): {
|
|
1066
|
+
min: {
|
|
1067
|
+
x: number;
|
|
1068
|
+
y: number;
|
|
1069
|
+
z: number;
|
|
1070
|
+
};
|
|
1071
|
+
max: {
|
|
1072
|
+
x: number;
|
|
1073
|
+
y: number;
|
|
1074
|
+
z: number;
|
|
1075
|
+
};
|
|
1076
|
+
size: {
|
|
1077
|
+
x: number;
|
|
1078
|
+
y: number;
|
|
1079
|
+
z: number;
|
|
1080
|
+
};
|
|
1081
|
+
center: {
|
|
1082
|
+
x: number;
|
|
1083
|
+
y: number;
|
|
1084
|
+
z: number;
|
|
1085
|
+
};
|
|
1086
|
+
} | undefined;
|
|
1087
|
+
get modelRoots(): Set<ModelRoot>;
|
|
1088
|
+
/**
|
|
1089
|
+
* @deprecated Use `modelRoots` instead.
|
|
1090
|
+
*/
|
|
1091
|
+
get chunks(): Set<ModelRoot>;
|
|
1092
|
+
constructor(options: StreamInit);
|
|
1093
|
+
_initStream({ uuid }: StreamInit): void;
|
|
1094
|
+
/* Excluded from this release type: _onStreamLoaded */
|
|
1095
|
+
getDefaultCameraTransform(): Float32Array<ArrayBuffer> | null | undefined;
|
|
1096
|
+
/* Excluded from this release type: _getViewingVolumeObb */
|
|
1097
|
+
/** How much of the stream has loaded, as of the last frame. */
|
|
1098
|
+
get readyState(): ReadyState_2;
|
|
1099
|
+
/* Excluded from this release type: _updateStatus */
|
|
1100
|
+
/* Excluded from this release type: _onRootLoaded */
|
|
1101
|
+
add(modelRoot: ModelRoot): void;
|
|
1102
|
+
end(): void;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* What the engine will do with stream data: "regular" fetches and draws what the
|
|
1107
|
+
* camera needs. "prefetch" keeps fetching for the camera into the cache but does not change what is drawn.
|
|
1108
|
+
* "parked" fetches nothing and draws nothing, giving its share of the splat budget and
|
|
1109
|
+
* renderer to the other streams; what it already loaded stays cached on the cpu side for when it is unparked.
|
|
1110
|
+
* You may want to park streams while making them invisible.
|
|
1111
|
+
*/
|
|
1112
|
+
export declare type StreamFetchMode = "regular" | "prefetch" | "parked";
|
|
1113
|
+
|
|
1114
|
+
export declare type StreamInit = {
|
|
1115
|
+
uuid: string;
|
|
1116
|
+
scene: Scene;
|
|
1117
|
+
authToken?: string;
|
|
1118
|
+
drmKey?: string;
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
declare type StringVector = EmbindVector<string>;
|
|
1122
|
+
|
|
1123
|
+
declare interface TextureFormatValue {
|
|
1124
|
+
value: number;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/** Recursive variant tree node from WASM. */
|
|
1128
|
+
export declare type VariantNode = {
|
|
1129
|
+
id: number;
|
|
1130
|
+
name?: string;
|
|
1131
|
+
type?: string;
|
|
1132
|
+
children?: VariantNode[];
|
|
1133
|
+
options?: VariantNode[];
|
|
1134
|
+
nestedSets?: VariantNode[];
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
declare interface vec4 {
|
|
1138
|
+
x: number;
|
|
1139
|
+
y: number;
|
|
1140
|
+
z: number;
|
|
1141
|
+
w: number;
|
|
1142
|
+
delete(): void;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
declare interface WebGPUInterface {
|
|
1146
|
+
importJsAdapter(adapter: GPUAdapter, parentPtr?: number): number;
|
|
1147
|
+
importJsDevice(device: GPUDevice, parentPtr?: number): number;
|
|
1148
|
+
importJsTexture(obj: GPUTexture, parentPtr?: number): number;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
export { }
|