MCPcopy
hub / github.com/processing/p5.js / fill

Method fill

src/core/p5.Renderer3D.js:830–839  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 3

beginGeometryMethod · 0.95
endGeometryMethod · 0.95
beginClipMethod · 0.95

Calls 1

setValueMethod · 0.45

Tested by

no test coverage detected