Skip to content

Commit

Permalink
#21 OffscreenCanvasの実装(WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
ienaga committed Jan 27, 2023
1 parent c772b12 commit 860141f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: browser-actions/setup-chromium@latest
- uses: browser-actions/setup-firefox@latest
with:
firefox-version: latest
- run: npm install
- run: npm run test

Expand All @@ -36,5 +38,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: browser-actions/setup-chromium@latest
- uses: browser-actions/setup-firefox@latest
with:
firefox-version: latest
- run: npm install
- run: npm run test
6 changes: 2 additions & 4 deletions src/util/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,14 @@ class Renderer
} else {

// create gl context
const option = {
const gl = canvas.getContext("webgl2", {
"stencil": true,
"premultipliedAlpha": true,
"antialias": false,
"depth": false,
"preserveDrawingBuffer": true
};
});

let gl = canvas.getContext("webgl2", option)
|| canvas.getContext("webgl", option);
if (gl) {

this._$context = new CanvasToWebGLContext(
Expand Down
6 changes: 2 additions & 4 deletions src/worker/RenderBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,13 @@ class CommandController
this._$canvas = canvas
this._$samples = samples;

const option = {
let gl = canvas.getContext("webgl2", {
"stencil": true,
"premultipliedAlpha": true,
"antialias": false,
"depth": false,
"preserveDrawingBuffer": true
};

let gl = canvas.getContext("webgl2", option);
});

this._$context = new CanvasToWebGLContext(gl, this.samples);
this._$cacheStore._$context = this._$context;
Expand Down

0 comments on commit 860141f

Please sign in to comment.