v0.2.0-dev-22 #47

Merged
altavir merged 158 commits from dev into master 2021-07-17 11:04:22 +03:00
193 changed files with 31 additions and 22 deletions
Showing only changes of commit e44096e844 - Show all commits

View File

@ -7,6 +7,9 @@
### Changed ### Changed
- Vision does not implement ItemProvider anymore. Property changes are done via `getProperty`/`setProperty` and `property` delegate. - Vision does not implement ItemProvider anymore. Property changes are done via `getProperty`/`setProperty` and `property` delegate.
- Point3D and Point2D are made separate classes instead of expect/actual (to split up different engines.
- JavaFX support moved to a separate module
- Threejs support moved to a separate module
### Deprecated ### Deprecated

View File

@ -2,7 +2,7 @@ plugins {
id("ru.mipt.npm.project") id("ru.mipt.npm.project")
} }
val dataforgeVersion by extra("0.2.0-dev-7") val dataforgeVersion by extra("0.2.0-dev-8")
val ktorVersion by extra("1.4.2") val ktorVersion by extra("1.4.2")
val htmlVersion by extra("0.7.2") val htmlVersion by extra("0.7.2")
val kotlinWrappersVersion by extra("pre.129-kotlin-1.4.10") val kotlinWrappersVersion by extra("pre.129-kotlin-1.4.10")
@ -27,11 +27,6 @@ subprojects {
if(name.startsWith("visionforge")) { if(name.startsWith("visionforge")) {
apply<ru.mipt.npm.gradle.KSciencePublishPlugin>() apply<ru.mipt.npm.gradle.KSciencePublishPlugin>()
} }
afterEvaluate {
extensions.findByType<ru.mipt.npm.gradle.KScienceExtension>()?.run {
useSerialization()
}
}
} }
apiValidation { apiValidation {

View File

@ -32,6 +32,7 @@ kotlin {
jsMain { jsMain {
dependencies { dependencies {
implementation(project(":ui:bootstrap")) implementation(project(":ui:bootstrap"))
implementation(project(":visionforge-threejs"))
implementation(npm("react-file-drop", "3.0.6")) implementation(npm("react-file-drop", "3.0.6"))
} }
} }

View File

@ -1,7 +1,6 @@
package hep.dataforge.vision.gdml.demo package hep.dataforge.vision.gdml.demo
import hep.dataforge.context.Context import hep.dataforge.context.Context
import hep.dataforge.meta.invoke
import hep.dataforge.names.Name import hep.dataforge.names.Name
import hep.dataforge.vision.Vision import hep.dataforge.vision.Vision
import hep.dataforge.vision.bootstrap.nameCrumbs import hep.dataforge.vision.bootstrap.nameCrumbs

View File

@ -49,6 +49,7 @@ kotlin {
implementation(project(":ui:bootstrap")) implementation(project(":ui:bootstrap"))
implementation("io.ktor:ktor-client-js:$ktorVersion") implementation("io.ktor:ktor-client-js:$ktorVersion")
implementation("io.ktor:ktor-client-serialization:$ktorVersion") implementation("io.ktor:ktor-client-serialization:$ktorVersion")
implementation(project(":visionforge-threejs"))
} }
} }
} }

View File

@ -1,7 +1,6 @@
package ru.mipt.npm.muon.monitor package ru.mipt.npm.muon.monitor
import hep.dataforge.context.Context import hep.dataforge.context.Context
import hep.dataforge.meta.invoke
import hep.dataforge.names.Name import hep.dataforge.names.Name
import hep.dataforge.names.NameToken import hep.dataforge.names.NameToken
import hep.dataforge.names.isEmpty import hep.dataforge.names.isEmpty

View File

@ -17,7 +17,7 @@ kotlin {
} }
jsMain { jsMain {
dependencies { dependencies {
implementation(project(":visionforge-threejs"))
} }
} }
} }

View File

@ -3,10 +3,10 @@ package ru.mipt.npm.sat
import hep.dataforge.context.Global import hep.dataforge.context.Global
import hep.dataforge.js.Application import hep.dataforge.js.Application
import hep.dataforge.js.startApplication import hep.dataforge.js.startApplication
import hep.dataforge.meta.invoke
import hep.dataforge.vision.solid.three.ThreePlugin import hep.dataforge.vision.solid.three.ThreePlugin
import hep.dataforge.vision.solid.three.render import hep.dataforge.vision.solid.three.render
import kotlinx.browser.document import kotlinx.browser.document
import hep.dataforge.meta.invoke
import org.w3c.dom.HTMLElement import org.w3c.dom.HTMLElement
private class SatDemoApp : Application { private class SatDemoApp : Application {
@ -20,7 +20,7 @@ private class SatDemoApp : Application {
) )
three.render(element, sat){ three.render(element, sat){
minSize = 500 minSize = 500
axes { axes{
size = 500.0 size = 500.0
visible = true visible = true
} }

View File

@ -36,6 +36,7 @@ kotlin {
} }
jsMain{ jsMain{
dependencies { dependencies {
implementation(project(":visionforge-threejs"))
implementation("org.jetbrains:kotlin-css:1.0.0-pre.129-kotlin-1.4.10") implementation("org.jetbrains:kotlin-css:1.0.0-pre.129-kotlin-1.4.10")
} }
} }

View File

@ -1,8 +1,6 @@
package hep.dataforge.vision.solid.demo package hep.dataforge.vision.solid.demo
import hep.dataforge.meta.int import hep.dataforge.meta.*
import hep.dataforge.meta.number
import hep.dataforge.meta.set
import hep.dataforge.names.plus import hep.dataforge.names.plus
import hep.dataforge.names.startsWith import hep.dataforge.names.startsWith
import hep.dataforge.values.asValue import hep.dataforge.values.asValue

View File

@ -1,7 +1,6 @@
import hep.dataforge.context.Global import hep.dataforge.context.Global
import hep.dataforge.js.Application import hep.dataforge.js.Application
import hep.dataforge.js.startApplication import hep.dataforge.js.startApplication
import hep.dataforge.meta.invoke
import hep.dataforge.vision.bootstrap.visionPropertyEditor import hep.dataforge.vision.bootstrap.visionPropertyEditor
import hep.dataforge.vision.react.ThreeCanvasComponent import hep.dataforge.vision.react.ThreeCanvasComponent
import hep.dataforge.vision.react.objectTree import hep.dataforge.vision.react.objectTree

View File

@ -39,6 +39,7 @@ include(
":visionforge-core", ":visionforge-core",
":visionforge-solid", ":visionforge-solid",
":visionforge-fx", ":visionforge-fx",
":visionforge-threejs",
":visionforge-gdml", ":visionforge-gdml",
":visionforge-server", ":visionforge-server",
":demo:spatial-showcase", ":demo:spatial-showcase",

View File

@ -9,4 +9,5 @@ dependencies{
api(project(":visionforge-solid")) api(project(":visionforge-solid"))
api("org.jetbrains:kotlin-styled:5.2.0-$kotlinWrappersVersion") api("org.jetbrains:kotlin-styled:5.2.0-$kotlinWrappersVersion")
api("org.jetbrains:kotlin-react-dom:$reactVersion-$kotlinWrappersVersion") api("org.jetbrains:kotlin-react-dom:$reactVersion-$kotlinWrappersVersion")
implementation(project(":visionforge-threejs"))
} }

View File

@ -1,7 +1,6 @@
package hep.dataforge.vision.react package hep.dataforge.vision.react
import hep.dataforge.context.Context import hep.dataforge.context.Context
import hep.dataforge.meta.empty
import hep.dataforge.names.Name import hep.dataforge.names.Name
import hep.dataforge.vision.solid.Solid import hep.dataforge.vision.solid.Solid
import hep.dataforge.vision.solid.specifications.Canvas3DOptions import hep.dataforge.vision.solid.specifications.Canvas3DOptions

View File

@ -6,6 +6,9 @@ val dataforgeVersion: String by rootProject.extra
val kotlinWrappersVersion: String by rootProject.extra val kotlinWrappersVersion: String by rootProject.extra
val htmlVersion: String by rootProject.extra val htmlVersion: String by rootProject.extra
kscience{
useSerialization()
}
kotlin { kotlin {
sourceSets { sourceSets {

View File

@ -11,6 +11,7 @@ val fxVersion: String by rootProject.extra
kscience{ kscience{
useFx(ru.mipt.npm.gradle.FXModule.CONTROLS, version = fxVersion) useFx(ru.mipt.npm.gradle.FXModule.CONTROLS, version = fxVersion)
useSerialization()
} }
dependencies { dependencies {

View File

@ -2,7 +2,6 @@ package hep.dataforge.vision.solid
import hep.dataforge.context.Context import hep.dataforge.context.Context
import hep.dataforge.context.ContextAware import hep.dataforge.context.ContextAware
import hep.dataforge.meta.empty
import hep.dataforge.vision.layout.Output import hep.dataforge.vision.layout.Output
import hep.dataforge.vision.solid.specifications.Canvas3DOptions import hep.dataforge.vision.solid.specifications.Canvas3DOptions
import javafx.application.Platform import javafx.application.Platform

View File

@ -104,7 +104,7 @@ public var Solid.color: String?
} }
public val Solid.material: SolidMaterial? public val Solid.material: SolidMaterial?
get() = getProperty(MATERIAL_KEY).node?.let { SolidMaterial.wrap(it) } get() = getProperty(MATERIAL_KEY).node?.let { SolidMaterial.read(it) }
public fun Solid.material(builder: SolidMaterial.() -> Unit) { public fun Solid.material(builder: SolidMaterial.() -> Unit) {
val node = config[MATERIAL_KEY].node val node = config[MATERIAL_KEY].node

View File

@ -0,0 +1,13 @@
plugins {
id("ru.mipt.npm.js")
}
kscience {
useSerialization()
}
dependencies {
api(project(":visionforge-solid"))
implementation(npm("three", "0.122.0"))
implementation(npm("three-csg-ts", "1.0.6"))
}

View File

@ -2,8 +2,6 @@ package hep.dataforge.vision.solid.three
import hep.dataforge.context.* import hep.dataforge.context.*
import hep.dataforge.meta.Meta import hep.dataforge.meta.Meta
import hep.dataforge.meta.empty
import hep.dataforge.meta.invoke
import hep.dataforge.names.* import hep.dataforge.names.*
import hep.dataforge.vision.Vision import hep.dataforge.vision.Vision
import hep.dataforge.vision.html.HtmlVisionBinding import hep.dataforge.vision.html.HtmlVisionBinding

View File

@ -1,9 +1,7 @@
package hep.dataforge.vision.solid.three package hep.dataforge.vision.solid.three
import hep.dataforge.vision.solid.BasicSolid import hep.dataforge.vision.solid.BasicSolid
import hep.dataforge.vision.solid.Solid
import info.laht.threekt.core.Object3D import info.laht.threekt.core.Object3D
import kotlinx.serialization.Serializable
/** /**
* A custom visual object that has its own Three.js renderer * A custom visual object that has its own Three.js renderer

Some files were not shown because too many files have changed in this diff Show More