build
This commit is contained in:
parent
91c0a46ba9
commit
15e49952f9
12 changed files with 253 additions and 44 deletions
14
docs/dist/euclid.js
vendored
Normal file
14
docs/dist/euclid.js
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import {Pattern} from "../_snowpack/link/strudel.js";
|
||||
import bjork from "../_snowpack/pkg/bjork.js";
|
||||
import {rotate} from "../_snowpack/link/util.js";
|
||||
const euclid = (pulses, steps, rotation = 0) => {
|
||||
const b = bjork(steps, pulses);
|
||||
if (rotation) {
|
||||
return rotate(b, -rotation);
|
||||
}
|
||||
return b;
|
||||
};
|
||||
Pattern.prototype.euclid = function(pulses, steps, rotation = 0) {
|
||||
return this.struct(euclid(pulses, steps, rotation));
|
||||
};
|
||||
export default euclid;
|
||||
Loading…
Add table
Add a link
Reference in a new issue