Skip to content

Commit

Permalink
Build: (4b3409d) Add touch support- init
Browse files Browse the repository at this point in the history
  • Loading branch information
Leinnan committed May 5, 2024
0 parents commit db4b172
Show file tree
Hide file tree
Showing 5 changed files with 2,374 additions and 0 deletions.
31 changes: 31 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">

<head>
<title>Bevy Button Click Plugin</title>
<style>
html,
body {
margin: auto 0;
height: 100%;
}
canvas {
padding-left: 0;
padding-right: 0;
margin-left: auto;
margin-right: auto;
display: block;
}
</style>
</head>

<body style="margin: 0 !important; padding: 0 !important;">
<script type="module">
// Import and run your bevy wasm code
import init from './simple.js'
init()
</script>
<a href="https://github.com/Leinnan/bevy_button_released_plugin">Source code</a>
</body>

</html>
92 changes: 92 additions & 0 deletions simple.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* tslint:disable */
/* eslint-disable */

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

export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly main: (a: number, b: number) => number;
readonly wgpu_compute_pass_set_pipeline: (a: number, b: number) => void;
readonly wgpu_compute_pass_set_bind_group: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_compute_pass_set_push_constant: (a: number, b: number, c: number, d: number) => void;
readonly wgpu_compute_pass_insert_debug_marker: (a: number, b: number, c: number) => void;
readonly wgpu_compute_pass_push_debug_group: (a: number, b: number, c: number) => void;
readonly wgpu_compute_pass_pop_debug_group: (a: number) => void;
readonly wgpu_compute_pass_write_timestamp: (a: number, b: number, c: number) => void;
readonly wgpu_compute_pass_begin_pipeline_statistics_query: (a: number, b: number, c: number) => void;
readonly wgpu_compute_pass_end_pipeline_statistics_query: (a: number) => void;
readonly wgpu_compute_pass_dispatch_workgroups: (a: number, b: number, c: number, d: number) => void;
readonly wgpu_compute_pass_dispatch_workgroups_indirect: (a: number, b: number, c: number) => 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_pass_set_pipeline: (a: number, b: number) => void;
readonly wgpu_render_pass_set_bind_group: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_pass_set_vertex_buffer: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_pass_set_push_constants: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_pass_draw: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_pass_draw_indexed: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
readonly wgpu_render_pass_draw_indirect: (a: number, b: number, c: number) => void;
readonly wgpu_render_pass_draw_indexed_indirect: (a: number, b: number, c: number) => void;
readonly wgpu_render_pass_multi_draw_indirect: (a: number, b: number, c: number, d: number) => void;
readonly wgpu_render_pass_multi_draw_indexed_indirect: (a: number, b: number, c: number, d: number) => void;
readonly wgpu_render_pass_multi_draw_indirect_count: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
readonly wgpu_render_pass_multi_draw_indexed_indirect_count: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
readonly wgpu_render_pass_set_blend_constant: (a: number, b: number) => void;
readonly wgpu_render_pass_set_scissor_rect: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wgpu_render_pass_set_viewport: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
readonly wgpu_render_pass_set_stencil_reference: (a: number, b: number) => void;
readonly wgpu_render_pass_insert_debug_marker: (a: number, b: number, c: number) => void;
readonly wgpu_render_pass_push_debug_group: (a: number, b: number, c: number) => void;
readonly wgpu_render_pass_pop_debug_group: (a: number) => void;
readonly wgpu_render_pass_write_timestamp: (a: number, b: number, c: number) => void;
readonly wgpu_render_pass_begin_occlusion_query: (a: number, b: number) => void;
readonly wgpu_render_pass_end_occlusion_query: (a: number) => void;
readonly wgpu_render_pass_begin_pipeline_statistics_query: (a: number, b: number, c: number) => void;
readonly wgpu_render_pass_end_pipeline_statistics_query: (a: number) => void;
readonly wgpu_render_pass_execute_bundles: (a: number, b: number, c: number) => void;
readonly wgpu_render_pass_set_index_buffer: (a: number, b: number, c: number, d: number, e: 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__h638578aef9f563c5: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2e24def06f623c04: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A_B___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd495cfc3b7fc52ad: (a: number, b: number, c: number, d: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0a51cbb1a2c03df7: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6bb50120fdb6101a: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h86b962a920df92d0: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6ae4ce79b2a00a6a: (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 db4b172

Please sign in to comment.