Minimal example making webpack and wasm/Emscripten work together.
Build instructions:
- Clone this gist
npm install
npm start
- Open
http://localhost:8080
- Look at console
import { Inventory, Item, SharedKit } from '../types/kit'; | |
import { decode, encode, toRGBA8 } from 'upng-js'; | |
let MCTEXTURES: Textures; | |
const INV_WIDTH = 181; | |
const INV_HEIGHT = 115; | |
const ITEM_WIDTH = 32; | |
const ITEM_HEIGHT = 32; |
Minimal example making webpack and wasm/Emscripten work together.
Build instructions:
npm install
npm start
http://localhost:8080
function logClass(target: any) { | |
// save a reference to the original constructor | |
var original = target; | |
// a utility function to generate instances of a class | |
function construct(constructor, args) { | |
var c : any = function () { | |
return constructor.apply(this, args); | |
} |