feat: implement branch node (almost finsihed)

This commit is contained in:
2024-04-24 22:16:15 +02:00
parent 4db1cc7d4f
commit 2de2560a57
35 changed files with 396 additions and 338 deletions

View File

@ -7,7 +7,6 @@
useTexture,
} from "@threlte/extras";
import {
Texture,
type BufferGeometry,
type PerspectiveCamera,
type Vector3,
@ -16,7 +15,6 @@
import { OrbitControls } from "@threlte/extras";
import { AppSettings } from "../settings/app-settings";
import localStore from "$lib/helpers/localStore";
import { Inspector } from "three-inspect";
export let geometries: BufferGeometry[];
export let lines: Vector3[][];
@ -89,13 +87,9 @@
{/if}
{#await matcap then value}
<T.Mesh geometry={geo}>
<T.MeshMatcapMaterial matcap={value} />
<T.MeshMatcapMaterial matcap={value} wireframe={$AppSettings.wireframe} />
{#if false}
<T.MeshStandardMaterial
color="green"
depthTest={true}
wireframe={$AppSettings.wireframe}
/>
<T.MeshStandardMaterial color="green" depthTest={true} />
{/if}
</T.Mesh>
{/await}

View File

@ -64,11 +64,17 @@
</script>
{#if node}
{#if nodeDefinition && store && Object.keys(nodeDefinition).length > 0}
<NestedSettings id="activeNodeSettings" settings={nodeDefinition} {store} />
{:else}
<p class="mx-4">Active Node has no Settings</p>
{/if}
{#key node.id}
{#if nodeDefinition && store && Object.keys(nodeDefinition).length > 0}
<NestedSettings
id="activeNodeSettings"
settings={nodeDefinition}
{store}
/>
{:else}
<p class="mx-4">Active Node has no Settings</p>
{/if}
{/key}
{:else}
<p class="mx-4">No active node</p>
{/if}