Skip to content

Commit

Permalink
add site to github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
XCemaXX committed May 18, 2024
1 parent 9615be8 commit 1b52e30
Show file tree
Hide file tree
Showing 8 changed files with 2,675 additions and 9 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Big thanks to the author Erin Catto.

# Helpful resources
## Wgpu
https://github.com/vhiribarren/wgpu-sandbox/tree/main
https://github.com/gfx-rs/wgpu/tree/trunk/examples/src/hello_triangle
https://github.com/Blatko1/wgpu-text/tree/master
https://github.com/sotrh/learn-wgpu/tree/master/code/showcase/pong/src
https://github.com/jack1232/WebGPU-Step-By-Step
https://github.com/vhiribarren/wgpu-sandbox/tree/main
https://github.com/gfx-rs/wgpu/tree/trunk/examples/src/hello_triangle
https://github.com/Blatko1/wgpu-text/tree/master
https://github.com/sotrh/learn-wgpu/tree/master/code/showcase/pong/src
https://github.com/jack1232/WebGPU-Step-By-Step

## Wasm
https://blog.logrocket.com/getting-started-with-webassembly-and-rust/
https://github.com/rustwasm/wasm-bindgen
https://rustwasm.github.io/docs/book/game-of-life/hello-world.html
https://blog.logrocket.com/getting-started-with-webassembly-and-rust/
https://github.com/rustwasm/wasm-bindgen
https://rustwasm.github.io/docs/book/game-of-life/hello-world.html
19 changes: 19 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Box-2d-rs</title>
</head>

<body>
<script type="module">
// Importing WASM as a JS module requires us to call an init function provided by the default export.
// This is planned to be changed in the future.
import init from "./resources/wgpu_gui.js";
window.addEventListener("load", () => {
init();
});
</script>
<canvas id="target"></canvas>
</body>
</html>
17 changes: 17 additions & 0 deletions docs/resources/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "wgpu-gui",
"collaborators": [
"XCemaXX <[email protected]>"
],
"version": "0.1.0",
"files": [
"wgpu_gui_bg.wasm",
"wgpu_gui.js",
"wgpu_gui.d.ts"
],
"module": "wgpu_gui.js",
"types": "wgpu_gui.d.ts",
"sideEffects": [
"./snippets/*"
]
}
58 changes: 58 additions & 0 deletions docs/resources/wgpu_gui.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* tslint:disable */
/* eslint-disable */
/**
*/
export function start(): void;

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly start: () => void;
readonly wgpu_render_bundle_set_pipeline: (a: number, b: number) => void;
readonly wgpu_render_bundle_set_bind_group: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_bundle_set_vertex_buffer: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_bundle_set_push_constants: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_bundle_draw: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_bundle_draw_indexed: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
readonly wgpu_render_bundle_draw_indirect: (a: number, b: number, c: number) => void;
readonly wgpu_render_bundle_draw_indexed_indirect: (a: number, b: number, c: number) => void;
readonly wgpu_render_bundle_set_index_buffer: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_bundle_pop_debug_group: (a: number) => void;
readonly wgpu_render_bundle_insert_debug_marker: (a: number, b: number) => void;
readonly wgpu_render_bundle_push_debug_group: (a: number, b: number) => void;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0ad1da380464821a: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut__A_B___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6a0f04cff1bc9604: (a: number, b: number, c: number, d: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h58097ad75bb5886e: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h39b68d62cf29c866: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h63a69a976bdf38d1: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7a892289cd75e572: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h83094f320405b6c4: (a: number, b: number, c: number) => void;
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
readonly __wbindgen_exn_store: (a: number) => void;
readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {SyncInitInput} module
*
* @returns {InitOutput}
*/
export function initSync(module: SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {InitInput | Promise<InitInput>} module_or_path
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
Loading

0 comments on commit 1b52e30

Please sign in to comment.