@playcanvas/supersplat-viewer 1.30.0 → 1.30.1
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 +9 -6
- package/dist/index.d.ts +8 -5
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/public/index.html +6 -0
- package/public/index.js +12 -5
- package/public/index.js.map +1 -1
package/README.md
CHANGED
|
@@ -84,12 +84,15 @@ instance — except an inline `settings` object, which takes precedence over `?s
|
|
|
84
84
|
Set both `inlineCss` and `inlineJs` for a single self-contained file, with the splat passed as
|
|
85
85
|
a `data:` URI in `contentUrl` and the settings supplied inline through the bootstrap's
|
|
86
86
|
`settings` object — without an inline settings object the page still fetches `./settings.json`
|
|
87
|
-
from a sibling file.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
from a sibling file. A `data:` URI has no filename and the splat format is chosen by the
|
|
88
|
+
name's extension, so name its content with the bootstrap's `contentFilename` (e.g.
|
|
89
|
+
`scene.sog`). The flags are independent, so a server that serves the bundle from its own
|
|
90
|
+
route can inline only the stylesheet.
|
|
91
|
+
|
|
92
|
+
`html` is still exported as a raw string, but is **deprecated**: its formatting is not part of
|
|
93
|
+
this package's API and changes between releases, so pattern-matching it is unsupported. `css`
|
|
94
|
+
and `js` remain exported for serving (or writing) the stylesheet and bundle alongside a
|
|
95
|
+
rendered document that doesn't inline them.
|
|
93
96
|
|
|
94
97
|
### Settings
|
|
95
98
|
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,13 @@ type ViewerBootstrap = {
|
|
|
15
15
|
settingsUrl?: string;
|
|
16
16
|
/** Splat url. May be a `data:` uri, for a document with no sibling files. */
|
|
17
17
|
contentUrl?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Filename describing {@link ViewerBootstrap.contentUrl}, e.g. `scene.sog`. The splat
|
|
20
|
+
* format is chosen by the name's extension, so this is required when the url itself has
|
|
21
|
+
* no usable name — a `data:` uri. Ignored when a `?content=` url param overrides the url
|
|
22
|
+
* it describes.
|
|
23
|
+
*/
|
|
24
|
+
contentFilename?: string;
|
|
18
25
|
/** Poster image shown, blurred, while the splat loads. */
|
|
19
26
|
posterUrl?: string;
|
|
20
27
|
/** Equirectangular skybox texture url. */
|
|
@@ -70,11 +77,7 @@ declare const renderViewerHtml: (options?: RenderViewerHtmlOptions) => string;
|
|
|
70
77
|
* releases.
|
|
71
78
|
*/
|
|
72
79
|
declare const html: string;
|
|
73
|
-
/**
|
|
74
|
-
* The viewer's stylesheet.
|
|
75
|
-
*
|
|
76
|
-
* @deprecated Use {@link renderViewerHtml} instead, which can inline it for you.
|
|
77
|
-
*/
|
|
80
|
+
/** The viewer's stylesheet, for serving alongside a rendered document. */
|
|
78
81
|
declare const css: string;
|
|
79
82
|
/** The viewer's module bundle, for serving alongside a rendered document. */
|
|
80
83
|
declare const js: string;
|