-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Camera: Make reversedDepth
read-only.
#31512
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
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
camera.reversedDepth
private
Fix JSDoc.
I would only vote against this change if we planned to use this property in external components with |
I think we can still do that. But if |
Maybe because I come from C# too, but accessing private variables in external components doesn't seem to make much sense to me, could this just be documented? |
Maybe we can document it as a "volatile" value that is defined by the renderer. Alternatively, use |
That sounds good to me. |
30a38c6
to
7e30989
Compare
camera.reversedDepth
privatereversedDepth
read-only.
get reversedDepth() { | ||
|
||
return this._reversedDepth; | ||
|
||
} |
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.
Is this needed?
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.
see #31512 (comment).
This should be read-only for users, and set only by the renderer.
As suggested here and here -- so it must be a good idea. ;-)