Skip to content

Commit 9c4e7dc

Browse files
author
Lauren McCarthy
committed
docs
1 parent 7943c0b commit 9c4e7dc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/environment/environment.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,16 +325,23 @@ define(function(require) {
325325
};
326326

327327
/*
328-
*
328+
* Disables scaling for retina display. By default, the pixels
329+
* are scaled for the display.
329330
*
330-
* devicePixelScaling
331+
* @devicePixelScaling
331332
* @param {Boolean} val whether the sketch should be scaled or not
332333
* @example
333334
* <div>
334335
* <code>
335336
* function setup() {
337+
* createCanvas(100, 100);
338+
* }
339+
*
340+
* function draw() {
341+
* ellipse(width/2, height/2, 50, 50);
336342
* }
337343
* function mousePressed() {
344+
* devicePixelScaling(false);
338345
* }
339346
* </code>
340347
* </div>

0 commit comments

Comments
 (0)