File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ class Graphics {
45
45
// Attach renderer properties
46
46
for ( const p in this . _renderer ) {
47
47
if ( p [ 0 ] === '_' || typeof this . _renderer [ p ] === 'function' ) continue ;
48
- if ( Object . hasOwn ( this , p ) ) continue ;
49
48
Object . defineProperty ( this , p , {
50
49
get ( ) {
51
50
return this . _renderer ?. [ p ] ;
Original file line number Diff line number Diff line change @@ -144,15 +144,13 @@ function rendering(p5, fn){
144
144
this . _elements . push ( this . _renderer ) ;
145
145
this . _renderer . _applyDefaults ( ) ;
146
146
147
- // Attach renderer properties
148
- for ( const p in this . _renderer ) {
149
- if ( p [ 0 ] === '_' || typeof this . _renderer [ p ] === 'function' ) continue ;
150
- if ( Object . hasOwn ( this , p ) ) continue ;
151
- Object . defineProperty ( this , p , {
147
+ // Make the renderer own `pixels`
148
+ if ( ! Object . hasOwn ( this , 'pixels' ) ) {
149
+ Object . defineProperty ( this , 'pixels' , {
152
150
get ( ) {
153
- return this . _renderer ?. [ p ] ;
151
+ return this . _renderer ?. pixels ;
154
152
}
155
- } )
153
+ } ) ;
156
154
}
157
155
158
156
return this . _renderer ;
You can’t perform that action at this time.
0 commit comments