Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dragoncoder047/kaplay-plugin-wasm-physics

Repository files navigation

kaplay-plugin-wasm-physics

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!!!!

Installation

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

Usage

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.