Skip to content

Commit 0d58d32

Browse files
authored
Merge pull request #129 from patuwwy/fix-fork-2
Use Load instead of dataLoadShader when forking
2 parents 9e166d7 + 4a90072 commit 0d58d32

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
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.224",
4+
"version": "0.13.226",
55
"description": "Shadertoy.com unofficial plugin.",
66
"homepage_url": "https://github.com/patuwwy/ShaderToy-Chrome-Plugin",
77
"background": {

app/shadertoy-plugin.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1056,19 +1056,18 @@
10561056
finishShaderFork() {
10571057
var storedShader = window.localStorage.getItem(
10581058
LOCALSTORAGE_SHADER_FORK_KEYNAME
1059-
),
1060-
ctx = gShaderToy.mEffect.mGLContext;
1059+
);
10611060

10621061
if (!storedShader) {
10631062
return;
10641063
}
10651064

10661065
try {
10671066
gShaderToy.mEffect.mGLContext = null;
1067+
gShaderToy.mEffect.DestroyPass(0);
1068+
10681069
setTimeout(function() {
1069-
dataLoadShader(JSON.parse('[' + storedShader + ']'));
1070-
gShaderToy.mEffect.mGLContext = ctx;
1071-
gShaderToy.startRendering();
1070+
gShaderToy.Load(JSON.parse('[' + storedShader + ']')[0]);
10721071
window.localStorage.setItem(
10731072
LOCALSTORAGE_SHADER_FORK_KEYNAME,
10741073
''

0 commit comments

Comments
 (0)