@thenick775/mgba-wasm 2.6.0 → 2.7.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
@@ -59,6 +59,8 @@ Extract these files from `package/dist/` and serve them from the same origin as
59
59
 
60
60
  - `mgba.js`
61
61
  - `mgba.wasm`
62
+ - `mgba.data`
63
+ - `mgba.wrapper.js`
62
64
 
63
65
  Then instantiate the emulator as follows:
64
66
 
@@ -66,7 +68,7 @@ Then instantiate the emulator as follows:
66
68
  <canvas id="canvas" width="240" height="160"></canvas>
67
69
 
68
70
  <script type="module">
69
- import mGBA from "./mgba.js";
71
+ import mGBA from "./mgba.wrapper.js";
70
72
 
71
73
  const canvas = document.getElementById("canvas");
72
74
  const Module = await mGBA({ canvas });
@@ -87,7 +89,7 @@ Cross-Origin-Opener-Policy: same-origin
87
89
  Cross-Origin-Embedder-Policy: require-corp
88
90
  ```
89
91
 
90
- `mgba.js` must be same-origin with the page because the threaded runtime starts its pthread worker from that script URL.
92
+ All four files must be same-origin with the page because the threaded runtime starts its pthread worker from `mgba.js`.
91
93
 
92
94
  ## API
93
95
 
@@ -155,13 +157,19 @@ Callbacks and core settings:
155
157
  - `setCoreSettings(coreSettings)`
156
158
  - `toggleRewind(toggle)`
157
159
 
158
- Local link play:
160
+ Local link cable play:
159
161
 
160
162
  - `linkLocalStartSession(options)`
161
163
  - `linkLocalStopSession()`
162
164
  - `linkLocalSetActivePlayer(player)`
163
165
  - `linkLocalGetStatus()`
164
166
 
167
+ Video shaders:
168
+
169
+ - `listShaders()`
170
+ - `loadShader(shaderPath)`
171
+ - `unloadShader()`
172
+
165
173
  See `dist/mgba.d.ts` for full signatures and inline documentation.
166
174
 
167
175
  ## Source
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@thenick775/mgba-wasm",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "mGBA emulator compiled to webassembly",
5
- "main": "./dist/mgba.js",
5
+ "main": "./dist/mgba.wrapper.js",
6
6
  "types": "./dist/mgba.d.ts",
7
7
  "files": [
8
+ "./dist/mgba.wrapper.js",
8
9
  "./dist/mgba.js",
9
10
  "./dist/mgba.d.ts",
10
11
  "./dist/mgba.wasm",
11
- "./dist/mgba.wasm.map"
12
+ "./dist/mgba.wasm.map",
13
+ "./dist/mgba.data"
12
14
  ],
13
15
  "scripts": {
14
16
  "build": "cd ../../.. && docker run --rm -t -v $PWD:/home/mgba/src local-mgba/wasm:2.0 && echo 'mGBA-wasm built successfully!'",
@@ -19,7 +21,7 @@
19
21
  "typedoc": "typedoc --options typedoc.json"
20
22
  },
21
23
  "devDependencies": {
22
- "@types/emscripten": "^1.41.5",
24
+ "@types/emscripten": "^1.41.6",
23
25
  "typedoc": "^0.28.20",
24
26
  "typedoc-github-theme": "^0.4.0",
25
27
  "typescript": "^6.0.3"