This commit is contained in:
parent
6116523091
commit
c3001cd858
@ -20,11 +20,6 @@ kotlin {
|
||||
withJava()
|
||||
}
|
||||
}
|
||||
|
||||
js {
|
||||
useCommonJs()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
|
@ -31,7 +31,7 @@ import react.dom.h1
|
||||
import styled.css
|
||||
import kotlin.math.PI
|
||||
|
||||
interface GDMLAppProps : RProps {
|
||||
external interface GDMLAppProps : RProps {
|
||||
var context: Context
|
||||
var rootObject: Vision?
|
||||
var selected: Name?
|
||||
|
@ -31,10 +31,6 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
js {
|
||||
useCommonJs()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
|
@ -25,7 +25,7 @@ import react.RProps
|
||||
import react.dom.*
|
||||
import kotlin.math.PI
|
||||
|
||||
interface MMAppProps : RProps {
|
||||
external interface MMAppProps : RProps {
|
||||
var model: Model
|
||||
var context: Context
|
||||
var connection: HttpClient
|
||||
@ -40,6 +40,7 @@ private val canvasConfig = Canvas3DOptions {
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
val MMApp = component<MMAppProps> { props ->
|
||||
var selected by state { props.selected }
|
||||
var canvas: ThreeCanvas? by state { null }
|
||||
|
@ -14,7 +14,7 @@ import react.*
|
||||
import react.dom.render
|
||||
import styled.*
|
||||
|
||||
interface ConfigEditorItemProps : RProps {
|
||||
public external interface ConfigEditorItemProps : RProps {
|
||||
|
||||
/**
|
||||
* Root config object - always non null
|
||||
@ -190,7 +190,7 @@ private fun RFBuilder.configEditorItem(props: ConfigEditorItemProps) {
|
||||
}
|
||||
}
|
||||
|
||||
interface ConfigEditorProps : RProps {
|
||||
public external interface ConfigEditorProps : RProps {
|
||||
var id: Name
|
||||
var root: Config
|
||||
var default: Meta?
|
||||
|
@ -17,7 +17,7 @@ import react.*
|
||||
import react.dom.a
|
||||
import styled.*
|
||||
|
||||
interface MetaViewerProps : RProps {
|
||||
public external interface MetaViewerProps : RProps {
|
||||
/**
|
||||
* Root meta
|
||||
*/
|
||||
@ -136,6 +136,7 @@ private fun RFBuilder.metaViewerItem(props: MetaViewerProps) {
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
val MetaViewer = component<MetaViewerProps> { props ->
|
||||
child(MetaViewerItem) {
|
||||
attrs {
|
||||
|
@ -12,7 +12,7 @@ import org.w3c.dom.events.Event
|
||||
import react.*
|
||||
import styled.*
|
||||
|
||||
interface ObjectTreeProps : RProps {
|
||||
public external interface ObjectTreeProps : RProps {
|
||||
var name: Name
|
||||
var selected: Name?
|
||||
var obj: Vision
|
||||
@ -102,6 +102,7 @@ private fun RFBuilder.objectTree(props: ObjectTreeProps): Unit {
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
val ObjectTree: FunctionalComponent<ObjectTreeProps> = component { props ->
|
||||
objectTree(props)
|
||||
}
|
||||
|
@ -19,16 +19,17 @@ import react.dom.option
|
||||
import styled.styledInput
|
||||
import styled.styledSelect
|
||||
|
||||
interface ValueChooserProps : RProps {
|
||||
public external interface ValueChooserProps : RProps {
|
||||
var item: MetaItem<*>?
|
||||
var descriptor: ValueDescriptor?
|
||||
var valueChanged: ((Value?) -> Unit)?
|
||||
}
|
||||
|
||||
interface ValueChooserState : RState {
|
||||
public external interface ValueChooserState : RState {
|
||||
var rawInput: Boolean?
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class ValueChooserComponent(props: ValueChooserProps) : RComponent<ValueChooserProps, ValueChooserState>(props) {
|
||||
private val element = createRef<HTMLElement>()
|
||||
|
||||
|
@ -13,7 +13,7 @@ import react.RState
|
||||
import react.dom.div
|
||||
import react.dom.findDOMNode
|
||||
|
||||
interface ThreeCanvasProps : RProps {
|
||||
public external interface ThreeCanvasProps : RProps {
|
||||
var context: Context
|
||||
var obj: Solid
|
||||
var options: Canvas3DOptions?
|
||||
@ -22,11 +22,12 @@ interface ThreeCanvasProps : RProps {
|
||||
var canvasCallback: ((ThreeCanvas?) -> Unit)?
|
||||
}
|
||||
|
||||
interface ThreeCanvasState : RState {
|
||||
public external interface ThreeCanvasState : RState {
|
||||
var element: Element?
|
||||
// var canvas: ThreeCanvas?
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class ThreeCanvasComponent : RComponent<ThreeCanvasProps, ThreeCanvasState>() {
|
||||
|
||||
private var canvas: ThreeCanvas? = null
|
||||
|
Loading…
Reference in New Issue
Block a user