shinygen 4.6.4-rc.2 → 4.6.5-rc.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 +17 -7
- package/index.js +1 -1
- package/index.pck +0 -0
- package/index.wasm.br +0 -0
- package/package.json +3 -2
- package/shinygen.js +1 -1
- package/standalone/index.audio.position.worklet.js +66 -0
- package/standalone/index.audio.worklet.js +213 -0
- package/standalone/index.js +1141 -0
- package/standalone/index.pck +0 -0
- package/standalone/index.wasm.br +0 -0
- package/standalone/webgl/index.audio.position.worklet.js +66 -0
- package/standalone/webgl/index.audio.worklet.js +213 -0
- package/standalone/webgl/index.js +1141 -0
- package/standalone/webgl/index.wasm.br +0 -0
- package/webgl/index.js +1 -1
- package/webgl/index.wasm.br +0 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ by default, with a WebGL2 engine included for browsers without WebGPU.
|
|
|
10
10
|
<!doctype html>
|
|
11
11
|
<canvas id="canvas"></canvas>
|
|
12
12
|
|
|
13
|
-
<script src="https://cdn.jsdelivr.net/npm/shinygen@4.6.
|
|
13
|
+
<script src="https://cdn.jsdelivr.net/npm/shinygen@4.6.5-rc.1/shinygen.js"></script>
|
|
14
14
|
<script type="text/gdscript" name="Main">
|
|
15
15
|
extends Node3D
|
|
16
16
|
|
|
@@ -32,20 +32,30 @@ engine your page boots is downloaded.
|
|
|
32
32
|
|
|
33
33
|
## Requirements
|
|
34
34
|
|
|
35
|
-
- **Default
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
- **Default: either engine, chosen per device** (no `renderer`, or
|
|
36
|
+
`renderer: "auto"`): the same lane router the Shiny Gen web app runs. Phones and
|
|
37
|
+
tablets get the WebGL engine; a desktop gets WebGPU when it has a hardware
|
|
38
|
+
adapter and device, WebGL otherwise. If the WebGPU engine fails to start or
|
|
39
|
+
loses its device, the page reloads once into WebGL and remembers that for the
|
|
40
|
+
tab. `?lane=webgl` or `?lane=webgpu` pins a lane for 30 days, and `?lane=auto`
|
|
41
|
+
clears the pin.
|
|
42
|
+
- **WebGPU engine only** (`renderer: "webgpu"`): a WebGPU-capable browser
|
|
43
|
+
(Chrome/Edge 113+ on desktop; recent Safari and Firefox). No fallback:
|
|
44
|
+
`ShinyGen.start()` reports a clear on-canvas message when WebGPU is
|
|
45
|
+
unavailable, and `?lane=` is ignored.
|
|
46
|
+
- **WebGL engine only** (`renderer: "webgl"`): any WebGL2 browser — effectively
|
|
47
|
+
all modern browsers. Renders with the engine's Compatibility renderer: full 2D
|
|
40
48
|
and core 3D (PBR forward rendering, shadows), without the WebGPU-only
|
|
41
49
|
effects (volumetric fog, SDFGI/VoxelGI and most screen-space effects).
|
|
50
|
+
`?lane=` is ignored.
|
|
42
51
|
|
|
43
52
|
## Options
|
|
44
53
|
|
|
45
54
|
```js
|
|
46
55
|
ShinyGen.start({
|
|
47
56
|
canvas: "#canvas", // selector or element (required)
|
|
48
|
-
renderer: "
|
|
57
|
+
renderer: "auto", // "auto" (default: chosen per device), "webgpu" or "webgl" (one engine, no fallback)
|
|
58
|
+
engineBase: "...", // where the lanes live (default: beside shinygen.js)
|
|
49
59
|
i18n: true, // opt-in: fetch ICU data (~2.2 MB) for complex-script text
|
|
50
60
|
brotliWasm: false, // opt-out of the .br engine fetch (default: on)
|
|
51
61
|
});
|