feat: implement debug node
All checks were successful
🚀 Lint & Test & Deploy / release (pull_request) Successful in 3m53s
All checks were successful
🚀 Lint & Test & Deploy / release (pull_request) Successful in 3m53s
Closes #39
This commit is contained in:
19
app/src/lib/result-viewer/Debug.svelte
Normal file
19
app/src/lib/result-viewer/Debug.svelte
Normal file
@@ -0,0 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { T } from '@threlte/core';
|
||||
import type { Group } from 'three';
|
||||
import { updateDebugScene } from './debug';
|
||||
|
||||
type Props = {
|
||||
debugData?: Record<number, { type: string; data: Int32Array }>;
|
||||
};
|
||||
|
||||
let group = $state<Group>(null!);
|
||||
const { debugData }: Props = $props();
|
||||
|
||||
$effect(() => {
|
||||
if (!group || !debugData) return;
|
||||
updateDebugScene(group, $state.snapshot(debugData));
|
||||
});
|
||||
</script>
|
||||
|
||||
<T.Group bind:ref={group} />
|
||||
Reference in New Issue
Block a user