immersive-web/model-element

Interactions with HTMLCanvasElement

marcoscaceres opened this issue · 3 comments

What would be useful is allowing canvas.drawImage() to take a <model>. .drawImage() accepts <video>, <img> already (plus a bunch of other related things). One could then create neat little renders to composite onto a canvas.

Is that really needed?
Authors can already use frameworks to do the same. With a framework they'll also have more control.

In addition, if we allow rendering to a canvas, we need to have consistent rendering across UAs

Authors can already use frameworks to do the same. With a framework they'll also have more control.

Sure, but the point is not to require a framework.

In addition, if we allow rendering to a canvas, we need to have consistent rendering across UAs

Depends on the definition of "consistent": it's not hard requirement, as it isn't a requirement with CSS, WebGL, or with <model>, as otherwise <model> wouldn't be viable either.

Authors can already use frameworks to do the same. With a framework they'll also have more control.

Sure, but the point is not to require a framework.

At least for us, the point is that a model will render in actual 3D. :-)

In addition, if we allow rendering to a canvas, we need to have consistent rendering across UAs

Depends on the definition of "consistent": it's not hard requirement, as it isn't a requirement with CSS, WebGL, or with <model>, as otherwise <model> wouldn't be viable either.

Don't 2D Canvas and WebGL have conformance tests on rendered pixels? I suspect we will have to develop a similar test suite if we allow a model as a canvas image source.