npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lsl-physx

v0.4.4

Published

A physics engine with 3D rigid-body dynamics and collision detection (with impulse-based resolution)

Downloads

24

Readme

physx

A physics engine with 3D rigid-body dynamics and collision detection (with impulse-based resolution).

DISCLAIMER: This has some rough edges and should probably not be used directly within production apps.

See this in use at levi.codes/dynamics!

This framework only defines physics logic. If you also need a 3D rendering framework, checkout grafx. Or checkout gamex, a game engine that ties the grafx and physx frameworks together.

Notable Features

The engine consists primarily of a collection of individual physics jobs and an update loop. This update loop is in turn controlled by the animation loop. However, whereas the animation loop renders each job once per frame loop—regardless of how much time actually elapsed since the previous frame—the physics loop updates its jobs at a constant rate. To reconcile these frame rates, the physics loop runs as many times as is needed in order to catch up to the time of the current animation frame. The physics frame rate should be much higher than the animation frame rate.

It is very important for a PhysicsJob to minimize the runtime of its update step.

Collision Detection

This physics engine also includes a collision-detection pipeline. This will detect collisions between collidable rigid bodies and update their momenta in response to the collisions.

  • Consists of an efficient broad-phase collision detection step followed by a precise narrow-phase step.
  • Calculates the position, surface normal, and time of each contact.
  • Calculates the impulse of a collision and updates the bodies' linear and angular momenta in response.
  • Applies Coulomb friction to colliding bodies.
  • Sub-divides the time step to more precisely determine when and where a collision occurs.
  • Supports multiple collisions with a single body in a single time step.
  • Efficiently supports bodies coming to rest against each other.
  • Bodies will never penetrate one another.
  • This does not address the tunnelling problem. That is, it is possible for two fast-moving bodies to pass through each other as long as they did not intersect each other during any time step.
  • This only supports collisions between certain types of shapes. Fortunately, this set provides reasonable approximations for most other shapes. The supported types of shapes are:

Code Coverage

The collision and geometry logic is tested (with Karma and Jasmine).

Acknowledgements / Technology Stack

The technologies used in this library include:

Many online resources influenced the design of this library. Some of these include:

Developing / Running the Code

See Getting Set Up or Understanding the Code for more info.

License

MIT