Skip to content
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

Add p5.Camera docs #5071

Merged
merged 5 commits into from
Mar 9, 2021
Merged

Add p5.Camera docs #5071

merged 5 commits into from
Mar 9, 2021

Conversation

Aloneduckling
Copy link
Contributor

@Aloneduckling Aloneduckling commented Mar 8, 2021

Resolves #5056

Changes:

Added info about p5.Camera object properties(eyeX,Y,Z centerX,Y,Z upX,Y,Z)

Screenshots of the change:

image

image

PR Checklist

@Aloneduckling
Copy link
Contributor Author

This PR resolves the issue #5056

@stalgiag
Copy link
Contributor

stalgiag commented Mar 9, 2021

Looks good @Aloneduckling . The only thing I think would be useful is to show how the values update in the read-only properties. You can do this somewhat simply by reading the values from an orbit camera. For example:

let cam;
let div;

function setup() {
  createCanvas(100, 100, WEBGL);
  cam = createCamera(); 
  div = createDiv();
  div.position(0, 0);
  div.style('color', 'white');
}

function draw() {
  background(0);
  orbitControl();
  box(10);
  div.html('centerZ = ' + cam.centerZ);
}

@Aloneduckling
Copy link
Contributor Author

Aloneduckling commented Mar 9, 2021

@stalgiag, I have made the changes.
I want to mention that I used orbitControl in eyeX, Y, Z examples because I found that orbitControl changes eyeX, Y, Z and would be fit for use here. I used lookAt()in centerX, Y, Z examples reason being the same as above and I have not changed anything in upX, Y, Z because I was not able to find a method that manipulates these properties directly.

image

image

@stalgiag
Copy link
Contributor

stalgiag commented Mar 9, 2021

Great! Thank you.

@all-contributors please add @Aloneduckling for documentation

@stalgiag stalgiag merged commit e6b7382 into processing:main Mar 9, 2021
@allcontributors
Copy link
Contributor

@stalgiag

I've put up a pull request to add @Aloneduckling! 🎉

@Aloneduckling
Copy link
Contributor Author

@stalgiag, Sorry to disturb you again, I just wanted to know that how much time does it take for the online reference manual to get updated. I was asking because I have created this PR and the website doesn't seem to be updated. This is the page for reference.

@ffd8
Copy link
Contributor

ffd8 commented Apr 23, 2021

@Aloneduckling @stalgiag – just hit a hiccup while loading the latest data.json refs into P5LIVE.. went searching and found out – the documentation examples for both centerY and centerZ are missing their </code></div> tag at the end...

The effects can be seen on website refs: centerY + centerZ

@Aloneduckling
Copy link
Contributor Author

@ffd8, my bad, thank you for pointing this mistake. Reverting this PR might create problems for other people contributing to this repo so I will open a new issue and fix this. Again thank you @ffd8 for pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentation for p5.Camera properties
3 participants