mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 13:48:40 +00:00
improve spiral colors
This commit is contained in:
parent
a629c5c931
commit
0eccbae048
@ -19,7 +19,7 @@ function spiralSegment(options) {
|
|||||||
cy = 100,
|
cy = 100,
|
||||||
rotate = 0,
|
rotate = 0,
|
||||||
thickness = margin / 2,
|
thickness = margin / 2,
|
||||||
color = '#0000ff30',
|
color = 'steelblue',
|
||||||
cap = 'round',
|
cap = 'round',
|
||||||
stretch = 1,
|
stretch = 1,
|
||||||
fromOpacity = 1,
|
fromOpacity = 1,
|
||||||
@ -61,7 +61,7 @@ function drawSpiral(options) {
|
|||||||
playheadThickness = thickness,
|
playheadThickness = thickness,
|
||||||
padding = 0,
|
padding = 0,
|
||||||
steady = 1,
|
steady = 1,
|
||||||
inactiveColor = '#ffffff20',
|
inactiveColor = '#ffffff50',
|
||||||
colorizeInactive = 0,
|
colorizeInactive = 0,
|
||||||
fade = true,
|
fade = true,
|
||||||
// logSpiral = true,
|
// logSpiral = true,
|
||||||
@ -102,7 +102,7 @@ function drawSpiral(options) {
|
|||||||
const isActive = hap.whole.begin <= time && hap.endClipped > time;
|
const isActive = hap.whole.begin <= time && hap.endClipped > time;
|
||||||
const from = hap.whole.begin - time + inset;
|
const from = hap.whole.begin - time + inset;
|
||||||
const to = hap.endClipped - time + inset - padding;
|
const to = hap.endClipped - time + inset - padding;
|
||||||
const { color } = hap.context;
|
const color = hap.value?.color;
|
||||||
const opacity = fade ? 1 - Math.abs((hap.whole.begin - time) / min) : 1;
|
const opacity = fade ? 1 - Math.abs((hap.whole.begin - time) / min) : 1;
|
||||||
spiralSegment({
|
spiralSegment({
|
||||||
ctx,
|
ctx,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user