@@ -447,27 +447,26 @@ suite('p5.Shader', function() {
447447 } ) . not . toThrowError ( ) ;
448448 } ) ;
449449
450- test ( 'returns numbers for builtin globals outside hooks and a strandNode when called inside hooks' , ( ) => {
451- myp5 . createCanvas ( 5 , 5 , myp5 . WEBGL ) ;
452- let mxInHook ;
453- let wInHook ;
454- myp5 . baseMaterialShader ( ) . modify ( ( ) => {
455- myp5 . getPixelInputs ( inputs => {
456- mxInHook = window . mouseX ;
457- wInHook = window . width ;
458- inputs . color = [ 1 , 0 , 0 , 1 ] ;
459- assert . isTrue ( mxInHook . isStrandsNode ) ;
460- assert . isTrue ( wInHook . isStrandsNode ) ;
461- return inputs ;
462- } ) ;
463- } , { myp5 } ) ;
464-
465- const mx = window . mouseX ;
466- const w = window . width ;
467- assert . isNumber ( mx ) ;
468- assert . isNumber ( w ) ;
469- assert . strictEqual ( w , myp5 . width ) ;
450+ test ( 'returns numbers for builtin globals outside hooks and a strandNode when called inside hooks' , ( ) => {
451+ myp5 . createCanvas ( 5 , 5 , myp5 . WEBGL ) ;
452+ myp5 . baseMaterialShader ( ) . modify ( ( ) => {
453+ myp5 . getPixelInputs ( inputs => {
454+ const mxInHook = window . mouseX ;
455+ const wInHook = window . width ;
456+ assert . isTrue ( mxInHook . isStrandsNode ) ;
457+ assert . isTrue ( wInHook . isStrandsNode ) ;
458+ inputs . color = [ 1 , 0 , 0 , 1 ] ;
459+ return inputs ;
470460 } ) ;
461+ } , { myp5 } ) ;
462+
463+ const mx = window . mouseX ;
464+ const w = window . width ;
465+ assert . isNumber ( mx ) ;
466+ assert . isNumber ( w ) ;
467+ assert . strictEqual ( w , myp5 . width ) ;
468+ } ) ;
469+
471470
472471 test ( 'handle custom uniform names with automatic values' , ( ) => {
473472 myp5 . createCanvas ( 50 , 50 , myp5 . WEBGL ) ;
0 commit comments