VerletsJS
var vjs = new VerletsJS(width, height, canvas)
var Particale = VerletsJS.Particle
var Composite = VerletsJS.Composite
- vjs.width
- vjs.height
- vjs.canvas
- vjs.ctx
- vjs.mouse
- vjs.mouseDown
- vjs.draggedEntity
- vjs.selectionRadius
- vjs.highlightColor
- vjs.bounds(particle)
not proto funtion
- vjs.gravity
- vjs.friction
- vjs.groundFriction
- vjs.composites
- vjs.Composite()
- vjs.frame(step)
- vjs.draw()
- vjs.neareastEntity()
- vjs.lineSegements(vertices, stiffness)
- vjs.cloth(origin, width, height, segments, pinMod, stiffness)
- vjs.tire(origin, radius, segments, spokeStiffness, treadStiffness)
- ++ vjs.tree(origin, depth, branchLength, segmentCoef, theta)
- ++ vjs.spider(origin)
- ++ vjs.spiderweb(origin, radius, segments, depth)
- ++ vjs.crawl(leg)
Particale
var p = new Particale(pos)
- p.pos
- p.lastPos
- p.draw(ctx)
Composite
var c = new Composite()
- c.particles
- c.constraints
- c.drawParticles(ctx, composite)
可写
- c.drawConstraints(ctx, composite)
可写
- c.pin(index, pos)