mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-07-10 05:35:04 -04:00
Alpha channel conversion
I wasn't so clever with this - I'm sorry. Now that I have managed to link up my local render & vm projects I am able to fix the issue properly. Many appologies!
This commit is contained in:
parent
3e476e2d25
commit
4dba5db28d
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ class PenSkin extends Skin {
|
|||
const r = Math.round(color4f[0] * 255);
|
||||
const g = Math.round(color4f[1] * 255);
|
||||
const b = Math.round(color4f[2] * 255);
|
||||
const a = Math.round(color4f[3]); // Alpha is 0 to 1 (not 0 to 255 like r,g,b)
|
||||
const a = color4f[3]; // Alpha is 0 to 1 (not 0 to 255 like r,g,b)
|
||||
|
||||
context.strokeStyle = `rgba(${r},${g},${b},${a})`;
|
||||
context.lineCap = 'round';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue