@yeliulee/rust-wasm-mirage-tank
v0.1.2
Published
MirageTank Wasm driven by rustwasm
Downloads
4
Readme
MirageTank Wasm
MirageTank Wasm driven by rustwasm
Online demo
https://ol.woobx.cn/tool/mirage-tank
Installation
yarn add @yeliulee/rust-wasm-mirage-tank
# or
npm install @yeliulee/rust-wasm-mirage-tank
Usage
import * as wasm from "@yeliulee/rust-wasm-mirage-tank_bg.wasm";
// or `import wasm from "@yeliulee/rust-wasm-mirage-tank_bg.wasm?url"` with vite
import {
MirageTankWrapper,
default as initWasm,
} from "@yeliulee/rust-wasm-mirage-tank";
// init wasm module, you can specific wasm from cdn or just imported from the module itself
initWasm(wasm);
const initMirageTank = () => {
const foreImageBuffer = undefined; // specific your own image buffer here
const backImageBuffer = undefined; // specific your own image buffer here
// make sure to init mirage tank after wasm is initialized
const tank = new MirageTankWrapper(foreImageBuffer, backImageBuffer);
};
// more