A light 2D physics interactive simulator based upon nodes and constraints.
Development : Dec 2013 | Released on Chrome experiments : March 18, 2014
Help me share :
Help for editor :
You may read the existing preset scenarii for use examples.
Physics functions :
nodeId addNode(int x, int y, int radius, int weight) creates a node. It returns the id of the node created, that can be used for connecting constraints. If weight is set to 0, the node won't be under influence of gravity nor other nodes. void addConstraint(nodeId from, nodeId to, int distance, bool reciprocity) creates a constraint between 2 nodes of the distance defined. By default, a constraint is not reciprocal. You can then create blackholes, or even a virtual force by constraining 2 nodes with different distances. void breakConstraints(array constraintsIndexes) deletes the constraints indexes.
Controls directives :
These directives allow you to change control panel values before launching your script. setViscosityControl(int viscosityValue) setGravityControl(bool activate, int gravityForce) setHullControl(bool activate, bool activateSmoothHullBorder) setDisplayNodesControl(bool activate, int newNodesRadius) setCollisionsControl(bool activate, [optional] repulsion strength) setConstraintsControl(bool activate, bool showSkeleton,int looseness, [optional] breakingRatio)