MCPcopy Create free account
hub / github.com/microsoft/SandDance / updateSpring

Function updateSpring

docs/app/js/sanddance-app.js:87556–87563  ·  view source on GitHub ↗
(prev, cur, dest, damping, stiffness)

Source from the content-addressed store, hash-verified

87554 return spring + damper + velocity + cur;
87555}
87556function updateSpring(prev, cur, dest, damping, stiffness) {
87557 if (Array.isArray(dest)) {
87558 var next = [];
87559 for(var i = 0; i < dest.length; i++)next[i] = updateSpringElement(prev[i], cur[i], dest[i], damping, stiffness);
87560 return next;
87561 }
87562 return updateSpringElement(prev, cur, dest, damping, stiffness);
87563}
87564function distance(value1, value2) {
87565 if (Array.isArray(value1)) {
87566 var distanceSquare = 0;

Callers 1

sanddance-app.jsFile · 0.70

Calls 1

updateSpringElementFunction · 0.70

Tested by

no test coverage detected