Is there a minimum size for objects on CPP/Neko/HTML targets?

Hi! It’s been a long time since I’ve been here and I’m back with another noob question (I think).

I’ve just upgraded OpenFL to the latest version and found out that one of the classes won’t render properly anymore in here on all targets except for Flash :sweat:

This class renders randomized sprites as a group of particles (so I can explode’em later), so I draw really tiny squares, like:

part:Shape = new Shape(); 0x000000, 1 ); 0, 0, 1, 1 );;
add( part );

Before upgrading OpenFL and Lime it worked pretty much nicely. Now I can only render squares of 3px or bigger with drawRect. I know I can use scaling, but I’d like to avoid doing it, if possible. :sweat_smile:

Also, doing something like this works too (as it makes part have 3x3 pixels):

part:Shape = new Shape(); 0x000000, 1 ); 0, 0, 1, 1 ); 2, 2, 1 );;
add( part );

So, before I try anything else in here, does OpenFL now only allow objects of 3px and more on CPP/Neko/HTML targets?

Thanks :grin:

For small sizes, it might run into rounding issues. If you want a single pixel, perhaps you should consider using a BitmapData, in fact, for the full animation, using a Tilemap or some other API might be a sensible approach to animating the explosion

Thanks for the answer, @singmajesty!

I was storing each pixel as a separate object so I could randomize the explosions. I’m quite bad with particles so this was my “lazy” way of doing it.

I’m already working on a version using BitmapData in here, and thinking of another way I could make the sprites explode. :wink:

Thanks again! :grin: