File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
screenshots/WebGL/p5.strands/it recovers from p5.strands errors Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -692,7 +692,7 @@ visualSuite('WebGL', function() {
692692 } ) ;
693693 } ) ;
694694
695- visualSuite ( 'textures in p5.strands' , async ( ) => {
695+ visualSuite ( 'textures in p5.strands' , ( ) => {
696696 visualTest ( 'uniformTexture() works' , async ( p5 , screenshot ) => {
697697 p5 . createCanvas ( 50 , 50 , p5 . WEBGL ) ;
698698 const tex = await p5 . loadImage ( '/unit/assets/cat.jpg' ) ;
@@ -708,4 +708,18 @@ visualSuite('WebGL', function() {
708708 screenshot ( ) ;
709709 } ) ;
710710 } ) ;
711+
712+ visualSuite ( 'p5.strands' , ( ) => {
713+ visualTest ( 'it recovers from p5.strands errors' , ( p5 , screenshot ) => {
714+ p5 . createCanvas ( 50 , 50 , p5 . WEBGL ) ;
715+ try {
716+ p5 . baseMaterialShader ( ) . modify ( ( ) => {
717+ undefined . someMethod ( ) ; // This will throw an error
718+ } ) ;
719+ } catch ( e ) { }
720+ p5 . background ( 'red' ) ;
721+ p5 . circle ( p5 . noise ( 0 ) , p5 . noise ( 0 ) , 20 ) ;
722+ screenshot ( ) ;
723+ } ) ;
724+ } ) ;
711725} ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "numScreenshots" : 1
3+ }
You can’t perform that action at this time.
0 commit comments