Skip to content

Latest commit

 

History

History

classic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Demo (classic)

This package shows how you could install box2d-wasm into a webpage, using old-school techniques (<script /> tag, UMD module).

Setup

Grab yourself a copy of this repository, install the demo's dependencies with npm:

git clone https://github.com/Birch-san/box2d-wasm.git
cd box2d-wasm/demo/classic
npm ci

Now continue to either "easy setup" or "full install".

Setup

Copy the UMD distribution of Box2D into the public folder (where the demo will be served from), and rename the copied folder to Box2D:

cp -R node_modules/box2d-wasm/dist/umd public
mv public/umd public/Box2D

Run

Serve the web application:

npm start

Navigate to localhost:5000.