experiment with material clipping planes

This commit is contained in:
Stewart Allen 2022-04-27 17:56:07 -04:00
commit 3af830afe6
4 changed files with 99 additions and 2 deletions

View file

@ -1231,6 +1231,7 @@ gapp.register("moto.space", [], (root, exports) => {
preserveDrawingBuffer: true,
logarithmicDepthBuffer: true
});
renderer.localClippingEnabled = true;
camera = ortho ?
new THREE.OrthographicCamera(-100 * aspect(), 100 * aspect(), 100, -100, 0.1, 100000) :
new THREE.PerspectiveCamera(perspective, aspect(), 0.1, 100000);