Fix the structure of the r3f playground
This commit is contained in:
parent
53c3302cab
commit
5f01ef0821
2 changed files with 6 additions and 10 deletions
|
@ -1,19 +1,10 @@
|
||||||
import {
|
import {editable as e, RefreshSnapshot, SheetProvider} from '@theatre/r3f'
|
||||||
editable as e,
|
|
||||||
RefreshSnapshot,
|
|
||||||
SheetProvider,
|
|
||||||
extension,
|
|
||||||
} from '@theatre/r3f'
|
|
||||||
import {OrbitControls, Stars} from '@react-three/drei'
|
import {OrbitControls, Stars} from '@react-three/drei'
|
||||||
import {getProject} from '@theatre/core'
|
import {getProject} from '@theatre/core'
|
||||||
import React, {Suspense, useState} from 'react'
|
import React, {Suspense, useState} from 'react'
|
||||||
import {Canvas} from '@react-three/fiber'
|
import {Canvas} from '@react-three/fiber'
|
||||||
import {useGLTF} from '@react-three/drei'
|
import {useGLTF} from '@react-three/drei'
|
||||||
import sceneGLB from './scene.glb'
|
import sceneGLB from './scene.glb'
|
||||||
import studio from '@theatre/studio'
|
|
||||||
|
|
||||||
studio.extend(extension)
|
|
||||||
studio.initialize()
|
|
||||||
|
|
||||||
document.body.style.backgroundColor = '#171717'
|
document.body.style.backgroundColor = '#171717'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import App from './App'
|
import App from './App'
|
||||||
|
import studio from '@theatre/studio'
|
||||||
|
import {extension} from '@theatre/r3f'
|
||||||
|
|
||||||
|
studio.extend(extension)
|
||||||
|
studio.initialize()
|
||||||
|
|
||||||
ReactDOM.render(<App />, document.getElementById('root'))
|
ReactDOM.render(<App />, document.getElementById('root'))
|
||||||
|
|
Loading…
Reference in a new issue