This is a KAPLAY plugin that replaces the default area() system with one written in WebAssembly, which is much faster.
Warning
THIS IS CURRENTLY INCOMPLETE AND UNRELEASED! DO NOT INSTALL UNLESS YOU ARE DEVELOPING IT!!!!
Not on NPM, so just install from GitHub directly using npm or pnpm.
First make sure you have Emscripten installed so you can compile it.
pnpm add https://github.com/dragoncoder047/kaplay-plugin-wasm-physics
Just install to KAPLAY like you would any other plugin:
import kaplayWasmPhysics from "kaplay-plugin-wasm-physics";
kaplay({
// ...other options
plugins: [
kaplayWasmPhysics,
// ...other plugins
],
});
It's a drop-in replacement, so no other API changes will occur.