File tree 3 files changed +30
-9
lines changed
3 files changed +30
-9
lines changed Original file line number Diff line number Diff line change 1
1
## ShaderToy extension changelog:
2
+
3
+ - 0.13.201 (28-11-2020)
4
+
5
+ - Temporary fix for resoultion decrease. (doesn't change resoltion when entering fullscreen)
6
+
7
+ - 0.13.200
8
+
9
+ - Fix for render timers
10
+
2
11
- 0.13.190 (10-10-2019)
3
12
4
13
- Firefox compatibility fix - ** alternative profile page and render mode now works in Firefox** .
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.200 " ,
4
+ "version" : " 0.13.201 " ,
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 295
295
296
296
/**
297
297
* Changes Shader resolution.
298
- * Resolution calculation is based on divider and depends of fullscreen
299
- * mode.
298
+ * Resolution calculation is based on divider.
300
299
*
301
300
* @param {number } divider
302
301
*/
303
302
decreaseRes ( divider ) {
304
303
var b = this . c . getBoundingClientRect ( ) ,
305
304
n = {
306
- w : b . width / divider ,
307
- h : b . height / divider
305
+ w : Math . floor ( b . width / divider ) ,
306
+ h : Math . floor ( b . height / divider )
308
307
} ;
309
308
310
- gShaderToy . resize ( n . w , n . h ) ;
309
+ var mE = gShaderToy . mEffect ;
310
+ var xres = n . w ;
311
+ var yres = n . h ;
312
+
313
+ gShaderToy . mEffect . mRO . unobserve ( gShaderToy . mCanvas ) ;
314
+
315
+ mE . mCanvas . setAttribute ( 'width' , xres ) ;
316
+ mE . mCanvas . setAttribute ( 'height' , yres ) ;
317
+ mE . mCanvas . width = xres ;
318
+ mE . mCanvas . height = yres ;
319
+ mE . mXres = xres ;
320
+ mE . mYres = yres ;
321
+
322
+ mE . ResizeBuffers ( xres , yres ) ;
323
+
324
+ gShaderToy . iSetResolution ( xres , yres ) ;
311
325
this . currentDivider = divider ;
312
- window . dispatchEvent (
313
- new window . CustomEvent ( 'toyplug:canvas:resolution:changed' )
314
- ) ;
315
326
}
316
327
317
328
/**
351
362
var which = e . which ,
352
363
code = e . code ;
353
364
if ( e . target . id === self . MAIN_SHADERTOY_DEMO_ID ) {
365
+ console . log ( e ) ;
354
366
// Alt (or Cmd) + ...
355
367
if ( e . altKey || e . metaKey ) {
356
368
// 1...9 Keys
You can’t perform that action at this time.
0 commit comments