Verlet-JS: A cool open-source JavaScript physical Engine

Source: Internet
Author: User

Verlet-JS is a physical engine written in JavaScript., Supports particle systems, distance constraints, angle constraints, etc,With verlet-JS, You can implement some very cool and physical effects in applications, such as collision, rolling, sliding, or bounce.

Verlet-js has the following features:

  • Simulation: A root object that contains a composite object. It is used to drive all physical properties and animation effects of an object in a scenario.
  • Composites (composite entity): used for high-level objects in a scenario (such as balls, connectors, fabrics, etc)
  • Particle System: a point in space that is used to respond to various operations (gravity, drag, and drop)
  • Constraint: concatenates particles to allow them to communicate with each other, including fixation (fixation of a particle to a position in space), distance constraint (BIND 2 particles through a certain straight line distance), angle constraint (BIND 3 particles through a certain angle)

You can view related examples through the following link:

  • Shape
  • Fragment tree
  • Fabric
  • Spider Web

Google launched
Google gravity project, you will find that all the page elements are falling, you can also drag the window at will, the elements in the window will also make the corresponding action, the effect is quite amazing, this uses
Box2d physical engine (similar to verlet-js ). Now with verlet-JS, you can make similar results.

Verlet-js source code is hosted on GitHub and uses the MIT license.

Project address:
Https://github.com/subprotocol/verlet-js

Appendix: another similar drag-and-drop Fabric Physical effect:
Http://codepen.io/stuffit/pen/KrAwx (large drag or right-click can have the effect of Fabric Tearing) or
Http://lonely-pixel.com/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.