Skip to content

update orbitControl() documentation #2940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/webgl/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
var p5 = require('../core/core');

/**
* Allows rotation of a 3D sketch by dragging the mouse. As the mouse is dragged
* away from the center of the canvas in the X or Y direction, the sketch is
* rotated about the Y or X axis respectively. Note that this rotation only
* affects objects drawn after orbitControl() has been called in the draw() loop.
* @method orbitControl
* @for p5
* @chainable
Expand All @@ -15,7 +19,7 @@ var p5 = require('../core/core');
* }
*
* function draw() {
* background(50);
* background(200);
* // Orbit control allows the camera to orbit around a target.
* orbitControl();
* box(30, 50);
Expand Down