Add clipping planes to topography

This commit is contained in:
Fuhrmann 2025-04-08 09:17:40 +02:00
parent 961c2f79cc
commit 618979ad52
6 changed files with 65 additions and 291 deletions

View file

@ -1,6 +1,7 @@
import {
BufferAttribute,
BufferGeometry,
Color,
DoubleSide,
EdgesGeometry,
Group,
@ -649,8 +650,13 @@ function generateCapMeshes(
? 1
: -1;
const color =
mesh.material instanceof MeshStandardMaterial
? mesh.material.color
: new Color(1, 1, 1);
const material = new MeshStandardMaterial({
color: (mesh.material as MeshStandardMaterial).color,
color,
side: DoubleSide,
metalness: 0.0,
roughness: 1.0,