@playcanvas/supersplat-viewer 1.40.0 → 1.41.0
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/THIRD_PARTY_NOTICES.md +436 -0
- package/dist/gsaf-decoder.d.ts +4 -0
- package/dist/gsaf-decoder.js +10 -0
- package/dist/gsaf-decoder.wasm +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2 -2
- package/dist/viewer.d.ts +17 -2
- package/dist/viewer.js +587 -26
- package/dist/viewer.js.map +1 -1
- package/docs/api.md +18 -2
- package/package.json +7 -1
- package/public/gsaf-decoder.wasm +0 -0
- package/public/index.html +3 -0
- package/public/index.js +636 -25
- package/public/index.js.map +1 -1
package/dist/viewer.d.ts
CHANGED
|
@@ -20,6 +20,13 @@ type ViewerAssets = {
|
|
|
20
20
|
skyboxUrl?: string;
|
|
21
21
|
/** Collision data url, for walk mode. A `.glb` is treated as a mesh, otherwise voxels. */
|
|
22
22
|
collisionUrl?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The gsaf decoder's wasm, fetched only when the content is a `.gsaf` file. Defaults to the
|
|
25
|
+
* `gsaf-decoder.wasm` shipped beside the viewer's bundle. A document with no sibling files
|
|
26
|
+
* (an inlined bundle) sets it to the `data:` url the `@playcanvas/supersplat-viewer/gsaf-decoder`
|
|
27
|
+
* export provides.
|
|
28
|
+
*/
|
|
29
|
+
gsafDecoderUrl?: string;
|
|
23
30
|
};
|
|
24
31
|
/** Per-instance switches. Every one is optional and off unless stated. */
|
|
25
32
|
type ViewerFlags = {
|
|
@@ -196,11 +203,19 @@ type State = {
|
|
|
196
203
|
inputMode: InputMode;
|
|
197
204
|
/** The active camera controller. `anim` is the authored camera animation. */
|
|
198
205
|
cameraMode: CameraMode;
|
|
199
|
-
/**
|
|
206
|
+
/**
|
|
207
|
+
* Whether there is an animation for the timeline to play: the authored camera animation, or
|
|
208
|
+
* the frames of an animated splat sequence ({@link ViewerState.hasSequence}).
|
|
209
|
+
*/
|
|
200
210
|
hasAnimation: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Whether the content is an animated splat sequence (a gsaf file). The timeline plays its
|
|
213
|
+
* frames in every camera mode, and the camera has no animation of its own.
|
|
214
|
+
*/
|
|
215
|
+
hasSequence: boolean;
|
|
201
216
|
/** Length of that animation in seconds, or 0. */
|
|
202
217
|
animationDuration: number;
|
|
203
|
-
/** Playhead position in seconds. Read-only: the animation cursor owns it. */
|
|
218
|
+
/** Playhead position in seconds. Read-only: the animation cursor or the sequence owns it. */
|
|
204
219
|
animationTime: number;
|
|
205
220
|
/** Whether the animation is paused. */
|
|
206
221
|
animationPaused: boolean;
|