move draw stuff from tone to core + fix getPhase
This commit is contained in:
parent
c722904831
commit
e769ed2fd8
17 changed files with 259 additions and 5684 deletions
13
packages/core/time.mjs
Normal file
13
packages/core/time.mjs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
console.log('load time.mjs');
|
||||
let time;
|
||||
export function getTime() {
|
||||
if (!time) {
|
||||
throw new Error('no time set! use setTime to define a time source');
|
||||
}
|
||||
return time();
|
||||
}
|
||||
|
||||
export function setTime(func) {
|
||||
console.log('setTime!');
|
||||
time = func;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue