File tree 2 files changed +11
-7
lines changed
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"manifest_version" : 2 ,
3
3
"name" : " Shadertoy unofficial plugin." ,
4
- "version" : " 0.13.226 " ,
4
+ "version" : " 0.13.228 " ,
5
5
"description" : " Shadertoy.com unofficial plugin." ,
6
6
"homepage_url" : " https://github.com/patuwwy/ShaderToy-Chrome-Plugin" ,
7
7
"background" : {
Original file line number Diff line number Diff line change 669
669
var text = reader . result ;
670
670
671
671
try {
672
- dataLoadShader (
673
- JSON . parse ( '[' + text + ']' )
674
- ) ;
672
+ while ( gShaderToy . mEffect . mPasses . length ) {
673
+ gShaderToy . mEffect . DestroyPass ( 0 ) ;
674
+ }
675
+
676
+ gShaderToy . Load ( JSON . parse ( text , true ) ) ;
675
677
} catch ( error ) {
676
678
window . alert ( 'Failed to load shader!' ) ;
677
679
}
678
-
679
- gShaderToy . mInfo . id = '-1' ;
680
680
} ;
681
681
682
682
reader . readAsText ( file ) ;
1067
1067
gShaderToy . mEffect . DestroyPass ( 0 ) ;
1068
1068
1069
1069
setTimeout ( function ( ) {
1070
- gShaderToy . Load ( JSON . parse ( '[' + storedShader + ']' ) [ 0 ] ) ;
1070
+ while ( gShaderToy . mEffect . mPasses . length ) {
1071
+ gShaderToy . mEffect . DestroyPass ( 0 ) ;
1072
+ }
1073
+
1074
+ gShaderToy . Load ( JSON . parse ( storedShader ) , true ) ;
1071
1075
window . localStorage . setItem (
1072
1076
LOCALSTORAGE_SHADER_FORK_KEYNAME ,
1073
1077
''
You can’t perform that action at this time.
0 commit comments