Sorry for my noob question regarding the canvas (no experience with it and ShapeDiver API).
I’m trying here https://codepen.io/nekhbet/pen/LYQNLPq to put a static background image (so we can take a “screenshot” with our model in a fixed environment).
The issue is that if I disable the ShapeDiver viewer init (line 2 is “if (0) {”) and I click the “test” button, the image is loaded on the canvas. But, if I let the viewer to load, the “test” button clicking throws an error as the “2d” context is not defined. I looked over HTMLCanvasElement.getContext() - Web APIs | MDN for all the possible values of getContext and tried them all without luck).
The first two paragraphs on the documentation page you referenced (HTMLCanvasElement.getContext() - Web APIs | MDN) explain the reason: It’s not possible to get two different types of context for a single canvas.