File tree 4 files changed +14
-4
lines changed
4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -1209,8 +1209,6 @@ function setting(p5, fn){
1209
1209
* @chainable
1210
1210
*/
1211
1211
fn . fill = function ( ...args ) {
1212
- this . _renderer . states . fillSet = true ;
1213
- this . _renderer . states . doFill = true ;
1214
1212
this . _renderer . fill ( ...args ) ;
1215
1213
return this ;
1216
1214
} ;
@@ -1581,8 +1579,6 @@ function setting(p5, fn){
1581
1579
*/
1582
1580
1583
1581
fn . stroke = function ( ...args ) {
1584
- this . _renderer . states . strokeSet = true ;
1585
- this . _renderer . states . doStroke = true ;
1586
1582
this . _renderer . stroke ( ...args ) ;
1587
1583
return this ;
1588
1584
} ;
Original file line number Diff line number Diff line change @@ -154,6 +154,16 @@ class Renderer {
154
154
155
155
}
156
156
157
+ fill ( ) {
158
+ this . states . fillSet = true ;
159
+ this . states . doFill = true ;
160
+ }
161
+
162
+ stroke ( ) {
163
+ this . states . strokeSet = true ;
164
+ this . states . doStroke = true ;
165
+ }
166
+
157
167
textSize ( s ) {
158
168
if ( typeof s === 'number' ) {
159
169
this . states . textSize = s ;
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ class Renderer2D extends Renderer {
200
200
}
201
201
202
202
fill ( ...args ) {
203
+ super . fill ( ...args ) ;
203
204
const color = this . _pInst . color ( ...args ) ;
204
205
this . _setFill ( color . toString ( ) ) ;
205
206
@@ -210,6 +211,7 @@ class Renderer2D extends Renderer {
210
211
}
211
212
212
213
stroke ( ...args ) {
214
+ super . stroke ( ...args ) ;
213
215
const color = this . _pInst . color ( ...args ) ;
214
216
this . _setStroke ( color . toString ( ) ) ;
215
217
Original file line number Diff line number Diff line change @@ -697,6 +697,7 @@ class RendererGL extends Renderer {
697
697
* black canvas with purple cube spinning
698
698
*/
699
699
fill ( ...args ) {
700
+ super . fill ( ...args ) ;
700
701
//see material.js for more info on color blending in webgl
701
702
// const color = fn.color.apply(this._pInst, arguments);
702
703
const color = this . _pInst . color ( ...args ) ;
@@ -736,6 +737,7 @@ class RendererGL extends Renderer {
736
737
* black canvas with purple cube with pink outline spinning
737
738
*/
738
739
stroke ( ...args ) {
740
+ super . stroke ( ...args ) ;
739
741
// const color = fn.color.apply(this._pInst, arguments);
740
742
const color = this . _pInst . color ( ...args ) ;
741
743
this . states . curStrokeColor = color . _array ;
You can’t perform that action at this time.
0 commit comments