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

Fixed example broken by #6216 and added information for new camera default setting #6620

Merged
merged 10 commits into from
Dec 15, 2023
Merged

Fixed example broken by #6216 and added information for new camera default setting #6620

merged 10 commits into from
Dec 15, 2023

Conversation

inaridarkfox4231
Copy link
Contributor

@inaridarkfox4231 inaridarkfox4231 commented Dec 10, 2023

Due to #6216, many reference examples related to cameras were broken. The purpose is to restore it to its original state.

Resolves #6611

Changes: many.

Screenshots of the change:

before

かめら1

function setup() {
  createCanvas(100, 100, WEBGL);
  perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));
  describe('a square moving closer and then away from the camera.');
}
function draw() {
  background(204);
  //move the camera away from the plane by a sin wave
  camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);
  plane(10, 10);
}

after

かめら2

PR Checklist

Restore camera settings according to 100x100
Restore camera settings according to 100x100
Regarding the setCamera() example, the transition was not clean, so I modified the code.
It looks like a parallel projection, so I'll fix it.
The way I set the background was sloppy, so I fixed it.
camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);
perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));
add information about new 80,800,8000 camera default system.
fix indent
@inaridarkfox4231 inaridarkfox4231 changed the title Fixed example broken by #6216 and added information for 80,800,8000 camera default setting Fixed example broken by #6216 and added information for new camera default setting Dec 11, 2023
The image() function uses push() to pop() internally, so the processing is duplicated and it's not pretty. Also, since it may be affected by imageMode(), I thought this would be better.
add noLights()
@inaridarkfox4231
Copy link
Contributor Author

Please leave a review.

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.

Thanks for combing through all the examples!

@davepagurek davepagurek merged commit a1748ee into processing:main Dec 15, 2023
2 checks passed
@inaridarkfox4231 inaridarkfox4231 deleted the fix-the-camera-reference-bug branch December 15, 2023 22:56
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.

Due to #6216, some of the reference examples related to cameras are broken.
2 participants