shinygen 4.6.0-rc.2 → 4.6.0-rc.4
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 +20 -10
- package/index.js +1 -1
- package/index.pck +0 -0
- package/index.wasm.br +0 -0
- package/package.json +5 -3
- package/shinygen.js +1 -1132
- package/webgl/index.audio.position.worklet.js +66 -0
- package/webgl/index.audio.worklet.js +213 -0
- package/webgl/index.js +1141 -0
- package/webgl/index.wasm.br +0 -0
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Shiny Gen Engine
|
|
2
2
|
|
|
3
|
-
A
|
|
4
|
-
|
|
3
|
+
A game engine for the browser. One script tag, one call — the engine boots on
|
|
4
|
+
your canvas and runs the `text/gdscript` scripts on your page. WebGPU-rendered
|
|
5
|
+
by default, with a WebGL2 engine included for browsers without WebGPU.
|
|
5
6
|
|
|
6
7
|
## Quick start
|
|
7
8
|
|
|
@@ -9,7 +10,7 @@ boots on your canvas and runs the `text/gdscript` scripts on your page.
|
|
|
9
10
|
<!doctype html>
|
|
10
11
|
<canvas id="canvas"></canvas>
|
|
11
12
|
|
|
12
|
-
<script src="https://cdn.jsdelivr.net/npm/shinygen@4.6.0-rc.
|
|
13
|
+
<script src="https://cdn.jsdelivr.net/npm/shinygen@4.6.0-rc.3/shinygen.js"></script>
|
|
13
14
|
<script type="text/gdscript" name="Main">
|
|
14
15
|
extends Node3D
|
|
15
16
|
|
|
@@ -23,27 +24,36 @@ func _ready():
|
|
|
23
24
|
</script>
|
|
24
25
|
```
|
|
25
26
|
|
|
26
|
-
The engine ships brotli-compressed (**~7.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
configuration needed.
|
|
27
|
+
The engine ships brotli-compressed (**~7.6 MB** over the wire for the WebGPU
|
|
28
|
+
engine, **~6.5 MB** for the WebGL engine; decompressed in the browser) and
|
|
29
|
+
resolves all of its files relative to `shinygen.js` — serve the package files
|
|
30
|
+
from any static host, CDN, or bundler; no configuration needed. Only the
|
|
31
|
+
engine your page boots is downloaded.
|
|
30
32
|
|
|
31
33
|
## Requirements
|
|
32
34
|
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
WebGPU is unavailable.
|
|
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
|
|
40
|
+
and core 3D (PBR forward rendering, shadows), without the WebGPU-only
|
|
41
|
+
effects (volumetric fog, SDFGI/VoxelGI and most screen-space effects).
|
|
36
42
|
|
|
37
43
|
## Options
|
|
38
44
|
|
|
39
45
|
```js
|
|
40
46
|
ShinyGen.start({
|
|
41
47
|
canvas: "#canvas", // selector or element (required)
|
|
48
|
+
renderer: "webgpu", // "webgpu" (default) or "webgl" (the WebGL2 engine at webgl/)
|
|
42
49
|
i18n: true, // opt-in: fetch ICU data (~2.2 MB) for complex-script text
|
|
43
50
|
brotliWasm: false, // opt-out of the .br engine fetch (default: on)
|
|
44
51
|
});
|
|
45
52
|
```
|
|
46
53
|
|
|
54
|
+
After boot, `ShinyGen.renderer` reports which engine is running
|
|
55
|
+
(`"webgpu"` or `"webgl"`).
|
|
56
|
+
|
|
47
57
|
## License
|
|
48
58
|
|
|
49
59
|
Proprietary, closed source. **Free to use — including commercially — to make
|