SVG not working as texture anymore

@RaananW

OK after some thinking I got the storybook running :slight_smile:

Now SVG is loading and working :slight_smile: but only from URL load :confused: not as base64 string anymore.

I will prepare a PG to demonstrate the issue.

But something was fixed.

SVG loaded and used as part of the canvas in FF also is not working still. But I think this is a separate bug. Lets fix this step by step :slight_smile:

Regards
Peter

@carolhmj could you give it a try ? (base64 svg)

Woop needed to grab the mime type from the string, done: Fix loading of base64 svgs by carolhmj ยท Pull Request #12937 ยท BabylonJS/Babylon.js (github.com)

2 Likes

@carolhmj

OK, so you already found a solution :slight_smile: before I got the time to make a PB :slight_smile: Great. Wanted to do it now.

So I think this is bug 2 out of 3 that there are here. I will wait for a new release with that fix and make a PG with the 3rd one. And then you can review and fix it as well :slight_smile:

The problem originates if you:
Load SVG into HTMLImageElement
you take the image from HTMLImageElement and draw it into the canvas
and then use canvas as a DynamicTexture

then the SVG is not showing up anymore.

If that makes sense. If not. after this bug 2 with bases64 is in master and released I will make a PG.

Regards
Peter

I will release 5.22.1 later today, including the fix (after merging everything)

1 Like