-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
OutlinePass: change var to const #23294
Conversation
this.maskBufferMaterial = new MeshBasicMaterial( { color: 0xffffff } ); | ||
this.maskBufferMaterial.side = DoubleSide; |
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.
How come you removed these? 🤔
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.maskBufferMaterial
is unused in this example which makes me confused for a while. So in my opinion, I think it's more reasonable to remove it.
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.
Any idea of why that code was there to begin with?
You can look at the commit history to investigate.
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.
I've checked the history and found it begin with the initial commit and this.maskBufferMaterial
is also unused in the initial version.
Here's the link: 9e6f430#diff-9b3033a5e289a75f2da1383ac047c096c8737a31f3d70ccdeebd2b6d2faf3dcdR48
@@ -4,7 +4,6 @@ import { | |||
DoubleSide, | |||
LinearFilter, | |||
Matrix4, | |||
MeshBasicMaterial, |
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.
Since this.maskBufferMaterial
is removed, we don't need to import MeshBasicMaterial. So I remove it as well.
Thanks! |
I think it's better to use ES6
const
syntax instead ofvar
in this case. So I send a PR for this example.