feat: functioning ring finding

This commit is contained in:
2024-03-11 18:48:43 +01:00
parent dcedfadd3f
commit 58199b0bd7
6 changed files with 72 additions and 35 deletions

View File

@@ -99,11 +99,12 @@
{#each $layers as { geometry, type }, i}
{@const visible = showSlices >= i / $layers.length}
{@const color = new Color(0, i / $layers.length, 0.2)}
{@const color = new Color(Math.random() * 0xffffff)}
<!---{@const color = new Color(0, i / $layers.length, 0.2)}-->
{#if type === LayerType.Line}
<T.LineSegments {geometry} {visible}>
<T.Line {geometry} {visible}>
<T.LineBasicMaterial {color} />
</T.LineSegments>
</T.Line>
{:else if type === LayerType.Surface}
<T.Mesh {geometry} {visible}>
<T.MeshMatcapMaterial {color} side={DoubleSide} />