mirror of
https://github.com/SamEyeBam/animate.git
synced 2026-02-04 09:20:25 +00:00
rgb manipulation optimisation
This commit is contained in:
@@ -5,7 +5,7 @@ class FloralAccident extends BaseShape {
|
||||
static config = [
|
||||
{ type: 'range', min: 1, max: 50, defaultValue: 20, property: 'sides' },
|
||||
{ type: 'range', min: 1, max: 600, defaultValue: 240, property: 'width' },
|
||||
{ type: 'color', defaultValue: '#4287f5', property: 'colour' },
|
||||
{ type: 'color', defaultValue: [66, 135, 245], property: 'colour' },
|
||||
];
|
||||
|
||||
constructor(sides, width, colour) {
|
||||
@@ -36,7 +36,7 @@ class FloralAccident extends BaseShape {
|
||||
end + rad(n),
|
||||
0
|
||||
);
|
||||
ctx.strokeStyle = this.colour;
|
||||
ctx.strokeStyle = colourToText(this.colour);
|
||||
ctx.stroke();
|
||||
|
||||
ctx.beginPath();
|
||||
@@ -48,7 +48,7 @@ class FloralAccident extends BaseShape {
|
||||
end - (end - stt - rad(rotation)) / 2 + rad(n),
|
||||
0
|
||||
);
|
||||
ctx.strokeStyle = this.colour;
|
||||
ctx.strokeStyle = colourToText(this.colour);
|
||||
ctx.stroke();
|
||||
|
||||
stt = end + -(rad(rot - piv));
|
||||
|
||||
Reference in New Issue
Block a user