Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Creating texture from SVG elements not on SVG image. #2927
I created a new Sprite as an SVG image and want to change some contents of the SVG. Now that I achieved changing the contents of an SVG image, I want to Sprite.setTexture(svg) from it. This time the svg is an xml element and not saved as an image file. How to do that please help.
@Hidejec I'm currently working on a better SVG support, this might be easier in the future. Anyway, a hack like this might work:
While base64 data urls work too, SVG strings are smaller without base64 conversion.
Afaik this doesn't work in IE though.
UPDATE: A codepen: https://codepen.io/RanzQ/pen/RGPrxr