feat: add rotate node
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m54s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m54s
This commit is contained in:
@ -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'}
|
||||
|
@ -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;
|
||||
|
@ -3,7 +3,7 @@
|
||||
min = 0,
|
||||
max = 10,
|
||||
step = 1,
|
||||
value = $bindable(),
|
||||
value = $bindable(0),
|
||||
id,
|
||||
onchange
|
||||
}: {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
let {
|
||||
id,
|
||||
value = $bindable(),
|
||||
value = $bindable(0),
|
||||
options
|
||||
}: { id: string; value: number; options: string[] } = $props();
|
||||
</script>
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user