Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lcjs-4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Niilo Keinänen committed Feb 6, 2023
2 parents d2f7a1c + f8f4218 commit 8c7be34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ dom.window.HTMLCanvasElement.prototype.getContext = function () {
if (arguments[0] === 'webgl') {
// create headless-gl GL context
const ctx: ReturnType<typeof createContext> & Partial<StackGlResize> = createContext(1, 1, arguments[1])
if (!ctx) {
return ctx
}
// insert the resize method to the context so that lcjs package can use it
ctx.resize = ctx.getExtension('STACKGL_resize_drawingbuffer').resize
return ctx
Expand Down

0 comments on commit 8c7be34

Please sign in to comment.