oriverse-engine 0.1.1 → 0.1.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 +76 -76
- package/dist/CODEX_PROMPT.md +7 -7
- package/dist/GAME_AUTHORING.md +6 -6
- package/dist/examples/target_range.weave +1 -1
- package/dist/ktx_lib.js +1 -5236
- package/dist/ktx_lib.wasm +0 -0
- package/dist/oriverse_wgpu.d.ts +41 -40
- package/dist/oriverse_wgpu.js +1003 -342
- package/dist/oriverse_wgpu_bg.wasm +0 -0
- package/dist/oriverse_wgpu_bg.wasm.d.ts +41 -40
- package/dist/snippets/oriverse_market_client-0cd3013288f3c49c/inline0.js +6 -0
- package/dist/snippets/oriverse_networking_shared-e43478064e11e46c/inline0.js +4 -1
- package/dist/snippets/oriverse_wgpu-255445ce6d9a0851/inline0.js +19 -58
- package/dist/snippets/oriverse_wgpu-255445ce6d9a0851/inline1.js +58 -19
- package/dist/starter/AGENTS.md +2 -2
- package/dist/starter/CLAUDE.md +2 -2
- package/dist/starter/game.html +5 -5
- package/dist/templates/game_cdn.html +5 -5
- package/dist/weave_documentation.txt +727 -4892
- package/package.json +18 -18
|
Binary file
|
|
@@ -5,12 +5,12 @@ export const bootOriverseArtifact: (a: number, b: number) => any;
|
|
|
5
5
|
export const sim_worker_init: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
6
6
|
export const sim_worker_start_ticker: (a: number) => [number, number];
|
|
7
7
|
export const start_wasm_oriverse: () => void;
|
|
8
|
+
export const validate_world_entry: (a: number, b: number, c: number) => [number, number];
|
|
9
|
+
export const validate_world_shared_entry: (a: number, b: number, c: number) => [number, number];
|
|
8
10
|
export const worker_attach_read_dc: (a: any) => void;
|
|
9
11
|
export const worker_attach_write_dc: (a: any, b: any) => void;
|
|
10
12
|
export const worker_init: (a: number, b: number) => void;
|
|
11
13
|
export const worker_init_write: (a: number, b: number, c: number, d: number) => void;
|
|
12
|
-
export const validate_world_entry: (a: number, b: number, c: number) => [number, number];
|
|
13
|
-
export const validate_world_shared_entry: (a: number, b: number, c: number) => [number, number];
|
|
14
14
|
export const init_market_client_message_bridge: (a: any) => [number, number];
|
|
15
15
|
export const __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
16
16
|
export const __wbg_intounderlyingsink_free: (a: number, b: number) => void;
|
|
@@ -25,46 +25,47 @@ export const intounderlyingsink_close: (a: number) => any;
|
|
|
25
25
|
export const intounderlyingsink_write: (a: number, b: any) => any;
|
|
26
26
|
export const intounderlyingsource_cancel: (a: number) => void;
|
|
27
27
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const
|
|
45
|
-
export const
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
49
|
-
export const
|
|
50
|
-
export const
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
53
|
-
export const
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
59
|
-
export const
|
|
60
|
-
export const
|
|
61
|
-
export const
|
|
62
|
-
export const
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
28
|
+
export const wasm_bindgen__closure__destroy__h02f4ac5582e5913c: (a: number, b: number) => void;
|
|
29
|
+
export const wasm_bindgen__closure__destroy__hf04f1b52029392cb: (a: number, b: number) => void;
|
|
30
|
+
export const wasm_bindgen__closure__destroy__h5ce6c8b97be5aedf: (a: number, b: number) => void;
|
|
31
|
+
export const wasm_bindgen__closure__destroy__hea92bb707f6cbeb2: (a: number, b: number) => void;
|
|
32
|
+
export const wasm_bindgen__closure__destroy__h22ca06dde759e186: (a: number, b: number) => void;
|
|
33
|
+
export const wasm_bindgen__closure__destroy__h2fa417b22e371ac0: (a: number, b: number) => void;
|
|
34
|
+
export const wasm_bindgen__closure__destroy__h497a5311ffee252b: (a: number, b: number) => void;
|
|
35
|
+
export const wasm_bindgen__closure__destroy__h83f8bfe43e51586e: (a: number, b: number) => void;
|
|
36
|
+
export const wasm_bindgen__closure__destroy__h10eef66b5be2507e: (a: number, b: number) => void;
|
|
37
|
+
export const wasm_bindgen__closure__destroy__h677d3b08c69adfbf: (a: number, b: number) => void;
|
|
38
|
+
export const wasm_bindgen__convert__closures_____invoke__h530de7b4ff70bfe3: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
39
|
+
export const wasm_bindgen__convert__closures_____invoke__h4661a025d4db3fe3: (a: number, b: number, c: any, d: any) => void;
|
|
40
|
+
export const wasm_bindgen__convert__closures_____invoke__h4b2720b5fafd0c51: (a: number, b: number, c: number, d: number) => void;
|
|
41
|
+
export const wasm_bindgen__convert__closures_____invoke__h9fd153286ed41e9c: (a: number, b: number, c: any, d: any) => void;
|
|
42
|
+
export const wasm_bindgen__convert__closures_____invoke__h1425c1d15e69fe66: (a: number, b: number, c: any) => [number, number];
|
|
43
|
+
export const wasm_bindgen__convert__closures_____invoke__h430dc5b36c3ff7df: (a: number, b: number, c: number, d: number) => void;
|
|
44
|
+
export const wasm_bindgen__convert__closures_____invoke__h65f53cb9c5fcb430: (a: number, b: number, c: any, d: any) => void;
|
|
45
|
+
export const wasm_bindgen__convert__closures_____invoke__h222ae0c953b08b05: (a: number, b: number, c: any) => void;
|
|
46
|
+
export const wasm_bindgen__convert__closures_____invoke__h222ae0c953b08b05_2: (a: number, b: number, c: any) => void;
|
|
47
|
+
export const wasm_bindgen__convert__closures_____invoke__h222ae0c953b08b05_3: (a: number, b: number, c: any) => void;
|
|
48
|
+
export const wasm_bindgen__convert__closures_____invoke__h222ae0c953b08b05_4: (a: number, b: number, c: any) => void;
|
|
49
|
+
export const wasm_bindgen__convert__closures_____invoke__hf6f3f32f973e661e: (a: number, b: number, c: any) => void;
|
|
50
|
+
export const wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc: (a: number, b: number, c: any) => void;
|
|
51
|
+
export const wasm_bindgen__convert__closures_____invoke__h3803a1e8b18ffddc_9: (a: number, b: number, c: any) => void;
|
|
52
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1: (a: number, b: number, c: any) => void;
|
|
53
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_12: (a: number, b: number, c: any) => void;
|
|
54
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_13: (a: number, b: number, c: any) => void;
|
|
55
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_14: (a: number, b: number, c: any) => void;
|
|
56
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_15: (a: number, b: number, c: any) => void;
|
|
57
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_16: (a: number, b: number, c: any) => void;
|
|
58
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_17: (a: number, b: number, c: any) => void;
|
|
59
|
+
export const wasm_bindgen__convert__closures_____invoke__h27c0605e3bdfefc1_18: (a: number, b: number, c: any) => void;
|
|
60
|
+
export const wasm_bindgen__convert__closures_____invoke__ha87a485729c1bc45: (a: number, b: number, c: number) => void;
|
|
61
|
+
export const wasm_bindgen__convert__closures_____invoke__h5fae2a5a8b174cd2: (a: number, b: number, c: any) => void;
|
|
62
|
+
export const wasm_bindgen__convert__closures_____invoke__h8d56de0e71630208: (a: number, b: number, c: any) => void;
|
|
63
|
+
export const wasm_bindgen__convert__closures_____invoke__hbc8eaa61aedbf990: (a: number, b: number) => void;
|
|
64
|
+
export const wasm_bindgen__convert__closures_____invoke__h916e8c5bf71a8454: (a: number, b: number) => void;
|
|
65
|
+
export const wasm_bindgen__convert__closures_____invoke__hcba5ad8b0d96cf50: (a: number, b: number) => void;
|
|
66
66
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
67
67
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
68
|
+
export const __wbindgen_export: WebAssembly.Table;
|
|
68
69
|
export const __externref_table_alloc: () => number;
|
|
69
70
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
70
71
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
worker.addEventListener('message', (e) => {
|
|
9
9
|
const data = e.data;
|
|
10
10
|
if (data?.type === 'market-client-open-url' && data.value) window.open(data.value, '_blank');
|
|
11
|
+
else if (data?.type === 'market-client-open-url-popup' && data.value) {
|
|
12
|
+
const w = Math.min(560, Math.floor(screen.availWidth * 0.4));
|
|
13
|
+
const h = Math.min(860, Math.floor(screen.availHeight * 0.9));
|
|
14
|
+
const left = (screen.availLeft ?? 0) + screen.availWidth - w - 8;
|
|
15
|
+
window.open(data.value, 'oriverse_connect_ai', `popup,width=${w},height=${h},left=${left},top=40`);
|
|
16
|
+
}
|
|
11
17
|
else if (data?.type?.startsWith('market-client-')) {
|
|
12
18
|
window.top.postMessage(data, '*');
|
|
13
19
|
}
|
|
@@ -13,6 +13,9 @@ export function get_selected_candidate_info(stats) {
|
|
|
13
13
|
localProtocol: local.protocol || '',
|
|
14
14
|
remoteType: remote.candidateType || '',
|
|
15
15
|
remoteAddr: `${remote.address || remote.ip || 'unknown'}:${remote.port || 0}`,
|
|
16
|
-
remoteProtocol: remote.protocol || ''
|
|
16
|
+
remoteProtocol: remote.protocol || '',
|
|
17
|
+
rttMs: pair.currentRoundTripTime != null ? pair.currentRoundTripTime * 1000 : -1,
|
|
18
|
+
txBytes: pair.bytesSent || 0,
|
|
19
|
+
rxBytes: pair.bytesReceived || 0
|
|
17
20
|
};
|
|
18
21
|
}
|
|
@@ -1,60 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
export function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
dpH = Math.max(1, Math.round(cssH * dpr));
|
|
22
|
-
}
|
|
23
|
-
const dprEff = cssW > 0 ? (dpW / cssW) : (window.devicePixelRatio || 1);
|
|
24
|
-
onSize(dpW >>> 0, dpH >>> 0, dprEff);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const ro = new ResizeObserver(entries => {
|
|
28
|
-
// Save the last entry for precise device-pixel info.
|
|
29
|
-
canvas.__lastROEntry = entries[0];
|
|
30
|
-
fireNow();
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
try { ro.observe(canvas, { box: 'device-pixel-content-box' }); }
|
|
34
|
-
catch { ro.observe(canvas); }
|
|
35
|
-
|
|
36
|
-
// DPR changes (zoom / moving across monitors) don't always reflow. Listen explicitly.
|
|
37
|
-
let mq = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
38
|
-
const onMQ = () => {
|
|
39
|
-
// Force a non-layout-janking "poke" to trigger RO in some browsers.
|
|
40
|
-
const t = canvas.style.transform;
|
|
41
|
-
canvas.style.transform = 'translateZ(0)'; canvas.style.transform = t;
|
|
42
|
-
fireNow();
|
|
43
|
-
// Re-arm listener for the new DPR.
|
|
44
|
-
mq.removeEventListener?.('change', onMQ);
|
|
45
|
-
mq = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
46
|
-
mq.addEventListener?.('change', onMQ);
|
|
47
|
-
};
|
|
48
|
-
mq.addEventListener?.('change', onMQ);
|
|
49
|
-
window.addEventListener('pageshow', onMQ);
|
|
50
|
-
|
|
51
|
-
// Fire once now so we start sized correctly.
|
|
52
|
-
Promise.resolve().then(fireNow);
|
|
53
|
-
|
|
54
|
-
// Return disposer
|
|
55
|
-
return () => {
|
|
56
|
-
try { ro.disconnect(); } catch {}
|
|
57
|
-
try { mq.removeEventListener?.('change', onMQ); } catch {}
|
|
58
|
-
try { window.removeEventListener('pageshow', onMQ); } catch {}
|
|
59
|
-
};
|
|
2
|
+
export function __ori_install_webgpu_error_tap(sink) {
|
|
3
|
+
try {
|
|
4
|
+
if (typeof GPUAdapter === 'undefined' || GPUAdapter.prototype.__ori_err_tap) return;
|
|
5
|
+
GPUAdapter.prototype.__ori_err_tap = true;
|
|
6
|
+
const orig = GPUAdapter.prototype.requestDevice;
|
|
7
|
+
GPUAdapter.prototype.requestDevice = async function(desc) {
|
|
8
|
+
const device = await orig.call(this, desc);
|
|
9
|
+
try {
|
|
10
|
+
device.addEventListener('uncapturederror', function(event) {
|
|
11
|
+
const e = event.error;
|
|
12
|
+
const name = (e && e.constructor && e.constructor.name) || 'GPUError';
|
|
13
|
+
const msg = (e && e.message) || '';
|
|
14
|
+
try { sink(name + ': ' + msg); } catch (_) {}
|
|
15
|
+
try { console.error('[raw_webgpu_uncaptured]', name, msg); } catch (_) {}
|
|
16
|
+
});
|
|
17
|
+
} catch (_) {}
|
|
18
|
+
return device;
|
|
19
|
+
};
|
|
20
|
+
} catch (_) {}
|
|
60
21
|
}
|
|
@@ -1,21 +1,60 @@
|
|
|
1
1
|
|
|
2
|
-
export function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
export function observeDevicePixels(canvas, onSize) {
|
|
3
|
+
const hasDPCB = (() => {
|
|
4
|
+
try { return 'devicePixelContentBoxSize' in ResizeObserverEntry.prototype; } catch { return false; }
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
// Compute current CSS and device-pixel sizes and call onSize(dpW, dpH, effectiveDpr)
|
|
8
|
+
function fireNow() {
|
|
9
|
+
let cssW, cssH, dpW, dpH;
|
|
10
|
+
if (hasDPCB && canvas.__lastROEntry) {
|
|
11
|
+
const e = canvas.__lastROEntry;
|
|
12
|
+
dpW = e.devicePixelContentBoxSize[0].inlineSize;
|
|
13
|
+
dpH = e.devicePixelContentBoxSize[0].blockSize;
|
|
14
|
+
cssW = e.contentBoxSize[0].inlineSize;
|
|
15
|
+
cssH = e.contentBoxSize[0].blockSize;
|
|
16
|
+
} else {
|
|
17
|
+
const rect = canvas.getBoundingClientRect();
|
|
18
|
+
const dpr = window.devicePixelRatio || 1;
|
|
19
|
+
cssW = rect.width; cssH = rect.height;
|
|
20
|
+
dpW = Math.max(1, Math.round(cssW * dpr));
|
|
21
|
+
dpH = Math.max(1, Math.round(cssH * dpr));
|
|
22
|
+
}
|
|
23
|
+
const dprEff = cssW > 0 ? (dpW / cssW) : (window.devicePixelRatio || 1);
|
|
24
|
+
onSize(dpW >>> 0, dpH >>> 0, dprEff);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const ro = new ResizeObserver(entries => {
|
|
28
|
+
// Save the last entry for precise device-pixel info.
|
|
29
|
+
canvas.__lastROEntry = entries[0];
|
|
30
|
+
fireNow();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
try { ro.observe(canvas, { box: 'device-pixel-content-box' }); }
|
|
34
|
+
catch { ro.observe(canvas); }
|
|
35
|
+
|
|
36
|
+
// DPR changes (zoom / moving across monitors) don't always reflow. Listen explicitly.
|
|
37
|
+
let mq = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
38
|
+
const onMQ = () => {
|
|
39
|
+
// Force a non-layout-janking "poke" to trigger RO in some browsers.
|
|
40
|
+
const t = canvas.style.transform;
|
|
41
|
+
canvas.style.transform = 'translateZ(0)'; canvas.style.transform = t;
|
|
42
|
+
fireNow();
|
|
43
|
+
// Re-arm listener for the new DPR.
|
|
44
|
+
mq.removeEventListener?.('change', onMQ);
|
|
45
|
+
mq = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
46
|
+
mq.addEventListener?.('change', onMQ);
|
|
47
|
+
};
|
|
48
|
+
mq.addEventListener?.('change', onMQ);
|
|
49
|
+
window.addEventListener('pageshow', onMQ);
|
|
50
|
+
|
|
51
|
+
// Fire once now so we start sized correctly.
|
|
52
|
+
Promise.resolve().then(fireNow);
|
|
53
|
+
|
|
54
|
+
// Return disposer
|
|
55
|
+
return () => {
|
|
56
|
+
try { ro.disconnect(); } catch {}
|
|
57
|
+
try { mq.removeEventListener?.('change', onMQ); } catch {}
|
|
58
|
+
try { window.removeEventListener('pageshow', onMQ); } catch {}
|
|
59
|
+
};
|
|
21
60
|
}
|
package/dist/starter/AGENTS.md
CHANGED
|
@@ -11,9 +11,9 @@ loader scripts or engine URLs.
|
|
|
11
11
|
|
|
12
12
|
## Before writing Weave, read the guide
|
|
13
13
|
|
|
14
|
-
- https://unpkg.com/oriverse-engine@0.1.
|
|
14
|
+
- https://unpkg.com/oriverse-engine@0.1.2/dist/GAME_AUTHORING.md — authoring patterns + 3 complete tested
|
|
15
15
|
example games (coin collector, dodge blocks, target range) to pattern-match from.
|
|
16
|
-
- https://unpkg.com/oriverse-engine@0.1.
|
|
16
|
+
- https://unpkg.com/oriverse-engine@0.1.2/dist/weave_documentation.txt — full language + API reference.
|
|
17
17
|
|
|
18
18
|
Key constraints: content must be fully procedural (primitive models `"cube"`,
|
|
19
19
|
`"sphere"`, ..., `#mesh`, `#texture` — no market/network assets); units are cm with Z
|
package/dist/starter/CLAUDE.md
CHANGED
|
@@ -11,9 +11,9 @@ loader scripts or engine URLs.
|
|
|
11
11
|
|
|
12
12
|
## Before writing Weave, read the guide
|
|
13
13
|
|
|
14
|
-
- https://unpkg.com/oriverse-engine@0.1.
|
|
14
|
+
- https://unpkg.com/oriverse-engine@0.1.2/dist/GAME_AUTHORING.md — authoring patterns + 3 complete tested
|
|
15
15
|
example games (coin collector, dodge blocks, target range) to pattern-match from.
|
|
16
|
-
- https://unpkg.com/oriverse-engine@0.1.
|
|
16
|
+
- https://unpkg.com/oriverse-engine@0.1.2/dist/weave_documentation.txt — full language + API reference.
|
|
17
17
|
|
|
18
18
|
Key constraints: content must be fully procedural (primitive models `"cube"`,
|
|
19
19
|
`"sphere"`, ..., `#mesh`, `#texture` — no market/network assets); units are cm with Z
|
package/dist/starter/game.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
This single small file IS the whole game: engine js/wasm come from unpkg, your game is
|
|
3
3
|
the inline Weave source below. Serve from any static host (no COOP/COEP headers) or a
|
|
4
4
|
plain `python -m http.server`; open in a WebGPU browser (Chrome/Edge).
|
|
5
|
-
The engine version is pinned in the https://unpkg.com/oriverse-engine@0.1.
|
|
5
|
+
The engine version is pinned in the https://unpkg.com/oriverse-engine@0.1.2/dist urls below (injected from
|
|
6
6
|
npm_package/package.json at packaging time) — bump the @version with engine releases.
|
|
7
7
|
Content must be fully procedural: primitives ("cube", "sphere", ...), #mesh, #texture,
|
|
8
8
|
#particles. Market/network assets are unavailable and will hard-error. -->
|
|
@@ -43,16 +43,16 @@ object BlueCube {
|
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
45
|
<!-- KTX2 texture transcoder sidecar (classic scripts; ktx_lib.wasm resolves relative to the script url). -->
|
|
46
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
47
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
46
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_lib.js"></script>
|
|
47
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_bridge.js"></script>
|
|
48
48
|
<script type="module">
|
|
49
|
-
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.
|
|
49
|
+
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu.js";
|
|
50
50
|
const setBoot = (t) => { const b = document.getElementById('oriverse-status-banner'); if (b) b.textContent = t; };
|
|
51
51
|
(async () => {
|
|
52
52
|
try {
|
|
53
53
|
setBoot('instantiating wasm...');
|
|
54
54
|
// Artifact build: wasm-bindgen owns a private (non-shared) memory; no COOP/COEP needed.
|
|
55
|
-
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.
|
|
55
|
+
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu_bg.wasm" });
|
|
56
56
|
} catch (e) {
|
|
57
57
|
const msg = (e && e.stack) ? e.stack : String(e);
|
|
58
58
|
setBoot('WASM init failed:\n' + msg);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
This single small file IS the whole game: engine js/wasm come from unpkg, your game is
|
|
3
3
|
the inline Weave source below. Serve from any static host (no COOP/COEP headers) or a
|
|
4
4
|
plain `python -m http.server`; open in a WebGPU browser (Chrome/Edge).
|
|
5
|
-
The engine version is pinned in the https://unpkg.com/oriverse-engine@0.1.
|
|
5
|
+
The engine version is pinned in the https://unpkg.com/oriverse-engine@0.1.2/dist urls below (injected from
|
|
6
6
|
npm_package/package.json at packaging time) — bump the @version with engine releases.
|
|
7
7
|
Content must be fully procedural: primitives ("cube", "sphere", ...), #mesh, #texture,
|
|
8
8
|
#particles. Market/network assets are unavailable and will hard-error. -->
|
|
@@ -43,16 +43,16 @@ object BlueCube {
|
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
45
|
<!-- KTX2 texture transcoder sidecar (classic scripts; ktx_lib.wasm resolves relative to the script url). -->
|
|
46
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
47
|
-
<script src="https://unpkg.com/oriverse-engine@0.1.
|
|
46
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_lib.js"></script>
|
|
47
|
+
<script src="https://unpkg.com/oriverse-engine@0.1.2/dist/ktx_bridge.js"></script>
|
|
48
48
|
<script type="module">
|
|
49
|
-
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.
|
|
49
|
+
import initOriverse from "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu.js";
|
|
50
50
|
const setBoot = (t) => { const b = document.getElementById('oriverse-status-banner'); if (b) b.textContent = t; };
|
|
51
51
|
(async () => {
|
|
52
52
|
try {
|
|
53
53
|
setBoot('instantiating wasm...');
|
|
54
54
|
// Artifact build: wasm-bindgen owns a private (non-shared) memory; no COOP/COEP needed.
|
|
55
|
-
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.
|
|
55
|
+
await initOriverse({ module_or_path: "https://unpkg.com/oriverse-engine@0.1.2/dist/oriverse_wgpu_bg.wasm" });
|
|
56
56
|
} catch (e) {
|
|
57
57
|
const msg = (e && e.stack) ? e.stack : String(e);
|
|
58
58
|
setBoot('WASM init failed:\n' + msg);
|