How can I create a texture from a dynamically generated SVG in pixiJS v8?
This worked in v7:
const testSVG = '<svg viewBox="0 0 100 100" width="7" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50" /></svg>'
, texture = PIXI.Texture.from(testSVG)
but texture logs out as undefined in v8.
And this approach:
const textureSource = PIXI.TextureSource.from(testsvg )
const texture = PIXI.Texture.from(textureSource)
Throws this error:
Error: Could not find a source type for resource: <svg viewBox="0 0 100 100" width="7" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50" /></svg>
Thanks!