feat: add rotate node
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m54s

This commit is contained in:
2024-05-02 03:37:30 +02:00
parent e2b18370f1
commit 5fe0c8a795
18 changed files with 294 additions and 38 deletions

View File

@ -10,6 +10,21 @@
export let input: NodeInput;
export let value: any;
export let id: string;
$: if (value === undefined || value === null) {
switch (input.type) {
case 'float':
value = 0;
case 'integer':
value = 0;
case 'boolean':
value = false;
case 'select':
value = 0;
case 'vec3':
value = [0, 0, 0];
}
}
</script>
{#if input.type === 'float'}

View File

@ -1,7 +1,7 @@
<script lang="ts">
let {
onchange,
value = $bindable(),
value = $bindable(0),
id,
step = 0.01,
min = 0,
@ -57,8 +57,6 @@
function handleMouseDown(ev: MouseEvent) {
ev.preventDefault();
inputEl.focus();
isMouseDown = true;
downV = value;

View File

@ -3,7 +3,7 @@
min = 0,
max = 10,
step = 1,
value = $bindable(),
value = $bindable(0),
id,
onchange
}: {

View File

@ -1,7 +1,7 @@
<script lang="ts">
let {
id,
value = $bindable(),
value = $bindable(0),
options
}: { id: string; value: number; options: string[] } = $props();
</script>

View File

@ -1,7 +1,7 @@
<script lang="ts">
import Float from './Float.svelte';
let { value = $bindable(), id }: { value: number[]; id: string } = $props();
let { value = $bindable([0, 0, 0]), id }: { value: number[]; id: string } = $props();
</script>
<div>