Skip to content

Commit 86e53e8

Browse files
authored
Merge pull request #119 from patuwwy/fix-fork
Fix shader forking
2 parents 9e92796 + 21a94fc commit 86e53e8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Shadertoy unofficial plugin.",
4-
"version": "0.13.201",
4+
"version": "0.13.213",
55
"description": "Shadertoy.com unofficial plugin.",
66
"homepage_url": "https://github.com/patuwwy/ShaderToy-Chrome-Plugin",
77
"background": {

app/shadertoy-plugin.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@
434434
this.decreaseRes(currentDivider * 0.25);
435435

436436
window.setTimeout(function getImageData() {
437-
imageData = gShaderToy.mGLContext.canvas.toDataURL('image/png');
437+
imageData = gShaderToy.mEffect.mGLContext.canvas.toDataURL('image/png');
438438
}, 100);
439439

440440
window.setTimeout(
@@ -1057,17 +1057,17 @@
10571057
var storedShader = window.localStorage.getItem(
10581058
LOCALSTORAGE_SHADER_FORK_KEYNAME
10591059
),
1060-
ctx = gShaderToy.mGLContext;
1060+
ctx = gShaderToy.mEffect.mGLContext;
10611061

10621062
if (!storedShader) {
10631063
return;
10641064
}
10651065

10661066
try {
1067-
gShaderToy.mGLContext = null;
1067+
gShaderToy.mEffect.mGLContext = null;
10681068
setTimeout(function() {
10691069
dataLoadShader(JSON.parse('[' + storedShader + ']'));
1070-
gShaderToy.mGLContext = ctx;
1070+
gShaderToy.mEffect.mGLContext = ctx;
10711071
gShaderToy.startRendering();
10721072
window.localStorage.setItem(
10731073
LOCALSTORAGE_SHADER_FORK_KEYNAME,

0 commit comments

Comments
 (0)