From 5f01ef082124074f97fe4c043679b98dbed097e2 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Wed, 2 Mar 2022 23:13:31 +0100 Subject: [PATCH] Fix the structure of the r3f playground --- packages/playground/src/shared/r3f-rocket/App.tsx | 11 +---------- packages/playground/src/shared/r3f-rocket/index.tsx | 5 +++++ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/playground/src/shared/r3f-rocket/App.tsx b/packages/playground/src/shared/r3f-rocket/App.tsx index 74485b5..8a6420c 100644 --- a/packages/playground/src/shared/r3f-rocket/App.tsx +++ b/packages/playground/src/shared/r3f-rocket/App.tsx @@ -1,19 +1,10 @@ -import { - editable as e, - RefreshSnapshot, - SheetProvider, - extension, -} from '@theatre/r3f' +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} from '@react-three/drei' import sceneGLB from './scene.glb' -import studio from '@theatre/studio' - -studio.extend(extension) -studio.initialize() document.body.style.backgroundColor = '#171717' diff --git a/packages/playground/src/shared/r3f-rocket/index.tsx b/packages/playground/src/shared/r3f-rocket/index.tsx index b3d0515..825370d 100644 --- a/packages/playground/src/shared/r3f-rocket/index.tsx +++ b/packages/playground/src/shared/r3f-rocket/index.tsx @@ -1,5 +1,10 @@ import React from 'react' import ReactDOM from 'react-dom' import App from './App' +import studio from '@theatre/studio' +import {extension} from '@theatre/r3f' + +studio.extend(extension) +studio.initialize() ReactDOM.render(, document.getElementById('root'))