openfl3 and spritesheet, maybe problems with transformations?


When I compile my project without “-Dv2” (with everyhting is fine), all my sprites which are rendered using spritesheet are rendered completely incorrect.
I read somehwhere in this forum that there are still problems with transformations. That would make sense, since spritesheet must transform a lot.

So I am wondering, is this still an issue and I should simply wait? Or is it a problem that has to be changed in spritesheet and it would make sense to investigate?


what is completely incorrect? I heard that spritesheet was flipping the images when you use the new version

I made a minimal example of the problem:
I have this bitmap:
The inner rect is at position (25,25) hand has a size of (50,50).

Now, I want to to draw it (the inner rect) on the screen at position (25,25) but scale by 2 to size (100,100). I do not want to draw any yellow. This code works with v2:

import openfl.display.Sprite;
import openfl.geom.Matrix;

class Main extends Sprite {
	public function new () {
		super ();
                var bitmap = openfl.Assets.getBitmapData('assets/example.png');
                var mx = new Matrix();
                graphics.beginBitmapFill(bitmap, mx, false, true);

But gives this result without -Dv2:

So the problem is not inside spritesheet but inside Graphics . I tested the code on a mac, had the same result, can’t test on windows because I have driver issues with the new openfl.
I can confirm It’s a bug.

I fixed it in this PR matrices are hard :cry:

1 Like

Pulled it, thanks :slight_smile: