I’m writing a custom script using Editor API. Noticed that Editor’s Canvas getContext(“2d”) returns null. Is there any other way to get the context?
Here is my code:
var canvas = document.getElementById("canvas-3d");
canvas.getContext("2d") //Returns null
I need to use function cxt.drawImage(img, 0, 0, canvas.width, canvas.height);