Getting Started
Threlte Studio is a spatial programming toolset.
It consists of two main parts: A GUI to inspect and edit your scene and a vite plugin to sync the changes in real-time to your code. It is made to be extendable, so you can create your own custom components to interact with your scene and hook into the Threlte Studio API and GUI.
Installation
Section titled “Installation”npm install @threlte/studioQuick Start
Section titled “Quick Start”To get started, encapsulate your whole scene in the <Studio> component.
<script lang="ts"> import { Canvas } from '@threlte/core' import { Studio } from '@threlte/studio' import Scene from './Scene.svelte'</script>
<Canvas> <Studio> <Scene /> </Studio></Canvas>To use auto-sync, in your vite config, insert the Threlte Studio vite plugin before any other plugin.
import { sveltekit } from '@sveltejs/kit/vite'import { threlteStudio } from '@threlte/studio/vite'
export default { plugins: [threlteStudio(), sveltekit()]}Tips and Tricks
Section titled “Tips and Tricks”Hiding from the hierarchy tree
Section titled “Hiding from the hierarchy tree”To hide items from showing in the scene hierarchy pane, add hideInTree to
your object’s userData.
<T.Mesh userData={{ hideInTree: true }} />Selectable objects
Section titled “Selectable objects”Scene objects are selectable by default. If you add selectable to your
objects userData and set it to false that object wont be selectable.
<T.Mesh userData={{ selectable: false }} />