MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / splitPaths

Function splitPaths

libraries/p5.js:29687–29702  ·  view source on GitHub ↗
(cmds)

Source from the content-addressed store, hash-verified

29685}
29686
29687function splitPaths(cmds) {
29688
29689 var paths = [], current;
29690 for (var i = 0; i < cmds.length; i++) {
29691 if (cmds[i].type === 'M') {
29692 if (current) {
29693 paths.push(current);
29694 }
29695 current = [];
29696 }
29697 current.push(cmdToArr(cmds[i]));
29698 }
29699 paths.push(current);
29700
29701 return paths;
29702}
29703
29704function cmdToArr(cmd) {
29705

Callers 1

p5.jsFile · 0.85

Calls 1

cmdToArrFunction · 0.85

Tested by

no test coverage detected