I downloaded this library since I needed a tool to get texture data from sprites.
I wanted to ignore hover effect on transparent pixels.
I had problems with Spritesheets, only the first frame was processed right, other frames were not, I essentially got back empy data, or I guess black pixels. After a lot of investigation changing this line (the one that is commented out) to the line below fixed the problem:
(path: phaser3-rex-plugins\plugins\utils\texture\CopyFrameToCanvas.js)
Notice that for the 5 param (and 3 too) one, the 2nd and 3rd parameter is the destination coordinates, for the 9 param function, it's different.
We need to use the 9 param function if we want to specify the source coordinates, the other ones only take the destination coordinates into consideration.
So for the canvas data every frame should be rendered at (0,0) regarless of cutX or cutY, but also need to specify source coordinates.
I downloaded this library since I needed a tool to get texture data from sprites. I wanted to ignore hover effect on transparent pixels. I had problems with Spritesheets, only the first frame was processed right, other frames were not, I essentially got back empy data, or I guess black pixels. After a lot of investigation changing this line (the one that is commented out) to the line below fixed the problem: (path: phaser3-rex-plugins\plugins\utils\texture\CopyFrameToCanvas.js)
(this is called in phaser3-rex-plugins\plugins\data\canvasdata\TextureToColorMap.js for my case)
From official docs:
Notice that for the 5 param (and 3 too) one, the 2nd and 3rd parameter is the destination coordinates, for the 9 param function, it's different. We need to use the 9 param function if we want to specify the source coordinates, the other ones only take the destination coordinates into consideration. So for the canvas data every frame should be rendered at (0,0) regarless of cutX or cutY, but also need to specify source coordinates.