charlie_says Posted December 2, 2020 Share Posted December 2, 2020 (edited) Further from my query about working with SVG, I'd like to load the image just as data, then I can work around this - whilst I can do this by renaming myFile.svg to myFile.txt it would suite me better to use the original file. I thought you could specify an XHR type in the loader, but this doesn't seem to work for me now (I'm sure I've used it in the past.) Is there a way to load a file as data or a blob? Edited December 3, 2020 by charlie_says Quote Link to comment Share on other sites More sharing options...
charlie_says Posted December 2, 2020 Author Share Posted December 2, 2020 (edited) Actually, I made a little progress on this, with setting the xhrType property on the loader object - but, it still converts the SVG to an image... so it's not really imported just as data,. Edited December 3, 2020 by charlie_says Quote Link to comment Share on other sites More sharing options...
charlie_says Posted December 3, 2020 Author Share Posted December 3, 2020 Despite a bit of experimenting I couldn't get this to work. In the end my solution was to not use the PIXI loader, and just use a fetch() to get my SVG - I can then keep the original data and create a texture from it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.