@playcanvas/supersplat-viewer 1.42.1 → 1.43.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/README.md CHANGED
@@ -21,13 +21,13 @@ The app supports a number of URL parameters (these are subject to change):
21
21
 
22
22
  ### Content
23
23
 
24
- | Parameter | Description | Default |
25
- | ----------- | ----------------------------------------------------------------------------------------- | ------------------------ |
26
- | `settings` | URL of the `settings.json` file | `./settings.json` |
27
- | `content` | URL of the scene file (`.ply`, `.sog`, `.compressed.ply`, `.meta.json`, `.lod-meta.json`) | `./scene.compressed.ply` |
28
- | `skybox` | URL of an equirectangular skybox image | |
29
- | `poster` | URL of an image to show while loading | |
30
- | `collision` | URL of a collision asset (`.glb` mesh, or voxel data). `voxel` is accepted as an alias. | |
24
+ | Parameter | Description | Default |
25
+ | ----------- | ---------------------------------------------------------------------------------------------------------- | ------------------------ |
26
+ | `settings` | URL of the `settings.json` file | `./settings.json` |
27
+ | `content` | URL of the scene file (`.ply`, `.sog`, `.compressed.ply`, `.meta.json`, `.lod-meta.json`, `.spz`, `.lcc2`) | `./scene.compressed.ply` |
28
+ | `skybox` | URL of an equirectangular skybox image | |
29
+ | `poster` | URL of an image to show while loading | |
30
+ | `collision` | URL of a collision asset (`.glb` mesh, or voxel data). `voxel` is accepted as an alias. | |
31
31
 
32
32
  ### UI
33
33
 
@@ -46,7 +46,7 @@ By default the viewer uses WebGPU when available (falling back automatically whe
46
46
  | Parameter | Description |
47
47
  | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
48
48
  | `webgl` | Force the WebGL renderer (required for AR/VR) |
49
- | `aa` | Enable antialiasing (WebGL only) |
49
+ | `aa` | Force the anti-aliasing compensation for splats: `?aa`, `?aa=1`, `?aa=true`, `?aa=enable` on, other values off (default: per splat, from the file) |
50
50
  | `stochastic` | Experimental unsorted, depth-tested splat renderer: `stochastic` for per-pixel quality, `stochastic=mobile` for phones and headsets. WebGPU only, its XR included |
51
51
  | `splatSource` | Developer knob for the stochastic renderer: the data path feeding it (`direct`, the default, reads the resident files in place; `workbuffer` reads the engine's work buffer) |
52
52
  | `variant` | Developer knob for the stochastic renderer: comma-separated `key:value` experiment switches over the mode's, e.g. `taaSharp:8` |
@@ -2,6 +2,8 @@
2
2
 
3
3
  The MIT License in [`LICENSE`](LICENSE) applies to the SuperSplat Viewer's own code. This package also distributes the gsaf decoder, a WebAssembly module and its JavaScript glue built from gsaf by `scripts/build-gsaf.sh`. It ships as `public/gsaf-decoder.wasm` and `dist/gsaf-decoder.wasm`, inside `public/index.js` and `dist/viewer.js`, and as a `data:` url in `dist/gsaf-decoder.js`. The decoder and the code compiled into it remain under their own licenses, reproduced below.
4
4
 
5
+ It also distributes the ZSTD decoder the PlayCanvas engine's spz parser uses for version 4 files: zstd's single-file decoder compiled to WebAssembly by zstddec, with the engine's JavaScript glue, copied from the engine by hand (`lib/zstd/VERSION`). The wasm ships as `public/zstd-decoder.wasm` and `dist/zstd-decoder.wasm`, the glue inside `public/index.js` and `dist/viewer.js`. Its license, which includes zstd's, is reproduced below.
6
+
5
7
  The LLVM runtime libraries Emscripten links (libc++, libc++abi, compiler-rt) are under Apache-2.0 with the LLVM exception, which waives the notice requirements for code embedded in compiled output.
6
8
 
7
9
  ## gsaf v2.7.3-1-ge227c1b
@@ -434,3 +436,64 @@ permissive licensing, and of not having licensing issues being an
434
436
  obstacle to adoption, that text has been removed.
435
437
 
436
438
  ```
439
+
440
+ ## zstddec 0.3.4, with Zstandard
441
+
442
+ Project: <https://github.com/donmccurdy/zstddec>
443
+
444
+ ```text
445
+ The MIT License (MIT)
446
+
447
+ Copyright (c) 2020 Don McCurdy
448
+
449
+ Permission is hereby granted, free of charge, to any person obtaining a copy
450
+ of this software and associated documentation files (the "Software"), to deal
451
+ in the Software without restriction, including without limitation the rights
452
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
453
+ copies of the Software, and to permit persons to whom the Software is
454
+ furnished to do so, subject to the following conditions:
455
+
456
+ The above copyright notice and this permission notice shall be included in all
457
+ copies or substantial portions of the Software.
458
+
459
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
460
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
461
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
462
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
463
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
464
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
465
+ SOFTWARE.
466
+
467
+ ***
468
+
469
+ BSD License
470
+
471
+ For Zstandard software
472
+
473
+ Copyright (c) 2016-present, Yann Collet, Facebook, Inc. All rights reserved.
474
+
475
+ Redistribution and use in source and binary forms, with or without modification,
476
+ are permitted provided that the following conditions are met:
477
+
478
+ * Redistributions of source code must retain the above copyright notice, this
479
+ list of conditions and the following disclaimer.
480
+
481
+ * Redistributions in binary form must reproduce the above copyright notice,
482
+ this list of conditions and the following disclaimer in the documentation
483
+ and/or other materials provided with the distribution.
484
+
485
+ * Neither the name Facebook nor the names of its contributors may be used to
486
+ endorse or promote products derived from this software without specific
487
+ prior written permission.
488
+
489
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
490
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
491
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
492
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
493
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
494
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
495
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
496
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
497
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
498
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
499
+ ```
package/dist/index.d.ts CHANGED
@@ -25,6 +25,12 @@ type ViewerAssets = {
25
25
  * export provides.
26
26
  */
27
27
  gsafDecoderUrl?: string;
28
+ /**
29
+ * The ZSTD decoder's wasm, fetched only when a version 4 `.spz` file loads, on its own or as
30
+ * a chunk of an `.lcc2` scene. Defaults to the `zstd-decoder.wasm` shipped beside the viewer's
31
+ * bundle. A document with no sibling files (an inlined bundle) sets it to a `data:` url.
32
+ */
33
+ zstdDecoderUrl?: string;
28
34
  };
29
35
 
30
36
  /**