greendot

SVG in a TileSprite

Recommended Posts

Hi everyone,

I'm trying to add a TileSprite using a SVG file but it's not displaying properly - it only displays part of it repeatedly. It works fine if I use a non-SVG file, ie, JPG, PNG. Any ideas if I can use a SVG file for TileSprite?

Share this post


Link to post
Share on other sites

I've just started testing SVGs in Phaser 3, and they can be a little wonky.  One thing to check first is to make sure the SVG has a height and width defined in the XML.

Share this post


Link to post
Share on other sites

Thanks. I checked and the SVG file has width and height defined in its XML. I am trying to have my TileSprite to auto scale depending on the device size so I thought a SVG file would be the proper way to go. Any other recommendation?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.