-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Small improvement and color fix for CameraHelper.js #30042
base: master
Are you sure you want to change the base?
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@@ -132,14 +132,14 @@ class CameraHelper extends LineSegments { | |||
|
|||
const colorAttribute = geometry.getAttribute( 'color' ); | |||
|
|||
// near | |||
// far |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change does not look correct to me. If you comment out the four lines below, you will see that the near lines won't receive a color.
@@ -169,7 +169,7 @@ class CameraHelper extends LineSegments { | |||
// target | |||
|
|||
colorAttribute.setXYZ( 38, target.r, target.g, target.b ); colorAttribute.setXYZ( 39, target.r, target.g, target.b ); // c, t | |||
colorAttribute.setXYZ( 40, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 41, cross.r, cross.g, cross.b ); // p, c | |||
colorAttribute.setXYZ( 40, target.r, target.g, target.b ); colorAttribute.setXYZ( 41, target.r, target.g, target.b ); // p, c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the line from the light position to the center of the far plane is a different color outside the frustum than it is inside the frustum.
I am not sure there is a compelling reason to change it.
Related issue: -
Description
Fixed comments and wrong color references.