Implemented useRefreshSnapshot() and <RefreshSnapshot />

This commit is contained in:
Aria Minaei 2021-08-08 22:38:03 +02:00
parent d1fb0300e0
commit e6a4f3ae3f
4 changed files with 42 additions and 1 deletions

View file

@ -1,4 +1,4 @@
import {editable as e, Wrapper} from '@theatre/plugin-r3f'
import {editable as e, RefreshSnapshot, Wrapper} from '@theatre/plugin-r3f'
import {OrbitControls, Stars} from '@react-three/drei'
import {getProject} from '@theatre/core'
import React, {Suspense} from 'react'
@ -80,6 +80,7 @@ function App() {
/>
</e.perspectiveCamera>
<Suspense fallback={null}>
<RefreshSnapshot />
<Model url={sceneGLB} />
</Suspense>
<OrbitControls