@headless-game-engine/physics-2d
v0.1.0
Published
A minimalistic, framework-agnostic JavaScript game engine.
Downloads
1
Maintainers
Readme
Headless Game Engine - Physics 2D
A minimalistic, framework-agnostic JavaScript game engine.
This is the Physics 2D package for the Headless Game Engine.
Contains
- Collider2D
- BoxCollider2D
- Rigidbody2D
- PhysicsSystem2D
BoxCollider2D is an AABB collider that extends from abstract class Collider2D.
Rigidbody2D is capable of adding force to change its velocity, which changes its position.
PhysicsSystem2D does 3 things
- Movement Integration
- Moves the rigidbodies according to their current velocity.
- Collision Detection
- Detects collisions between colliders
- Collision Resolution
- Resolve the collisions between rigidbodies and static colliders by displacing the rigidbody and changing its velocity.