@@ -338,7 +338,7 @@ suite('p5.RendererGL', function() {
338
338
pg . clear ( ) ;
339
339
myp5 . image ( pg , - myp5 . width / 2 , - myp5 . height / 2 ) ;
340
340
pixel = myp5 . get ( 0 , 0 ) ;
341
- assert . deepEqual ( pixel , [ 0 , 0 , 0 , 255 ] ) ;
341
+ assert . deepEqual ( pixel , [ 0 , 255 , 255 , 255 ] ) ;
342
342
done ( ) ;
343
343
} ) ;
344
344
@@ -361,7 +361,7 @@ suite('p5.RendererGL', function() {
361
361
pg . background ( 100 , 100 , 100 , 100 ) ;
362
362
myp5 . image ( pg , - myp5 . width / 2 , - myp5 . height / 2 ) ;
363
363
pixel = myp5 . get ( 0 , 0 ) ;
364
- assert . deepEqual ( pixel , [ 100 , 100 , 100 , 255 ] ) ;
364
+ assert . deepEqual ( pixel , [ 39 , 194 , 194 , 255 ] ) ;
365
365
done ( ) ;
366
366
} ) ;
367
367
@@ -383,7 +383,7 @@ suite('p5.RendererGL', function() {
383
383
pg . clear ( ) ;
384
384
myp5 . image ( pg , 0 , 0 ) ;
385
385
pixel = myp5 . get ( 0 , 0 ) ;
386
- assert . deepEqual ( pixel , [ 0 , 0 , 0 , 255 ] ) ;
386
+ assert . deepEqual ( pixel , [ 0 , 255 , 255 , 255 ] ) ;
387
387
done ( ) ;
388
388
} ) ;
389
389
@@ -394,7 +394,7 @@ suite('p5.RendererGL', function() {
394
394
pg . background ( 100 , 100 , 100 , 100 ) ;
395
395
myp5 . image ( pg , 0 , 0 ) ;
396
396
pixel = myp5 . get ( 0 , 0 ) ;
397
- assert . deepEqual ( pixel , [ 100 , 100 , 100 , 255 ] ) ;
397
+ assert . deepEqual ( pixel , [ 39 , 194 , 194 , 255 ] ) ;
398
398
done ( ) ;
399
399
} ) ;
400
400
} ) ;
@@ -483,14 +483,14 @@ suite('p5.RendererGL', function() {
483
483
myp5 . createCanvas ( 10 , 10 , myp5 . WEBGL ) ;
484
484
myp5 . noStroke ( ) ;
485
485
assert . deepEqual ( [ 122 , 0 , 122 , 255 ] , mixAndReturn ( myp5 . ADD , 0 ) ) ;
486
- assert . deepEqual ( [ 0 , 0 , 255 , 255 ] , mixAndReturn ( myp5 . REPLACE , 255 ) ) ;
486
+ assert . deepEqual ( [ 0 , 0 , 122 , 122 ] , mixAndReturn ( myp5 . REPLACE , 255 ) ) ;
487
487
assert . deepEqual ( [ 133 , 255 , 133 , 255 ] , mixAndReturn ( myp5 . SUBTRACT , 255 ) ) ;
488
- assert . deepEqual ( [ 255 , 0 , 255 , 255 ] , mixAndReturn ( myp5 . SCREEN , 0 ) ) ;
489
- assert . deepEqual ( [ 0 , 255 , 0 , 255 ] , mixAndReturn ( myp5 . EXCLUSION , 255 ) ) ;
488
+ assert . deepEqual ( [ 122 , 0 , 122 , 255 ] , mixAndReturn ( myp5 . SCREEN , 0 ) ) ;
489
+ assert . deepEqual ( [ 133 , 255 , 133 , 255 ] , mixAndReturn ( myp5 . EXCLUSION , 255 ) ) ;
490
490
// Note that in 2D mode, this would just return black, because 2D mode
491
491
// ignores alpha in this case.
492
- assert . deepEqual ( [ 133 , 69 , 202 , 255 ] , mixAndReturn ( myp5 . MULTIPLY , 255 ) ) ;
493
- assert . deepEqual ( [ 255 , 0 , 255 , 255 ] , mixAndReturn ( myp5 . LIGHTEST , 0 ) ) ;
492
+ assert . deepEqual ( [ 133 , 69 , 133 , 255 ] , mixAndReturn ( myp5 . MULTIPLY , 255 ) ) ;
493
+ assert . deepEqual ( [ 122 , 0 , 122 , 255 ] , mixAndReturn ( myp5 . LIGHTEST , 0 ) ) ;
494
494
assert . deepEqual ( [ 0 , 0 , 0 , 255 ] , mixAndReturn ( myp5 . DARKEST , 255 ) ) ;
495
495
done ( ) ;
496
496
} ) ;
@@ -517,15 +517,11 @@ suite('p5.RendererGL', function() {
517
517
const assertSameIn2D = function ( colorA , colorB , mode ) {
518
518
const refColor = testBlend ( myp5 , colorA , colorB , mode ) ;
519
519
const webglColor = testBlend ( ref , colorA , colorB , mode ) ;
520
- if ( refColor [ 3 ] === 0 ) {
521
- assert . equal ( webglColor [ 3 ] , 0 ) ;
522
- } else {
523
- assert . deepEqual (
524
- refColor ,
525
- webglColor ,
526
- `Blending ${ colorA } with ${ colorB } using ${ mode } `
527
- ) ;
528
- }
520
+ assert . deepEqual (
521
+ refColor ,
522
+ webglColor ,
523
+ `Blending ${ colorA } with ${ colorB } using ${ mode } `
524
+ ) ;
529
525
} ;
530
526
531
527
for ( const alpha of [ 255 , 200 ] ) {
0 commit comments