feat: add readme

This commit is contained in:
max_richter 2024-04-24 02:01:20 +02:00
parent f0ccbf808e
commit d82b798897
6 changed files with 35 additions and 11 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
Nodarium
Info tbd.

View File

@ -1,7 +1,17 @@
<script lang="ts">
import { T } from "@threlte/core";
import { MeshLineGeometry, MeshLineMaterial, Text } from "@threlte/extras";
import type { BufferGeometry, PerspectiveCamera, Vector3 } from "three";
import {
MeshLineGeometry,
MeshLineMaterial,
Text,
useTexture,
} from "@threlte/extras";
import {
Texture,
type BufferGeometry,
type PerspectiveCamera,
type Vector3,
} from "three";
import type { OrbitControls as OrbitControlsType } from "three/addons/controls/OrbitControls.js";
import { OrbitControls } from "@threlte/extras";
import { AppSettings } from "../settings/app-settings";
@ -14,6 +24,8 @@
export let camera: PerspectiveCamera;
export let controls: OrbitControlsType;
const matcap = useTexture("/matcap_green.jpg");
const cameraTransform = localStore<{ camera: number[]; target: number[] }>(
"nodes.camera.transform",
{
@ -58,7 +70,7 @@
</T.PerspectiveCamera>
<T.DirectionalLight position={[0, 10, 10]} />
<T.AmbientLight intensity={0.5} />
<T.AmbientLight intensity={2} />
{#each geometries as geo}
{#if $AppSettings.showIndices}
@ -75,13 +87,18 @@
<T.PointsMaterial size={0.25} />
</T.Points>
{/if}
{#await matcap then value}
<T.Mesh geometry={geo}>
<T.MeshMatcapMaterial matcap={value} />
{#if false}
<T.MeshStandardMaterial
color="green"
depthTest={true}
wireframe={$AppSettings.wireframe}
/>
{/if}
</T.Mesh>
{/await}
{/each}
{#if $AppSettings.showStemLines && lines}

View File

@ -7,6 +7,9 @@ export const AppSettings = localStore("node-settings", {
snapToGrid: true,
wireframes: false,
showIndices: false,
showVertices: false,
centerCamera: true,
showStemLines: false,
});
const themes = ["dark", "light", "catppuccin", "solarized", "high-contrast", "nord", "dracula"];

BIN
app/static/matcap_green.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -127,7 +127,7 @@ body.theme-nord {
--layer-3: #5E81AC;
--active: #8999bd;
--selected: #b76c3f;
--connection: #232731;
--connection: #4C566A;
}
body.theme-dracula {
@ -137,6 +137,7 @@ body.theme-dracula {
--layer-1: #44475A;
--layer-2: #32374D;
--layer-3: #BD93F9;
--connection: #6272A4;
}
body {

View File