feat: add readme
This commit is contained in:
parent
f0ccbf808e
commit
d82b798897
@ -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}
|
||||
<T.Mesh geometry={geo}>
|
||||
<T.MeshStandardMaterial
|
||||
color="green"
|
||||
depthTest={true}
|
||||
wireframe={$AppSettings.wireframe}
|
||||
/>
|
||||
</T.Mesh>
|
||||
{#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}
|
||||
|
@ -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
BIN
app/static/matcap_green.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
@ -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 {
|
||||
|
0
packages/utils/src/geometry/stem.rs
Normal file
0
packages/utils/src/geometry/stem.rs
Normal file
Loading…
Reference in New Issue
Block a user