* Basic fill material for geometry with a given color * @param {Number|Number[]|String|p5.Color} v1 gray value, * red or hue value (depending on the current color mode), * or color Array, or CSS color string * @param {Number} [v2] green or saturation value * @param {Num
(...args)
| 828 | * black canvas with purple cube spinning |
| 829 | */ |
| 830 | fill(...args) { |
| 831 | super.fill(...args); |
| 832 | //see material.js for more info on color blending in webgl |
| 833 | // const color = fn.color.apply(this._pInst, arguments); |
| 834 | const color = this.states.fillColor; |
| 835 | this.states.setValue('curFillColor', color._array); |
| 836 | this.states.setValue('drawMode', constants.FILL); |
| 837 | this.states.setValue('_useNormalMaterial', false); |
| 838 | this.states.setValue('_tex', null); |
| 839 | } |
| 840 | |
| 841 | /** |
| 842 | * Basic stroke material for geometry with a given color |
no test coverage detected