Fixed runtime of examples/r3f-cra
This commit is contained in:
parent
e14ba296f2
commit
e73c7f778e
1 changed files with 7 additions and 3 deletions
|
@ -4,7 +4,11 @@ import {useState, useEffect, useRef} from 'react'
|
||||||
import {useFrame, Canvas} from '@react-three/fiber'
|
import {useFrame, Canvas} from '@react-three/fiber'
|
||||||
import {Shadow, softShadows} from '@react-three/drei'
|
import {Shadow, softShadows} from '@react-three/drei'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {editable as e, Wrapper} from '@theatre/r3f'
|
import {editable as e, SheetProvider, extension} from '@theatre/r3f'
|
||||||
|
import studio from '@theatre/studio'
|
||||||
|
|
||||||
|
studio.extend(extension)
|
||||||
|
studio.initialize()
|
||||||
|
|
||||||
// Soft shadows are expensive, comment and refresh when it's too slow
|
// Soft shadows are expensive, comment and refresh when it's too slow
|
||||||
softShadows()
|
softShadows()
|
||||||
|
@ -85,7 +89,7 @@ function App() {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
shadowMap
|
shadowMap
|
||||||
>
|
>
|
||||||
<Wrapper
|
<SheetProvider
|
||||||
getSheet={() => getProject('Playground - R3F').sheet('R3F-Canvas')}
|
getSheet={() => getProject('Playground - R3F').sheet('R3F-Canvas')}
|
||||||
>
|
>
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
|
@ -135,7 +139,7 @@ function App() {
|
||||||
/>
|
/>
|
||||||
</group>
|
</group>
|
||||||
<Button />
|
<Button />
|
||||||
</Wrapper>
|
</SheetProvider>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue