shinygen 4.6.4 → 4.6.5-rc.2

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
@@ -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.4/shinygen.js"></script>
13
+ <script src="https://cdn.jsdelivr.net/npm/shinygen@4.6.5-rc.2/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 (WebGPU engine)**: a WebGPU-capable browser (Chrome/Edge 113+ on
36
- desktop; recent Safari and Firefox). `ShinyGen.start()` reports a clear
37
- on-canvas message when WebGPU is unavailable.
38
- - **WebGL engine** (`renderer: "webgl"`): any WebGL2 browser — effectively all
39
- modern browsers. Renders with the engine's Compatibility renderer: full 2D
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: "webgpu", // "webgpu" (default) or "webgl" (the WebGL2 engine at webgl/)
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
  });