Skip to content

Conversation

@tomhsiao1260
Copy link
Contributor

I think it's better to use ES6 const syntax instead of var in this case. So I send a PR for this example.

Comment on lines -49 to -50
this.maskBufferMaterial = new MeshBasicMaterial( { color: 0xffffff } );
this.maskBufferMaterial.side = DoubleSide;
Copy link
Owner

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? 🤔

Copy link
Contributor Author

@tomhsiao1260 tomhsiao1260 Jan 21, 2022

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.

Copy link
Owner

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.

Copy link
Contributor Author

@tomhsiao1260 tomhsiao1260 Jan 21, 2022

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

@mrdoob mrdoob changed the title change var to const OutlinePass: change var to const Jan 21, 2022
DoubleSide,
LinearFilter,
Matrix4,
MeshBasicMaterial,
Copy link
Contributor Author

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.

@mrdoob mrdoob added this to the r137 milestone Jan 21, 2022
@mrdoob mrdoob merged commit 08f0972 into mrdoob:dev Jan 21, 2022
@mrdoob
Copy link
Owner

mrdoob commented Jan 21, 2022

Thanks!

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.

3 participants