import {editable as e, RefreshSnapshot, SheetProvider} from '@theatre/r3f' import {OrbitControls, Stars} from '@react-three/drei' import {getProject} from '@theatre/core' import React, {Suspense, useState} from 'react' import {Canvas} from '@react-three/fiber' import {useGLTF, PerspectiveCamera} from '@react-three/drei' import sceneGLB from './scene.glb' document.body.style.backgroundColor = '#171717' const EditableCamera = e(PerspectiveCamera, 'perspectiveCamera') function Model({url}: {url: string}) { const {nodes} = useGLTF(url) as any return ( ) } function App() { const bgs = ['#272730', '#b7c5d1'] const [bgIndex, setBgIndex] = useState(0) const bg = bgs[bgIndex] return (
{ // return setBgIndex((bgIndex) => (bgIndex + 1) % bgs.length) }} style={{ height: '100vh', }} > getProject('Space').sheet('Scene')}>
) } export default App