From 5cb62c8f6e8332b98cd6b5cfc4f5e239bd0d8166 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 4 Aug 2019 11:32:19 +0300 Subject: [PATCH] Merged spatial into a single project --- dataforge-vis-spatial-fx/build.gradle.kts | 16 -------------- dataforge-vis-spatial-gdml/build.gradle.kts | 2 +- dataforge-vis-spatial-js/build.gradle.kts | 21 ------------------- dataforge-vis-spatial/build.gradle.kts | 10 ++++++++- .../dataforge/vis/spatial/three/Materials.kt | 0 .../vis/spatial/three/ThreeBoxFactory.kt | 0 .../spatial/three/ThreeCompositeFactory.kt | 0 .../vis/spatial/three/ThreeConvexFactory.kt | 0 .../vis/spatial/three/ThreeCylinderFactory.kt | 0 .../vis/spatial/three/ThreeFactory.kt | 0 .../vis/spatial/three/ThreeGeometryBuilder.kt | 0 .../vis/spatial/three/ThreeOutput.kt | 0 .../vis/spatial/three/ThreePlugin.kt | 0 .../vis/spatial/three/ThreeProxyFactory.kt | 0 .../vis/spatial/three/ThreeSphereFactory.kt | 0 .../hep/dataforge/vis/spatial/three/csg.kt | 0 .../hep/dataforge/vis/spatial/three/three.kt | 0 .../hep/dataforge/vis/spatial/fx}/Canvas3D.kt | 5 +++-- .../spatial/fx}/DisplayObjectFXListener.kt | 7 +++---- .../dataforge/vis/spatial/fx}/FX3DOutput.kt | 3 ++- .../dataforge/vis/spatial/fx}/Materials.kt | 2 +- .../vis/spatial/fx}/RendererDemoApp.kt | 3 ++- settings.gradle.kts | 3 --- spatial-js-demo/build.gradle.kts | 2 +- .../vis/spatial/demo/ThreeDemoApp.kt | 14 ++++++++----- 25 files changed, 31 insertions(+), 57 deletions(-) delete mode 100644 dataforge-vis-spatial-fx/build.gradle.kts delete mode 100644 dataforge-vis-spatial-js/build.gradle.kts rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/Materials.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeBoxFactory.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeCompositeFactory.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeConvexFactory.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeCylinderFactory.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeFactory.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeGeometryBuilder.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeOutput.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreePlugin.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeProxyFactory.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/ThreeSphereFactory.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/csg.kt (100%) rename {dataforge-vis-spatial-js/src/main => dataforge-vis-spatial/src/jsMain}/kotlin/hep/dataforge/vis/spatial/three/three.kt (100%) rename {dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial => dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx}/Canvas3D.kt (98%) rename {dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial => dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx}/DisplayObjectFXListener.kt (91%) rename {dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial => dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx}/FX3DOutput.kt (95%) rename {dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial => dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx}/Materials.kt (98%) rename {dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial => dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx}/RendererDemoApp.kt (94%) diff --git a/dataforge-vis-spatial-fx/build.gradle.kts b/dataforge-vis-spatial-fx/build.gradle.kts deleted file mode 100644 index 4cd61958..00000000 --- a/dataforge-vis-spatial-fx/build.gradle.kts +++ /dev/null @@ -1,16 +0,0 @@ -import org.openjfx.gradle.JavaFXOptions - -plugins { - id("scientifik.jvm") - id("org.openjfx.javafxplugin") -} - -dependencies { - implementation(project(":dataforge-vis-spatial")) - implementation(project(":dataforge-vis-fx")) - implementation("org.fxyz3d:fxyz3d:0.4.0") -} - -configure { - modules("javafx.controls") -} \ No newline at end of file diff --git a/dataforge-vis-spatial-gdml/build.gradle.kts b/dataforge-vis-spatial-gdml/build.gradle.kts index 43ce211f..e2c711c6 100644 --- a/dataforge-vis-spatial-gdml/build.gradle.kts +++ b/dataforge-vis-spatial-gdml/build.gradle.kts @@ -12,7 +12,7 @@ kotlin { } val jsMain by getting { dependencies { - api(project(":dataforge-vis-spatial-js")) + api(project(":dataforge-vis-spatial")) } } } diff --git a/dataforge-vis-spatial-js/build.gradle.kts b/dataforge-vis-spatial-js/build.gradle.kts deleted file mode 100644 index 5414ef13..00000000 --- a/dataforge-vis-spatial-js/build.gradle.kts +++ /dev/null @@ -1,21 +0,0 @@ -plugins { - id("scientifik.js") - //id("kotlin-dce-js") -} - -//val kotlinVersion: String by rootProject.extra - -dependencies { - api(project(":dataforge-vis-spatial")) - api("info.laht.threekt:threejs-wrapper:0.106-npm-3") - testCompile(kotlin("test-js")) -} - -kotlin{ - sourceSets["main"].dependencies{ - implementation(npm("three","0.106.2")) - implementation(npm("@hi-level/three-csg")) - implementation(npm("style-loader")) - implementation(npm("element-resize-event")) - } -} diff --git a/dataforge-vis-spatial/build.gradle.kts b/dataforge-vis-spatial/build.gradle.kts index f5f9cc60..3b1660bd 100644 --- a/dataforge-vis-spatial/build.gradle.kts +++ b/dataforge-vis-spatial/build.gradle.kts @@ -1,5 +1,8 @@ +import org.openjfx.gradle.JavaFXOptions + plugins { id("scientifik.mpp") + id("org.openjfx.javafxplugin") } scientifik{ @@ -18,7 +21,8 @@ kotlin { } jvmMain{ dependencies { - + implementation(project(":dataforge-vis-fx")) + implementation("org.fxyz3d:fxyz3d:0.4.0") } } jsMain{ @@ -33,3 +37,7 @@ kotlin { } } +configure { + modules("javafx.controls") +} + diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/Materials.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/Materials.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/Materials.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/Materials.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeBoxFactory.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeBoxFactory.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeBoxFactory.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeBoxFactory.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeCompositeFactory.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeCompositeFactory.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeCompositeFactory.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeCompositeFactory.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeConvexFactory.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeConvexFactory.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeConvexFactory.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeConvexFactory.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeCylinderFactory.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeCylinderFactory.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeCylinderFactory.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeCylinderFactory.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeFactory.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeFactory.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeFactory.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeFactory.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeGeometryBuilder.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeGeometryBuilder.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeGeometryBuilder.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeGeometryBuilder.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeOutput.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeOutput.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeOutput.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeOutput.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreePlugin.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreePlugin.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreePlugin.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreePlugin.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeProxyFactory.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeProxyFactory.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeProxyFactory.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeProxyFactory.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeSphereFactory.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeSphereFactory.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/ThreeSphereFactory.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/ThreeSphereFactory.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/csg.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/csg.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/csg.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/csg.kt diff --git a/dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/three.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/three.kt similarity index 100% rename from dataforge-vis-spatial-js/src/main/kotlin/hep/dataforge/vis/spatial/three/three.kt rename to dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/three/three.kt diff --git a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/Canvas3D.kt b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/Canvas3D.kt similarity index 98% rename from dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/Canvas3D.kt rename to dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/Canvas3D.kt index 59f9045d..cfbc3375 100644 --- a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/Canvas3D.kt +++ b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/Canvas3D.kt @@ -1,5 +1,6 @@ -package hep.dataforge.vis.spatial +package hep.dataforge.vis.spatial.fx +import com.sun.tools.javac.util.JCDiagnostic import hep.dataforge.vis.spatial.World.CAMERA_FAR_CLIP import hep.dataforge.vis.spatial.World.CAMERA_INITIAL_DISTANCE import hep.dataforge.vis.spatial.World.CAMERA_INITIAL_X_ANGLE @@ -54,7 +55,7 @@ class Canvas3D : Fragment() { var angleZ by rotationZProperty - override val root =borderpane { + override val root = borderpane { center = SubScene( Group(world, cameraRotation).apply { DepthTest.ENABLE }, 1024.0, diff --git a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/DisplayObjectFXListener.kt b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/DisplayObjectFXListener.kt similarity index 91% rename from dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/DisplayObjectFXListener.kt rename to dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/DisplayObjectFXListener.kt index 62bcaffd..b0d3089e 100644 --- a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/DisplayObjectFXListener.kt +++ b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/DisplayObjectFXListener.kt @@ -1,10 +1,9 @@ -package hep.dataforge.vis.spatial +package hep.dataforge.vis.spatial.fx import hep.dataforge.meta.* import hep.dataforge.names.Name import hep.dataforge.names.toName import hep.dataforge.vis.common.VisualObject -import hep.dataforge.vis.common.onChange import javafx.beans.binding.ObjectBinding import tornadofx.* @@ -15,7 +14,7 @@ class DisplayObjectFXListener(val obj: VisualObject) { private val binndings = HashMap?>>() init { - obj.onChange(this) { name, _, _ -> + obj.onPropertyChange(this) { name, _, _ -> binndings[name]?.invalidate() } } @@ -23,7 +22,7 @@ class DisplayObjectFXListener(val obj: VisualObject) { operator fun get(key: Name): ObjectBinding?> { return binndings.getOrPut(key) { object : ObjectBinding?>() { - override fun computeValue(): MetaItem<*>? = obj.properties[key] + override fun computeValue(): MetaItem<*>? = obj.getProperty(key) } } } diff --git a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/FX3DOutput.kt b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/FX3DOutput.kt similarity index 95% rename from dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/FX3DOutput.kt rename to dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/FX3DOutput.kt index 139bf4be..9e1ab369 100644 --- a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/FX3DOutput.kt +++ b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/FX3DOutput.kt @@ -1,10 +1,11 @@ -package hep.dataforge.vis.spatial +package hep.dataforge.vis.spatial.fx import hep.dataforge.context.Context import hep.dataforge.meta.Meta import hep.dataforge.output.Output import hep.dataforge.vis.common.VisualNode import hep.dataforge.vis.common.VisualObject +import hep.dataforge.vis.spatial.Box import javafx.scene.Group import javafx.scene.Node import org.fxyz3d.shapes.primitives.CuboidMesh diff --git a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/Materials.kt b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/Materials.kt similarity index 98% rename from dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/Materials.kt rename to dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/Materials.kt index 3816f9f6..626a3594 100644 --- a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/Materials.kt +++ b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/Materials.kt @@ -1,4 +1,4 @@ -package hep.dataforge.vis.spatial +package hep.dataforge.vis.spatial.fx import hep.dataforge.meta.MetaItem import hep.dataforge.meta.double diff --git a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/RendererDemoApp.kt b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/RendererDemoApp.kt similarity index 94% rename from dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/RendererDemoApp.kt rename to dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/RendererDemoApp.kt index fcaa90df..cd4bc32c 100644 --- a/dataforge-vis-spatial-fx/src/main/kotlin/hep/dataforge/vis/spatial/RendererDemoApp.kt +++ b/dataforge-vis-spatial/src/jvmMain/kotlin/hep/dataforge/vis/spatial/fx/RendererDemoApp.kt @@ -1,7 +1,8 @@ -package hep.dataforge.vis.spatial +package hep.dataforge.vis.spatial.fx import hep.dataforge.context.Global import hep.dataforge.meta.number +import hep.dataforge.vis.spatial.* import javafx.scene.Parent import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.delay diff --git a/settings.gradle.kts b/settings.gradle.kts index a295cc94..1c7412a3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -34,9 +34,6 @@ include( ":dataforge-vis-common", ":dataforge-vis-fx", ":dataforge-vis-spatial", - ":dataforge-vis-spatial-fx", - ":dataforge-vis-spatial-js", -// ":dataforge-vis-jsroot", ":dataforge-vis-spatial-gdml", ":spatial-js-demo" ) diff --git a/spatial-js-demo/build.gradle.kts b/spatial-js-demo/build.gradle.kts index 87ad08a2..d44b204e 100644 --- a/spatial-js-demo/build.gradle.kts +++ b/spatial-js-demo/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - api(project(":dataforge-vis-spatial-js")) + api(project(":dataforge-vis-spatial")) api("info.laht.threekt:threejs-wrapper:0.106-npm-3") testCompile(kotlin("test-js")) } diff --git a/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt b/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt index 156995ac..8663153b 100644 --- a/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt +++ b/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt @@ -9,9 +9,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.delay import kotlinx.coroutines.isActive import kotlinx.coroutines.launch -import kotlin.math.PI -import kotlin.math.cos -import kotlin.math.sin +import kotlin.math.* import kotlin.random.Random @@ -36,7 +34,7 @@ private class ThreeDemoApp : ApplicationBase() { tube(50, height = 10, innerRadius = 25, angle = PI) { y = 110 detail = 16 - rotationX = PI/4 + rotationX = PI / 4 } } @@ -94,7 +92,7 @@ private class ThreeDemoApp : ApplicationBase() { } } - demo("CSG", "CSG operations") { + demo("CSG.simple", "CSG operations") { composite(CompositeType.UNION) { box(100, 100, 100) { z = 50 @@ -122,6 +120,12 @@ private class ThreeDemoApp : ApplicationBase() { color(Colors.blue) } } + demo("CSG.custom","CSG with manually created object"){ + intersect { + box(100,100,100) + tube(60,10) + } + } }