mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
capitalize coltovec4
This commit is contained in:
parent
1d96b607dd
commit
1405277050
2 changed files with 23 additions and 0 deletions
12
scripts/colToVec4/colToVec4.gml
Normal file
12
scripts/colToVec4/colToVec4.gml
Normal file
|
@ -0,0 +1,12 @@
|
|||
function colToVec4(color, alpha = 1) {
|
||||
return [ color_get_red(color) / 255, color_get_green(color) / 255, color_get_blue(color) / 255, alpha ];
|
||||
}
|
||||
|
||||
function colaToVec4(color) {
|
||||
return [
|
||||
((color & (0xFF << 0)) >> 0) / 255,
|
||||
((color & (0xFF << 8)) >> 8) / 255,
|
||||
((color & (0xFF << 16)) >> 16) / 255,
|
||||
((color & (0xFF << 24)) >> 24) / 255,
|
||||
];
|
||||
}
|
11
scripts/colToVec4/colToVec4.yy
Normal file
11
scripts/colToVec4/colToVec4.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "colToVec4",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "shader",
|
||||
"path": "folders/functions/shader.yy",
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue