Texture class does not use the buffer argument and can accept a dataURI in place of a url

Checkout what’s happening in the playground on line 98:

You can see where I commented out various arguments to the BABYLON.Texture class constructor while experimenting.

Oddly enough, I can get it to work when overloading the url argument as a dataURI which shouldn’t work according to the docs:

pinging @sebavan, which will be back beginning of next week :slight_smile:

1 Like

on it, will have a look today

2 Likes

Thank you @sebavan, but also welcome back! :smiley:

2 Likes

What you have here are the actual data so you need to use a rawTexture :slight_smile:

But why do the docs say the Texture class constructor accept a buffer argument? Am I understanding this wrong?

a buffer containing the png data not the RGB ones.

1 Like

Understood. Thank you!