selaux/node-sprite-generator

generate spritesheet per pixelRatio

Closed this issue · 4 comments

Because of not resizing image based on provided pixelRatio, client is required to load oversize image which is not necessary.

I am willing to send a pull request to cover this for only 'compositor: gm'.
@selaux, please let me know, if this is something you would be willing to accept?

@selaux can you please respond to this? Before I start work on this, I need to make sure you agree with the idea.

Sorry for not commenting.

I don't completely get what the goal of this issue is. What I think you want: You want to specify a scaling factor with which all images are scaled down, so you can have one sprite for high-res devices (scaling factor 1) and one for low-res devices (e.g. scaling factor 0.5), but only need to provide a single set of images. Did I get it right? If yes, I think it would be a great thing to have.

You wouldn't need to adapt the compositors for that, only the layout modules. They would need to scale down the images in the process of generating the sprite layout.

Yes, exactly it is, I will work on this soon.

Hey. A bit late, but can you check wether the PR #33 accomplishes this?