example/cloth.js
function Constraint (i0, i1) {
  this.i0 = i0
  this.i1 = i1

  this.restLength = vec3.distance(position[i0], position[i1])
}
function Constraint (i0, i1) {
  this.i0 = i0
  this.i1 = i1

  this.restLength = vec3.distance(position[i0], position[i1])
}
function Constraint ( i0 , i1 ) { this . i0 = i0 this . i1 = i1 this . restLength = vec3 . distance ( position [ i0 ] , position [ i1 ] ) }
create a constraint between the vertices with the indices i0 and i1.
create a constraint between the vertices with the indices i0 and i1 .