|
8 | 8 | "name": "Recolorizer", |
9 | 9 | "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Graphic Design/Graphic Design_color_colour_palette_paint_brush.svg", |
10 | 10 | "shortDescription": "Independently change the colors of a sprite, a tiled sprite or a panel sprite.", |
11 | | - "version": "0.1.2", |
| 11 | + "version": "0.1.3", |
12 | 12 | "description": [ |
13 | 13 | "This extension allows to restyle a sprite, a tiled sprite or a panel sprite.", |
14 | 14 | "", |
|
205 | 205 | " const hueIsConstrained = hueScope < 0.5;", |
206 | 206 | "", |
207 | 207 | " for (let i = 0; i < sourcePixels.length; i += 4) {", |
| 208 | + " const alpha = sourcePixels[i + 3];", |
| 209 | + " if (alpha === 0) {", |
| 210 | + " continue;", |
| 211 | + " }", |
208 | 212 | " const pixelHsl = rgbToHsl(sourcePixels[i + 0], sourcePixels[i + 1], sourcePixels[i + 2]);", |
209 | 213 | "", |
210 | 214 | " const pixelHue = pixelHsl[0];", |
|
734 | 738 | "textG": 0, |
735 | 739 | "textR": 0 |
736 | 740 | }, |
737 | | - "comment": "Unsure that destroyed instance recolorization can be free.", |
738 | | - "comment2": "" |
| 741 | + "comment": "Unsure that destroyed instance recolorization can be free." |
739 | 742 | }, |
740 | 743 | { |
741 | 744 | "type": "BuiltinCommonInstructions::Standard", |
|
1005 | 1008 | "textG": 0, |
1006 | 1009 | "textR": 0 |
1007 | 1010 | }, |
1008 | | - "comment": "Unsure that destroyed instance recolorization can be free.", |
1009 | | - "comment2": "" |
| 1011 | + "comment": "Unsure that destroyed instance recolorization can be free." |
1010 | 1012 | }, |
1011 | 1013 | { |
1012 | 1014 | "type": "BuiltinCommonInstructions::Standard", |
|
1285 | 1287 | "textG": 0, |
1286 | 1288 | "textR": 0 |
1287 | 1289 | }, |
1288 | | - "comment": "Unsure that destroyed instance recolorization can be free.", |
1289 | | - "comment2": "" |
| 1290 | + "comment": "Unsure that destroyed instance recolorization can be free." |
1290 | 1291 | }, |
1291 | 1292 | { |
1292 | 1293 | "type": "BuiltinCommonInstructions::Standard", |
|
0 commit comments