Loading SpriteSheet
Closed this issue · 2 comments
ryansese commented
Been trying out react-pixi for awhile and so far I've been enjoying it alot. This is not an issue but more of an inquiry on how to use spritesheet with jsxtransform. Thanks in advance.
Izzimach commented
There really isn't an elegant way to use spritesheets with react-pixi unfortunately.
Looking at this example I suggest that you load the spritesheet yourself using a PIXI.AssetLoader
and then extract the frames with PIXI.Texture.fromFrame()
. At that point you should be able to use a frame as the image
attribute for a <Sprite>
component.
That SHOULD work although I haven't tried it. If you do get it to work, post in here or make a PR so I can add it to the examples.
ryansese commented
I'll definitely give a try, thanks