theatre/packages/plugin-r3f/src/setupPlugin.ts
Aria Minaei 1497eaf610 WIP: Getting r3f to work with create-react-app
* Temporarily disabled ESM bundles because the current setup confuses webpack4 (but not parceljs). Since create-react-app uses webpack4, not doing this would make theatre incompatible with CRA.
2021-08-07 21:41:07 +02:00

22 lines
520 B
TypeScript

import SnapshotEditor from './components/SnapshotEditor'
import studio from '@theatre/studio'
import Toolbar from './components/Toolbar/Toolbar'
import {types} from '@theatre/core'
export default function setupPlugin() {
studio.extend({
id: '@theatre/plugin-r3f',
globalToolbar: {
component: Toolbar,
},
panes: [
{
class: 'snapshotEditor',
dataType: types.compound({
grosse: types.number(20),
}),
component: SnapshotEditor,
},
],
})
}