MCPcopy Create free account
hub / github.com/corbanbrook/dsp.js / refreshBackground

Function refreshBackground

examples/js/processing.js:5886–5899  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5884
5885 // Set default background behavior for 2D and 3D contexts
5886 var refreshBackground = function() {
5887 if (curSketch.options.isOpaque) {
5888 if (p.use3DContext) {
5889 // fill background default opaque gray
5890 curContext.clearColor(204 / 255, 204 / 255, 204 / 255, 1.0);
5891 curContext.clear(curContext.COLOR_BUFFER_BIT | curContext.DEPTH_BUFFER_BIT);
5892 } else {
5893 // fill background default opaque gray
5894 curContext.fillStyle = "rgb(204, 204, 204)";
5895 curContext.fillRect(0, 0, p.width, p.height);
5896 isFillDirty = true;
5897 }
5898 }
5899 };
5900
5901 // Changes the size of the Canvas ( this resets context properties like 'lineCap', etc.
5902 p.size = function size(aWidth, aHeight, aMode) {

Callers 1

processing.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected