webpack-spritesmith icon indicating copy to clipboard operation
webpack-spritesmith copied to clipboard

How to support '@3' retina?

Open wind4gis opened this issue 6 years ago • 3 comments

Excuse me, How to support '@3' retina and '@2' at the same time?

wind4gis avatar Jan 22 '19 09:01 wind4gis

I don't think it is possible with this plugin. It is modeled after gulp-spritesmith and it doesn't seem to support that. It will require different compilation strategy and different api templates. Now it is hard coded to either create spritesheet from one set of images or two spritesheets from two sets of images. And api templates I am using are also assuming either one or two sets of images.

mixtur avatar Jan 22 '19 10:01 mixtur

@mixtur can I use node-glob, and I put @1 @2 @3 three type of picture into three folder, just new three plugin to support?

wind4gis avatar Jan 22 '19 13:01 wind4gis

You can create three instances of plugin, yes. It will produce three different spritesheets, depeding on how you configure each instance, but it will also produce three APIs. If you want them to cooperate you'll have to do this coordination yourself.

mixtur avatar Jan 22 '19 13:01 mixtur