File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,10 @@ class p5 {
190190 return this . _renderer . pixels ;
191191 }
192192
193+ get drawingContext ( ) {
194+ return this . _renderer . drawingContext ;
195+ }
196+
193197 static registerAddon ( addon ) {
194198 const lifecycles = { } ;
195199 addon ( p5 , p5 . prototype , lifecycles ) ;
Original file line number Diff line number Diff line change @@ -68,9 +68,6 @@ class Renderer2D extends Renderer {
6868 if ( attributes . colorSpace === 'display-p3' ) {
6969 this . states . colorMode = RGBHDR ;
7070 }
71- if ( isMainCanvas ) {
72- this . _pInst . drawingContext = this . drawingContext ;
73- }
7471 this . scale ( this . _pixelDensity , this . _pixelDensity ) ;
7572
7673 if ( ! this . filterRenderer ) {
Original file line number Diff line number Diff line change @@ -123,9 +123,6 @@ class RendererGL extends Renderer {
123123 // This redundant property is useful in reminding you that you are
124124 // interacting with WebGLRenderingContext, still worth considering future removal
125125 this . GL = this . drawingContext ;
126- if ( isMainCanvas ) {
127- this . _pInst . drawingContext = this . drawingContext ;
128- }
129126
130127 if ( this . _isMainCanvas ) {
131128 // for pixel method sharing with pimage
You can’t perform that action at this time.
0 commit comments