Open tomjakubowski opened 6 years ago
This doesn't address the completeness of the docs, but checkout resl if you haven't already. https://github.com/regl-project/resl
Maybe a note about a loading strategy being required would help with confusion in the docs.
This might be a bug, according to the docs:
If an image element is specified and not yet loaded, then regl will upload a temporary image and hook a callback on the image
http://regl.party/api#textures
Trying this (with a real
src
) resulted in this exception being thrown (regl 1.3.0):Meanwhile, API.md as of now lists a similar example which does work:
Now, it would be pretty cool if
regl.texture()
could somehow gracefully handle a "load in progress" Image object, but it doesn't (probably for a good reason I can't think of), so I think the API doc on the website should be updated to reflect the existing behavior.