rgb manipulation optimisation

This commit is contained in:
Sam
2025-12-29 22:29:00 +13:00
parent 2ac6cd2835
commit 8ef9705499
16 changed files with 90 additions and 89 deletions

View File

@@ -9,8 +9,8 @@ class PhylloCone extends BaseShape {
{ type: 'range', min: 1, max: 2000, defaultValue: 1000, property: 'iterations' },
{ type: 'range', min: 1, max: 10, defaultValue: 2, property: 'distance' },
{ type: 'range', min: 1, max: 10, defaultValue: 2, property: 'line_width' },
{ type: 'color', defaultValue: '#2D81FC', property: 'colour1' },
{ type: 'color', defaultValue: '#FC0362', property: 'colour2' },
{ type: 'color', defaultValue: [45, 129, 252], property: 'colour1' },
{ type: 'color', defaultValue: [252, 3, 98], property: 'colour2' },
];
@@ -43,7 +43,7 @@ class PhylloCone extends BaseShape {
ctx.lineTo(xCoord, yCoord);
}
ctx.lineWidth = this.line_width;
ctx.strokeStyle = this.colour1;
ctx.strokeStyle = colourToText(this.colour1);
ctx.stroke();
console.log(this.line_width);
}