Closed ratuspro closed 6 years ago
Sounds like the canvas is not null, but it has no context. What have you passed to the Stage as a canvas reference?
I've passed a canvas element. I'm trying to figure out what happened since I was able to run the code without errors in a different context. I think it has something to do with the canvas element not having a width or a height specified in html.
Pretty sure a 0-size canvas still has a context. Can you provide a fiddle or something?
A canvas tag without a context uses a default width / height (300 x 150), so that shouldn't be an issue. As Lanny mentioned though, the error you're getting would strongly indicate you may be passing in the wrong tag or something.
Closing. Feel free to reopen if this is still an issue and more info is available.
I'm using TweenJS and EaselJs installed using bower. I've encountered a problem recently where it seems the tick listener is calling the procedure this.canvas.getContext several times prompting this error:
Any suggestion?