forked from kscience/visionforge
Moved ThreeJS to a separate module
This commit is contained in:
parent
698f74adaa
commit
e44096e844
@ -7,6 +7,9 @@
|
||||
|
||||
### Changed
|
||||
- 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
|
||||
|
||||
|
@ -2,7 +2,7 @@ plugins {
|
||||
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 htmlVersion by extra("0.7.2")
|
||||
val kotlinWrappersVersion by extra("pre.129-kotlin-1.4.10")
|
||||
@ -27,11 +27,6 @@ subprojects {
|
||||
if(name.startsWith("visionforge")) {
|
||||
apply<ru.mipt.npm.gradle.KSciencePublishPlugin>()
|
||||
}
|
||||
afterEvaluate {
|
||||
extensions.findByType<ru.mipt.npm.gradle.KScienceExtension>()?.run {
|
||||
useSerialization()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apiValidation {
|
||||
|
@ -32,6 +32,7 @@ kotlin {
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation(project(":ui:bootstrap"))
|
||||
implementation(project(":visionforge-threejs"))
|
||||
implementation(npm("react-file-drop", "3.0.6"))
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package hep.dataforge.vision.gdml.demo
|
||||
|
||||
import hep.dataforge.context.Context
|
||||
import hep.dataforge.meta.invoke
|
||||
import hep.dataforge.names.Name
|
||||
import hep.dataforge.vision.Vision
|
||||
import hep.dataforge.vision.bootstrap.nameCrumbs
|
||||
|
@ -49,6 +49,7 @@ kotlin {
|
||||
implementation(project(":ui:bootstrap"))
|
||||
implementation("io.ktor:ktor-client-js:$ktorVersion")
|
||||
implementation("io.ktor:ktor-client-serialization:$ktorVersion")
|
||||
implementation(project(":visionforge-threejs"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package ru.mipt.npm.muon.monitor
|
||||
|
||||
import hep.dataforge.context.Context
|
||||
import hep.dataforge.meta.invoke
|
||||
import hep.dataforge.names.Name
|
||||
import hep.dataforge.names.NameToken
|
||||
import hep.dataforge.names.isEmpty
|
||||
|
@ -17,7 +17,7 @@ kotlin {
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
|
||||
implementation(project(":visionforge-threejs"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,10 +3,10 @@ package ru.mipt.npm.sat
|
||||
import hep.dataforge.context.Global
|
||||
import hep.dataforge.js.Application
|
||||
import hep.dataforge.js.startApplication
|
||||
import hep.dataforge.meta.invoke
|
||||
import hep.dataforge.vision.solid.three.ThreePlugin
|
||||
import hep.dataforge.vision.solid.three.render
|
||||
import kotlinx.browser.document
|
||||
import hep.dataforge.meta.invoke
|
||||
import org.w3c.dom.HTMLElement
|
||||
|
||||
private class SatDemoApp : Application {
|
||||
|
@ -36,6 +36,7 @@ kotlin {
|
||||
}
|
||||
jsMain{
|
||||
dependencies {
|
||||
implementation(project(":visionforge-threejs"))
|
||||
implementation("org.jetbrains:kotlin-css:1.0.0-pre.129-kotlin-1.4.10")
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package hep.dataforge.vision.solid.demo
|
||||
|
||||
import hep.dataforge.meta.int
|
||||
import hep.dataforge.meta.number
|
||||
import hep.dataforge.meta.set
|
||||
import hep.dataforge.meta.*
|
||||
import hep.dataforge.names.plus
|
||||
import hep.dataforge.names.startsWith
|
||||
import hep.dataforge.values.asValue
|
||||
|
@ -1,7 +1,6 @@
|
||||
import hep.dataforge.context.Global
|
||||
import hep.dataforge.js.Application
|
||||
import hep.dataforge.js.startApplication
|
||||
import hep.dataforge.meta.invoke
|
||||
import hep.dataforge.vision.bootstrap.visionPropertyEditor
|
||||
import hep.dataforge.vision.react.ThreeCanvasComponent
|
||||
import hep.dataforge.vision.react.objectTree
|
||||
|
@ -39,6 +39,7 @@ include(
|
||||
":visionforge-core",
|
||||
":visionforge-solid",
|
||||
":visionforge-fx",
|
||||
":visionforge-threejs",
|
||||
":visionforge-gdml",
|
||||
":visionforge-server",
|
||||
":demo:spatial-showcase",
|
||||
|
@ -9,4 +9,5 @@ dependencies{
|
||||
api(project(":visionforge-solid"))
|
||||
api("org.jetbrains:kotlin-styled:5.2.0-$kotlinWrappersVersion")
|
||||
api("org.jetbrains:kotlin-react-dom:$reactVersion-$kotlinWrappersVersion")
|
||||
implementation(project(":visionforge-threejs"))
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package hep.dataforge.vision.react
|
||||
|
||||
import hep.dataforge.context.Context
|
||||
import hep.dataforge.meta.empty
|
||||
import hep.dataforge.names.Name
|
||||
import hep.dataforge.vision.solid.Solid
|
||||
import hep.dataforge.vision.solid.specifications.Canvas3DOptions
|
||||
|
@ -6,6 +6,9 @@ val dataforgeVersion: String by rootProject.extra
|
||||
val kotlinWrappersVersion: String by rootProject.extra
|
||||
val htmlVersion: String by rootProject.extra
|
||||
|
||||
kscience{
|
||||
useSerialization()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
|
@ -11,6 +11,7 @@ val fxVersion: String by rootProject.extra
|
||||
|
||||
kscience{
|
||||
useFx(ru.mipt.npm.gradle.FXModule.CONTROLS, version = fxVersion)
|
||||
useSerialization()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -2,7 +2,6 @@ package hep.dataforge.vision.solid
|
||||
|
||||
import hep.dataforge.context.Context
|
||||
import hep.dataforge.context.ContextAware
|
||||
import hep.dataforge.meta.empty
|
||||
import hep.dataforge.vision.layout.Output
|
||||
import hep.dataforge.vision.solid.specifications.Canvas3DOptions
|
||||
import javafx.application.Platform
|
||||
|
@ -104,7 +104,7 @@ public var Solid.color: String?
|
||||
}
|
||||
|
||||
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) {
|
||||
val node = config[MATERIAL_KEY].node
|
||||
|
13
visionforge-threejs/build.gradle.kts
Normal file
13
visionforge-threejs/build.gradle.kts
Normal 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"))
|
||||
}
|
@ -2,8 +2,6 @@ package hep.dataforge.vision.solid.three
|
||||
|
||||
import hep.dataforge.context.*
|
||||
import hep.dataforge.meta.Meta
|
||||
import hep.dataforge.meta.empty
|
||||
import hep.dataforge.meta.invoke
|
||||
import hep.dataforge.names.*
|
||||
import hep.dataforge.vision.Vision
|
||||
import hep.dataforge.vision.html.HtmlVisionBinding
|
@ -1,9 +1,7 @@
|
||||
package hep.dataforge.vision.solid.three
|
||||
|
||||
import hep.dataforge.vision.solid.BasicSolid
|
||||
import hep.dataforge.vision.solid.Solid
|
||||
import info.laht.threekt.core.Object3D
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* 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
Loading…
Reference in New Issue
Block a user