Question #1:
I'm new to PhysicsJS, and i tried to create a rope with idea of "Basket of verlet constraints"
something like this: JSFiddle
as you see, this rope is not acting natural! (friction, rope wight, stability time & ...)
and by increasing the length of rope, it got worse!
first i think, by increasing the mass of ropes particles, it will slow down faster but ...
var basket = [];
var fpos = window.innerWidth / 2;
var epos = window.innerHeight / 2;
for ( var i = fpos; i < fpos + epos; i += 5 ){
l = basket.push(
Physics.body('circle', {
x: i
,y: 50 - (i-fpos)
,radius: 1
,restitution: 0
,mass: 1000
,conf: 1
,hidden: true
})
);
rigidConstraints.distanceConstraint( basket[ l - 1 ], basket[ l - 2 ], 2 );
}
Question #2:
after fixing that, how can i crate this:
(attaching a rectangular box at the end of rope)
You can add a box and attach it to the end of the rope:
Which results in something like this: http://jsfiddle.net/REGCU/14/ But unfortunately at this time there isn't yet a way to handle adding constraints to the edge of the box as you've drawn.
It's an outstanding issue: https://github.com/wellcaffeinated/PhysicsJS/issues/5