File tree 1 file changed +5
-2
lines changed
editor/visualizers/effects
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 {
286
286
async setURL ( url ) {
287
287
try {
288
288
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' ) {
290
290
return ;
291
291
}
292
292
if ( url === this . currentUrl ) {
@@ -305,7 +305,10 @@ export default class VSAEffect {
305
305
this . currentUrl = this . pendingUrl ;
306
306
this . pendingUrl = undefined ;
307
307
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 ) ;
309
312
const vsa = await req . json ( ) ;
310
313
const gl = this . gl ;
311
314
const vs = applyTemplateToShader ( vsa . settings . shader ) ;
You can’t perform that action at this time.
0 commit comments