MCPcopy Index your code
hub / github.com/processing/p5.js / pixelDensity

Method pixelDensity

src/webgl/p5.Framebuffer.js:271–279  ·  view source on GitHub ↗

* Sets the framebuffer's pixel density or returns its current density. * * Computer displays are grids of little lights called pixels. A display's * pixel density describes how many pixels it packs into an area. Displays * with smaller pixels have a higher pixel density and create sharpe

(density)

Source from the content-addressed store, hash-verified

269 * }
270 */
271 pixelDensity(density) {
272 if (density) {
273 this._autoSized = false;
274 this.density = density;
275 this._handleResize();
276 } else {
277 return this.density;
278 }
279 }
280
281 /**
282 * Toggles the framebuffer's autosizing mode or returns the current mode.

Callers 2

_getPixelMethod · 0.45
_createPixelsArrayMethod · 0.45

Calls 1

_handleResizeMethod · 0.95

Tested by

no test coverage detected