oframe / ogl

Minimal WebGL Library
https://oframe.github.io/ogl/examples
3.71k stars 211 forks source link

fix: missing HTMLCanvasElement type in Texture.d.ts #198

Closed Jeremboo closed 6 months ago

Jeremboo commented 9 months ago

I'm using a canvas as texture and it's working perfectly!

const myTexture = new Texture(gl);
myTexture.image = myCanvas.canvas;

But typescript complains because HTMLCanvasElement is not part of the typing ImageRepresnetation.

pschroen commented 7 months ago

LGTM

pschroen commented 6 months ago

@gordonnl bump ☝️😉