From 698f74adaa41655d37d551ab790e125b5b62397b Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 21 Nov 2020 10:56:07 +0300 Subject: [PATCH] Moved FX to a separate module --- build.gradle.kts | 3 -- demo/gdml/build.gradle.kts | 5 +++ .../vision/gdml/demo/GdmlFxDemoApp.kt | 4 +- demo/spatial-showcase/build.gradle.kts | 5 +++ .../dataforge/vision/solid/demo/FXDemoGrid.kt | 4 +- .../vision/solid}/demo/MetaEditorDemo.kt | 0 settings.gradle.kts | 1 + visionforge-core/build.gradle.kts | 12 ------ .../dataforge/vision/visitor/countDistinct.kt | 4 +- visionforge-fx/build.gradle.kts | 37 +++++++++++++++++++ .../kotlin/hep/dataforge/vision/FXPlugin.kt | 0 .../vision/editor/ColorValueChooser.kt | 0 .../vision/editor/ComboBoxValueChooser.kt | 0 .../dataforge/vision/editor/ConfigEditor.kt | 0 .../hep/dataforge/vision/editor/FXMeta.kt | 0 .../hep/dataforge/vision/editor/MetaViewer.kt | 0 .../vision/editor/TextValueChooser.kt | 0 .../dataforge/vision/editor/ValueCallback.kt | 0 .../dataforge/vision/editor/ValueChooser.kt | 0 .../vision/editor/ValueChooserBase.kt | 0 .../editor/VisualObjectEditorFragment.kt | 0 .../vision/editor/VisualObjectTreeFragment.kt | 0 .../hep/dataforge/vision/solid}/FX3DPlugin.kt | 5 +-- .../hep/dataforge/vision/solid}/FXCanvas3D.kt | 3 +- .../vision/solid}/FXCompositeFactory.kt | 4 +- .../vision/solid}/FXConvexFactory.kt | 3 +- .../dataforge/vision/solid}/FXMaterials.kt | 3 +- .../vision/solid}/FXReferenceFactory.kt | 3 +- .../dataforge/vision/solid}/FXShapeFactory.kt | 5 +-- .../dataforge/vision/solid}/OrbitControls.kt | 2 +- .../vision/solid}/VisualObjectFXBinding.kt | 2 +- visionforge-solid/build.gradle.kts | 13 ------- .../dataforge/vision/solid/SolidMaterial.kt | 8 ++-- 33 files changed, 68 insertions(+), 58 deletions(-) rename {visionforge-core/src/jvmTest/kotlin/hep/dataforge/vision => demo/spatial-showcase/src/jvmMain/kotlin/hep/dataforge/vision/solid}/demo/MetaEditorDemo.kt (100%) create mode 100644 visionforge-fx/build.gradle.kts rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/FXPlugin.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/ConfigEditor.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/FXMeta.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/MetaViewer.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/TextValueChooser.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/ValueCallback.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/ValueChooser.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/ValueChooserBase.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/VisualObjectEditorFragment.kt (100%) rename {visionforge-core/src/jvmMain => visionforge-fx/src/main}/kotlin/hep/dataforge/vision/editor/VisualObjectTreeFragment.kt (100%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/FX3DPlugin.kt (97%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/FXCanvas3D.kt (96%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/FXCompositeFactory.kt (94%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/FXConvexFactory.kt (86%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/FXMaterials.kt (96%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/FXReferenceFactory.kt (95%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/FXShapeFactory.kt (90%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/OrbitControls.kt (98%) rename {visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx => visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid}/VisualObjectFXBinding.kt (98%) diff --git a/build.gradle.kts b/build.gradle.kts index 562b2092..e2a4a66a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,3 @@ -import ru.mipt.npm.gradle.useFx - plugins { id("ru.mipt.npm.project") } @@ -32,7 +30,6 @@ subprojects { afterEvaluate { extensions.findByType()?.run { useSerialization() - useFx(ru.mipt.npm.gradle.FXModule.CONTROLS, version = fxVersion) } } } diff --git a/demo/gdml/build.gradle.kts b/demo/gdml/build.gradle.kts index 82e03364..a4870646 100644 --- a/demo/gdml/build.gradle.kts +++ b/demo/gdml/build.gradle.kts @@ -24,6 +24,11 @@ kotlin { implementation(project(":visionforge-gdml")) } } + jvmMain{ + dependencies{ + implementation(project(":visionforge-fx")) + } + } jsMain { dependencies { implementation(project(":ui:bootstrap")) diff --git a/demo/gdml/src/jvmMain/kotlin/hep/dataforge/vision/gdml/demo/GdmlFxDemoApp.kt b/demo/gdml/src/jvmMain/kotlin/hep/dataforge/vision/gdml/demo/GdmlFxDemoApp.kt index de6968a7..1d5a4a89 100644 --- a/demo/gdml/src/jvmMain/kotlin/hep/dataforge/vision/gdml/demo/GdmlFxDemoApp.kt +++ b/demo/gdml/src/jvmMain/kotlin/hep/dataforge/vision/gdml/demo/GdmlFxDemoApp.kt @@ -5,10 +5,10 @@ import hep.dataforge.vision.VisionManager import hep.dataforge.vision.editor.VisualObjectEditorFragment import hep.dataforge.vision.editor.VisualObjectTreeFragment import hep.dataforge.vision.gdml.toVision +import hep.dataforge.vision.solid.FX3DPlugin +import hep.dataforge.vision.solid.FXCanvas3D import hep.dataforge.vision.solid.Solid import hep.dataforge.vision.solid.SolidMaterial -import hep.dataforge.vision.solid.fx.FX3DPlugin -import hep.dataforge.vision.solid.fx.FXCanvas3D import javafx.geometry.Orientation import javafx.scene.Parent import javafx.stage.FileChooser diff --git a/demo/spatial-showcase/build.gradle.kts b/demo/spatial-showcase/build.gradle.kts index cd0a131f..4502f7c0 100644 --- a/demo/spatial-showcase/build.gradle.kts +++ b/demo/spatial-showcase/build.gradle.kts @@ -29,6 +29,11 @@ kotlin { implementation(project(":visionforge-gdml")) } } + jvmMain{ + dependencies{ + implementation(project(":visionforge-fx")) + } + } jsMain{ dependencies { implementation("org.jetbrains:kotlin-css:1.0.0-pre.129-kotlin-1.4.10") diff --git a/demo/spatial-showcase/src/jvmMain/kotlin/hep/dataforge/vision/solid/demo/FXDemoGrid.kt b/demo/spatial-showcase/src/jvmMain/kotlin/hep/dataforge/vision/solid/demo/FXDemoGrid.kt index ec0d5b0f..6b5267ff 100644 --- a/demo/spatial-showcase/src/jvmMain/kotlin/hep/dataforge/vision/solid/demo/FXDemoGrid.kt +++ b/demo/spatial-showcase/src/jvmMain/kotlin/hep/dataforge/vision/solid/demo/FXDemoGrid.kt @@ -5,9 +5,9 @@ import hep.dataforge.meta.Meta import hep.dataforge.names.Name import hep.dataforge.vision.layout.Output import hep.dataforge.vision.layout.Page +import hep.dataforge.vision.solid.FX3DPlugin +import hep.dataforge.vision.solid.FXCanvas3D import hep.dataforge.vision.solid.Solid -import hep.dataforge.vision.solid.fx.FX3DPlugin -import hep.dataforge.vision.solid.fx.FXCanvas3D import javafx.collections.FXCollections import javafx.scene.Parent import javafx.scene.control.Tab diff --git a/visionforge-core/src/jvmTest/kotlin/hep/dataforge/vision/demo/MetaEditorDemo.kt b/demo/spatial-showcase/src/jvmMain/kotlin/hep/dataforge/vision/solid/demo/MetaEditorDemo.kt similarity index 100% rename from visionforge-core/src/jvmTest/kotlin/hep/dataforge/vision/demo/MetaEditorDemo.kt rename to demo/spatial-showcase/src/jvmMain/kotlin/hep/dataforge/vision/solid/demo/MetaEditorDemo.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index 55158bb5..1a45cf80 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -38,6 +38,7 @@ include( ":ui:bootstrap", ":visionforge-core", ":visionforge-solid", + ":visionforge-fx", ":visionforge-gdml", ":visionforge-server", ":demo:spatial-showcase", diff --git a/visionforge-core/build.gradle.kts b/visionforge-core/build.gradle.kts index 74ac090a..7b2bd238 100644 --- a/visionforge-core/build.gradle.kts +++ b/visionforge-core/build.gradle.kts @@ -15,18 +15,6 @@ kotlin { api("org.jetbrains.kotlinx:kotlinx-html:$htmlVersion") } } - jvmMain { - dependencies { - api("no.tornado:tornadofx:1.7.20") - //api("no.tornado:tornadofx-controlsfx:0.1.1") - api("de.jensd:fontawesomefx-fontawesome:4.7.0-11") { - exclude(group = "org.openjfx") - } - api("de.jensd:fontawesomefx-commons:11.0") { - exclude(group = "org.openjfx") - } - } - } jsMain { dependencies { api("org.jetbrains:kotlin-extensions:1.0.1-$kotlinWrappersVersion") diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/visitor/countDistinct.kt b/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/visitor/countDistinct.kt index 6f9594de..716f888e 100644 --- a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/visitor/countDistinct.kt +++ b/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/visitor/countDistinct.kt @@ -4,7 +4,7 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.collect import java.util.concurrent.atomic.AtomicInteger -suspend fun Flow.countDistinctBy(selector: (T) -> K): Map { +public suspend fun Flow.countDistinctBy(selector: (T) -> K): Map { val counter = LinkedHashMap() collect { val key = selector(it) @@ -13,4 +13,4 @@ suspend fun Flow.countDistinctBy(selector: (T) -> K): Map { return counter.mapValues { it.value.toInt() } } -suspend fun Flow.countDistinct(): Map = countDistinctBy { it } \ No newline at end of file +public suspend fun Flow.countDistinct(): Map = countDistinctBy { it } \ No newline at end of file diff --git a/visionforge-fx/build.gradle.kts b/visionforge-fx/build.gradle.kts new file mode 100644 index 00000000..52da9f01 --- /dev/null +++ b/visionforge-fx/build.gradle.kts @@ -0,0 +1,37 @@ +import ru.mipt.npm.gradle.useFx + +plugins { + id("ru.mipt.npm.jvm") +} + +val dataforgeVersion: String by rootProject.extra +val kotlinWrappersVersion: String by rootProject.extra +val htmlVersion: String by rootProject.extra +val fxVersion: String by rootProject.extra + +kscience{ + useFx(ru.mipt.npm.gradle.FXModule.CONTROLS, version = fxVersion) +} + +dependencies { + api(project(":visionforge-solid")) + + api("no.tornado:tornadofx:1.7.20") + + api("de.jensd:fontawesomefx-fontawesome:4.7.0-11") { + exclude(group = "org.openjfx") + } + + api("de.jensd:fontawesomefx-commons:11.0") { + exclude(group = "org.openjfx") + } + + api("org.fxyz3d:fxyz3d:0.5.2") { + exclude(module = "slf4j-simple") + } + api("org.jetbrains.kotlinx:kotlinx-coroutines-javafx:${ru.mipt.npm.gradle.KScienceVersions.coroutinesVersion}") + + implementation("eu.mihosoft.vrl.jcsg:jcsg:0.5.7") { + exclude(module = "slf4j-simple") + } +} \ No newline at end of file diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/FXPlugin.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/FXPlugin.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/FXPlugin.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/FXPlugin.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ColorValueChooser.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ComboBoxValueChooser.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ConfigEditor.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ConfigEditor.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ConfigEditor.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ConfigEditor.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/FXMeta.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/FXMeta.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/FXMeta.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/FXMeta.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/MetaViewer.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/MetaViewer.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/MetaViewer.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/MetaViewer.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/TextValueChooser.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/TextValueChooser.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/TextValueChooser.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/TextValueChooser.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ValueCallback.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ValueCallback.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ValueCallback.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ValueCallback.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ValueChooser.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ValueChooser.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ValueChooser.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ValueChooser.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ValueChooserBase.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ValueChooserBase.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/ValueChooserBase.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/ValueChooserBase.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/VisualObjectEditorFragment.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/VisualObjectEditorFragment.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/VisualObjectEditorFragment.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/VisualObjectEditorFragment.kt diff --git a/visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/VisualObjectTreeFragment.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/VisualObjectTreeFragment.kt similarity index 100% rename from visionforge-core/src/jvmMain/kotlin/hep/dataforge/vision/editor/VisualObjectTreeFragment.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/editor/VisualObjectTreeFragment.kt diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FX3DPlugin.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FX3DPlugin.kt similarity index 97% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FX3DPlugin.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FX3DPlugin.kt index 30b30a81..3f863a34 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FX3DPlugin.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FX3DPlugin.kt @@ -1,13 +1,12 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import hep.dataforge.context.* import hep.dataforge.meta.Meta import hep.dataforge.meta.boolean import hep.dataforge.provider.Type -import hep.dataforge.vision.solid.* +import hep.dataforge.vision.solid.FX3DFactory.Companion.TYPE import hep.dataforge.vision.solid.SolidMaterial.Companion.MATERIAL_KEY import hep.dataforge.vision.solid.SolidMaterial.Companion.MATERIAL_WIREFRAME_KEY -import hep.dataforge.vision.solid.fx.FX3DFactory.Companion.TYPE import javafx.scene.Group import javafx.scene.Node import javafx.scene.shape.CullFace diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXCanvas3D.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXCanvas3D.kt similarity index 96% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXCanvas3D.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXCanvas3D.kt index 4abc02b7..149f9d36 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXCanvas3D.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXCanvas3D.kt @@ -1,10 +1,9 @@ -package hep.dataforge.vision.solid.fx +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.Solid import hep.dataforge.vision.solid.specifications.Canvas3DOptions import javafx.application.Platform import javafx.beans.property.ObjectProperty diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXCompositeFactory.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXCompositeFactory.kt similarity index 94% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXCompositeFactory.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXCompositeFactory.kt index 8a97e3c3..4a485529 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXCompositeFactory.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXCompositeFactory.kt @@ -1,10 +1,8 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import eu.mihosoft.jcsg.CSG import eu.mihosoft.jcsg.Polygon import eu.mihosoft.vvecmath.Vector3d -import hep.dataforge.vision.solid.Composite -import hep.dataforge.vision.solid.CompositeType import javafx.scene.Group import javafx.scene.Node import javafx.scene.shape.MeshView diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXConvexFactory.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXConvexFactory.kt similarity index 86% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXConvexFactory.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXConvexFactory.kt index f27d4edf..f8f6fc32 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXConvexFactory.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXConvexFactory.kt @@ -1,9 +1,8 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import eu.mihosoft.jcsg.PropertyStorage import eu.mihosoft.jcsg.ext.quickhull3d.HullUtil import eu.mihosoft.vvecmath.Vector3d -import hep.dataforge.vision.solid.Convex import javafx.scene.Node import kotlin.reflect.KClass diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXMaterials.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXMaterials.kt similarity index 96% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXMaterials.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXMaterials.kt index bfd01745..eb50f306 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXMaterials.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXMaterials.kt @@ -1,4 +1,4 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import hep.dataforge.meta.MetaItem import hep.dataforge.meta.double @@ -6,7 +6,6 @@ import hep.dataforge.meta.get import hep.dataforge.meta.int import hep.dataforge.values.ValueType import hep.dataforge.vision.Colors -import hep.dataforge.vision.solid.SolidMaterial import javafx.scene.paint.Color import javafx.scene.paint.Material import javafx.scene.paint.PhongMaterial diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXReferenceFactory.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXReferenceFactory.kt similarity index 95% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXReferenceFactory.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXReferenceFactory.kt index 6f6912e3..7c7258ac 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXReferenceFactory.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXReferenceFactory.kt @@ -1,8 +1,7 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import hep.dataforge.names.* import hep.dataforge.vision.Vision -import hep.dataforge.vision.solid.SolidReference import javafx.scene.Group import javafx.scene.Node import kotlin.reflect.KClass diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXShapeFactory.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXShapeFactory.kt similarity index 90% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXShapeFactory.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXShapeFactory.kt index a6ce41d1..fa8ce279 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/FXShapeFactory.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/FXShapeFactory.kt @@ -1,9 +1,6 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import hep.dataforge.meta.Meta -import hep.dataforge.vision.solid.GeometryBuilder -import hep.dataforge.vision.solid.GeometrySolid -import hep.dataforge.vision.solid.Point3D import javafx.scene.shape.Mesh import javafx.scene.shape.MeshView import javafx.scene.shape.TriangleMesh diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/OrbitControls.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/OrbitControls.kt similarity index 98% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/OrbitControls.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/OrbitControls.kt index b9bf8031..498c756f 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/OrbitControls.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/OrbitControls.kt @@ -1,4 +1,4 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import javafx.beans.InvalidationListener import javafx.beans.property.SimpleDoubleProperty diff --git a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/VisualObjectFXBinding.kt b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/VisualObjectFXBinding.kt similarity index 98% rename from visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/VisualObjectFXBinding.kt rename to visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/VisualObjectFXBinding.kt index 0ba7af20..e5c19dd1 100644 --- a/visionforge-solid/src/jvmMain/kotlin/hep/dataforge/vision/solid/fx/VisualObjectFXBinding.kt +++ b/visionforge-fx/src/main/kotlin/hep/dataforge/vision/solid/VisualObjectFXBinding.kt @@ -1,4 +1,4 @@ -package hep.dataforge.vision.solid.fx +package hep.dataforge.vision.solid import hep.dataforge.meta.* import hep.dataforge.names.Name diff --git a/visionforge-solid/build.gradle.kts b/visionforge-solid/build.gradle.kts index a9569b76..b7b6daa8 100644 --- a/visionforge-solid/build.gradle.kts +++ b/visionforge-solid/build.gradle.kts @@ -1,5 +1,3 @@ -import ru.mipt.npm.gradle.KScienceVersions.coroutinesVersion - plugins { id("ru.mipt.npm.mpp") } @@ -16,17 +14,6 @@ kotlin { api(project(":visionforge-core")) } } - jvmMain { - dependencies { - api("org.fxyz3d:fxyz3d:0.5.2") { - exclude(module = "slf4j-simple") - } - api("org.jetbrains.kotlinx:kotlinx-coroutines-javafx:${coroutinesVersion}") - implementation("eu.mihosoft.vrl.jcsg:jcsg:0.5.7") { - exclude(module = "slf4j-simple") - } - } - } jsMain { dependencies { implementation(npm("three", "0.122.0")) diff --git a/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/SolidMaterial.kt b/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/SolidMaterial.kt index c26300d1..34b7ca4d 100644 --- a/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/SolidMaterial.kt +++ b/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/SolidMaterial.kt @@ -40,13 +40,13 @@ public class SolidMaterial : Scheme() { public companion object : SchemeSpec(::SolidMaterial) { public val MATERIAL_KEY: Name = "material".asName() - internal val COLOR_KEY = "color".asName() + public val COLOR_KEY: Name = "color".asName() public val MATERIAL_COLOR_KEY: Name = MATERIAL_KEY + COLOR_KEY - internal val SPECULAR_COLOR_KEY = "specularColor".asName() + public val SPECULAR_COLOR_KEY: Name = "specularColor".asName() public val MATERIAL_SPECULAR_COLOR_KEY: Name = MATERIAL_KEY + SPECULAR_COLOR_KEY - internal val OPACITY_KEY = "opacity".asName() + public val OPACITY_KEY: Name = "opacity".asName() public val MATERIAL_OPACITY_KEY: Name = MATERIAL_KEY + OPACITY_KEY - internal val WIREFRAME_KEY = "wireframe".asName() + public val WIREFRAME_KEY: Name = "wireframe".asName() public val MATERIAL_WIREFRAME_KEY: Name = MATERIAL_KEY + WIREFRAME_KEY public override val descriptor: NodeDescriptor by lazy {