0.4.1-patch.1 • Published 4 years ago

react-dom-box2d v0.4.1-patch.1

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

Use 2d Physics Simulation for your react-dom elements.

Box2d Physics Engine integrated with react-dom

see it in action

https://codesandbox.io/s/xpv3ypv06q

Install

npm i react-dom-box2d

documentation

Documentation

Demos

shapes demo

https://1466m84mxl.codesandbox.io/

source for the demo Edit 1466m84mxl

Force Demo

https://q8l48rwk49.codesandbox.io/

Edit react-dom-box2d force demo

Collision detection demo

https://wsknn.codesandbox.io/

Edit react-dom-box2d force demo

Rationale

  1. Writing games is more fun
  2. Writing games should be simpler
  3. Physics simulations are cool

FAQs

1.Why dom ?

Dom is definitely slower compared to Canvas/WebGL. But there is a good reason for it. Dom does a lot of things , that would be not easy to implement ourselves (event handling, accessibility, layout,style,...etc)

And also this would lower the barrier of entry for majority of Web Developers (use css for styling)