Skip to content

Commit

Permalink
Merge pull request processing#4880 from TomGranot/main
Browse files Browse the repository at this point in the history
Add reference to 2D vs. 3D canvas origin location
  • Loading branch information
lmccart authored Nov 1, 2020
2 parents f8a46b4 + f563950 commit a561af7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/core/rendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const defaultClass = 'p5Canvas';
* one drawing canvas you could use <a href="#/p5/createGraphics">createGraphics</a>
* (hidden by default but it can be shown).
*
* Important note: in 2D mode (i.e. when `p5.Renderer` is not set) the origin (0,0)
* is positioned at the top left of the screen. In 3D mode (i.e. when `p5.Renderer`
* is set to `WEBGL`), the origin is positioned at the center of the canvas.
* See [this issue](https://github.com/processing/p5.js/issues/1545) for more information.
*
* The system variables width and height are set by the parameters passed to this
* function. If <a href="#/p5/createCanvas">createCanvas()</a> is not used, the
* window will be given a default size of 100x100 pixels.
Expand Down

0 comments on commit a561af7

Please sign in to comment.