2021-06-18 13:05:06 +02:00
|
|
|
import React from 'react'
|
|
|
|
import {render} from 'react-dom'
|
|
|
|
import Editor from './components/Editor'
|
|
|
|
|
|
|
|
export {default as EditorHelper} from './components/EditorHelper'
|
|
|
|
export type {EditorHelperProps} from './components/EditorHelper'
|
|
|
|
|
|
|
|
export {default as editable} from './components/editable'
|
2021-06-29 15:39:47 +02:00
|
|
|
export {bindToCanvas} from './store'
|
2021-06-18 13:05:06 +02:00
|
|
|
export type {EditableState, BindFunction} from './store'
|
2021-07-13 16:13:15 +02:00
|
|
|
import studio from '@theatre/studio'
|
|
|
|
import Toolbar from './components/Toolbar/Toolbar'
|
2021-06-18 13:05:06 +02:00
|
|
|
|
|
|
|
if (process.env.NODE_ENV === 'development') {
|
2021-07-13 16:13:15 +02:00
|
|
|
studio.extend({
|
|
|
|
id: '@theatre/plugin-r3f',
|
|
|
|
globalToolbar: {
|
|
|
|
component: Toolbar,
|
|
|
|
},
|
|
|
|
})
|
2021-06-18 13:05:06 +02:00
|
|
|
const editorRoot = document.createElement('div')
|
|
|
|
document.body.appendChild(editorRoot)
|
|
|
|
|
|
|
|
render(<Editor />, editorRoot)
|
|
|
|
}
|