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 {
190
190
return this . _renderer . pixels ;
191
191
}
192
192
193
+ get drawingContext ( ) {
194
+ return this . _renderer . drawingContext ;
195
+ }
196
+
193
197
static registerAddon ( addon ) {
194
198
const lifecycles = { } ;
195
199
addon ( p5 , p5 . prototype , lifecycles ) ;
Original file line number Diff line number Diff line change @@ -68,9 +68,6 @@ class Renderer2D extends Renderer {
68
68
if ( attributes . colorSpace === 'display-p3' ) {
69
69
this . states . colorMode = RGBHDR ;
70
70
}
71
- if ( isMainCanvas ) {
72
- this . _pInst . drawingContext = this . drawingContext ;
73
- }
74
71
this . scale ( this . _pixelDensity , this . _pixelDensity ) ;
75
72
76
73
if ( ! this . filterRenderer ) {
Original file line number Diff line number Diff line change @@ -123,9 +123,6 @@ class RendererGL extends Renderer {
123
123
// This redundant property is useful in reminding you that you are
124
124
// interacting with WebGLRenderingContext, still worth considering future removal
125
125
this . GL = this . drawingContext ;
126
- if ( isMainCanvas ) {
127
- this . _pInst . drawingContext = this . drawingContext ;
128
- }
129
126
130
127
if ( this . _isMainCanvas ) {
131
128
// for pixel method sharing with pimage
You can’t perform that action at this time.
0 commit comments