File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
editor/visualizers/effects Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ export default class VSAEffect {
286286 async setURL ( url ) {
287287 try {
288288 const u = new URL ( url , window . location . href ) ;
289- if ( u . hostname !== window . location . hostname && u . hostname !== 'www.vertexshaderart.com' ) {
289+ if ( u . hostname !== window . location . hostname && u . hostname !== 'www.vertexshaderart.com' && u . hostname !== 'vertexshaderart.com' ) {
290290 return ;
291291 }
292292 if ( url === this . currentUrl ) {
@@ -305,7 +305,10 @@ export default class VSAEffect {
305305 this . currentUrl = this . pendingUrl ;
306306 this . pendingUrl = undefined ;
307307 this . compiling = true ;
308- const req = await fetch ( `${ url } ?format=json` ) ;
308+ const mungedUrl = url . includes ( 'vertexshaderart.com' )
309+ ? `${ url . replace ( '//www.' , '//' ) } /art.json`
310+ : url ;
311+ const req = await fetch ( mungedUrl ) ;
309312 const vsa = await req . json ( ) ;
310313 const gl = this . gl ;
311314 const vs = applyTemplateToShader ( vsa . settings . shader ) ;
You can’t perform that action at this time.
0 commit comments