Skip to content

Commit 687bc58

Browse files
committed
adding shape object
1 parent f0296b2 commit 687bc58

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

js/verlet-js/objects.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ VerletJS.prototype.point = function(pos) {
3232
return composite;
3333
}
3434

35+
VerletJS.prototype.point = function(v, stiffness) {
36+
var composite = new this.Composite();
37+
composite.particles.push(new Particle(v));
38+
this.composites.push(composite);
39+
return composite;
40+
}
41+
3542
VerletJS.prototype.lineSegments = function(vertices, stiffness) {
3643
var i;
3744

0 commit comments

Comments
 (0)