File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ import p5 from '../core/main';
1111//updates gridOutput
1212p5 . prototype . _updateGridOutput = function ( idT ) {
1313 // Check if the current rendering mode is WEBGL
14- if ( this . _renderer && this . _renderer . isWEBGL ) {
15- throw new Error ( 'gridOutput() is not supported in WEBGL mode.' ) ;
14+ if ( this . _renderer && this . _renderer instanceof p5 . RendererGL ) {
15+ if ( ! this . _didOutputGridWebGLMessage ) {
16+ this . _didOutputGridWebGLMessage = true ;
17+ console . error ( 'gridOutput() does not yet work in WebGL mode.' ) ;
18+ }
19+ return ;
1620 }
1721 //if html structure is not there yet
1822 if ( ! this . dummyDOM . querySelector ( `#${ idT } _summary` ) ) {
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ import p5 from '../core/main';
1111//updates textOutput
1212p5 . prototype . _updateTextOutput = function ( idT ) {
1313 // Check if the current rendering mode is WEBGL
14- if ( this . _renderer . isWEBGL ) {
15- throw new Error ( 'textOutput() is not supported in WEBGL mode.' ) ;
14+ if ( this . _renderer && this . _renderer instanceof p5 . RendererGL ) {
15+ if ( ! this . _didOutputTextWebGLMessage ) {
16+ this . _didOutputTextWebGLMessage = true ;
17+ console . error ( 'textOutput() does not yet work in WebGL mode.' ) ;
18+ }
19+ return ;
1620 }
1721 //if html structure is not there yet
1822 if ( ! this . dummyDOM . querySelector ( `#${ idT } _summary` ) ) {
You can’t perform that action at this time.
0 commit comments