mirror of
https://github.com/kirjavascript/trueLMAO.git
synced 2024-05-20 05:10:21 -04:00
fixed minimal building
This commit is contained in:
parent
c6546d9c58
commit
1b0d29cc1d
|
@ -2,8 +2,6 @@ use wasm_bindgen::prelude::*;
|
|||
|
||||
use emu::Megadrive;
|
||||
|
||||
// https://rustwasm.github.io/wasm-bindgen/contributing/design/exporting-rust-struct.html
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub struct MDEmu(Megadrive);
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import * as __wbg_star0 from 'env';
|
||||
|
||||
let wasm;
|
||||
|
||||
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
||||
|
@ -104,7 +102,6 @@ function getImports() {
|
|||
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
||||
throw new Error(getStringFromWasm0(arg0, arg1));
|
||||
};
|
||||
imports['env'] = __wbg_star0;
|
||||
|
||||
return imports;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -16,12 +16,10 @@
|
|||
width: 100%;
|
||||
max-height: 90vh;
|
||||
box-shadow: 2px 2px 5px black;
|
||||
/*
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: -webkit-crisp-edges;
|
||||
image-rendering: pixelated;
|
||||
image-rendering: crisp-edges;
|
||||
*/
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: -webkit-crisp-edges;
|
||||
image-rendering: pixelated;
|
||||
image-rendering: crisp-edges;
|
||||
}
|
||||
main {
|
||||
width: 800px;
|
||||
|
@ -53,7 +51,7 @@
|
|||
<span class="frameCount"></span>
|
||||
</main>
|
||||
<script type="module">
|
||||
import init, { MDEmu } from './frontend_minimal.js';
|
||||
import init, { MDEmu as Megadrive } from './frontend_minimal.js';
|
||||
import gamepad from './gamepad.js';
|
||||
|
||||
const canvas = document.querySelector('canvas');
|
||||
|
@ -63,7 +61,9 @@
|
|||
(async () => {
|
||||
const instance = await init();
|
||||
|
||||
const emu = new MDEmu();
|
||||
console.log(instance);
|
||||
|
||||
const emu = new Megadrive();
|
||||
|
||||
function draw() {
|
||||
const buffer = new Uint8ClampedArray(
|
||||
|
|
Loading…
Reference in a new issue