visuals now adhere to theme by default
This commit is contained in:
parent
6a2486d9f2
commit
c400deac74
6 changed files with 34 additions and 13 deletions
|
|
@ -68,7 +68,7 @@ Pattern.prototype.draw = function (fn, options) {
|
|||
fn(memory[id], _t, t, this);
|
||||
animationFrames[id] = requestAnimationFrame(animate);
|
||||
};
|
||||
requestAnimationFrame(animate);
|
||||
animationFrames[id] = requestAnimationFrame(animate);
|
||||
return this;
|
||||
};
|
||||
|
||||
|
|
@ -183,3 +183,18 @@ export class Drawer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getComputedPropertyValue(name) {
|
||||
if (typeof window === 'undefined') {
|
||||
return '#fff';
|
||||
}
|
||||
return getComputedStyle(document.documentElement).getPropertyValue(name);
|
||||
}
|
||||
|
||||
let theme = {};
|
||||
export function getTheme() {
|
||||
return theme;
|
||||
}
|
||||
export function setTheme(_theme) {
|
||||
theme = _theme;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue