tamani-coding / threejs-stencil-buffer-example

threejs-clipping-stencil-example
MIT License
14 stars 6 forks source link

Updated threejs to r163, added explicit stencil: true value in renderer params #2

Open codewithfeeling opened 5 months ago

codewithfeeling commented 5 months ago

This updates the version of threejs to the latest as of 12th April 2024 - r163, and fixes an issue where the previous code would only render a black cube. I fixed it by providing an explicit stencil: true value to the renderer parameters.

The lighting is a bit different now as a result of other changes since r148, but it's preferable to it not working.