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

Improved the example code for createCamera()! #5873

Merged
merged 8 commits into from
Dec 4, 2022
Merged

Improved the example code for createCamera()! #5873

merged 8 commits into from
Dec 4, 2022

Conversation

Brahvim
Copy link
Contributor

@Brahvim Brahvim commented Nov 27, 2022

Improved the example code for createCamera()! There is now a 'ground box' to help any new-to-OpenGL person viewing the scene understand what the camera is doing - moving on the x-axis while also rotating on the y-axis to look directly at [0, 0, 0].

@welcome
Copy link

welcome bot commented Nov 27, 2022

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

@davepagurek
Copy link
Contributor

Thanks for adding comments to the example! I tested it out and noticed that the ground box is leaving trails behind:
image

This was probably happening earlier too but it was hidden because the small cube never moves by so much each frame to make the white part visible from behind its black outlines.

Would you mind also moving the background(0) call from setup to draw? I think that's all we need in order to fix that.

@Brahvim
Copy link
Contributor Author

Brahvim commented Nov 30, 2022

Whoops! Sorry, forgot to commit that in the pull request.
Added it in this commit!

Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

src/webgl/p5.Camera.js Outdated Show resolved Hide resolved
@Brahvim
Copy link
Contributor Author

Brahvim commented Dec 3, 2022

I accidentally ran a code format on my local copy, and "Linting fix number 2." should fix that. I copy-pasted a previous version of the file and re-did the whitespace removal. Let's see how this goes...

@davepagurek
Copy link
Contributor

ah hmm it looks like the most recent change indented everything by a space so now the whole file appears in the diff. It might be that the easiest fix might be to revert the last two commits and try removing the spaces again? sorry for all the formatting back-and-forth, I can also try getting the formatting back to what it needs to be if that's easier!

@Brahvim
Copy link
Contributor Author

Brahvim commented Dec 4, 2022

I apologize! I tried doing a similar thing earlier (copy-pasting a previous version, making changes and uploading that, as seen in "Linting fix number 2."). Clearly, that did not work.

Your help would very-much be appreciated.

@davepagurek
Copy link
Contributor

No problem 🙂

@davepagurek davepagurek merged commit d101923 into processing:main Dec 4, 2022
@davepagurek
Copy link
Contributor

@all-contributors please add @Brahvim for doc

@allcontributors
Copy link
Contributor

@davepagurek

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

@Brahvim
Copy link
Contributor Author

Brahvim commented Dec 4, 2022

Gratitudes from my side - thank you a lot, @davepagurek!

@Brahvim Brahvim deleted the create-camera-eg-improvements branch December 4, 2022 14:48
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.

2 participants