From bb6c6e2175ac83519c0dea267c0352df7eb8bdc9 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 12 Jan 2021 13:00:21 +0300 Subject: [PATCH] fix imports --- .../src/commonMain/kotlin/hep/dataforge/vision/html/Page.kt | 1 + .../kotlin/hep/dataforge/vision/html/HtmlTagTest.kt | 1 + .../kotlin/hep/dataforge/vision/plotly/VisionOfPlotly.kt | 1 + .../commonMain/kotlin/hep/dataforge/vision/solid/geometry.kt | 1 + .../kotlin/hep/dataforge/vision/solid/three/ThreeCanvas.kt | 4 +++- .../kotlin/hep/dataforge/vision/solid/three/ThreePlugin.kt | 4 +++- 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/Page.kt b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/Page.kt index 942d5ff5..7a12c2ac 100644 --- a/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/Page.kt +++ b/visionforge-core/src/commonMain/kotlin/hep/dataforge/vision/html/Page.kt @@ -1,6 +1,7 @@ package hep.dataforge.vision.html import hep.dataforge.context.Context +import hep.dataforge.vision.visionManager import kotlinx.html.* public data class Page( diff --git a/visionforge-core/src/commonTest/kotlin/hep/dataforge/vision/html/HtmlTagTest.kt b/visionforge-core/src/commonTest/kotlin/hep/dataforge/vision/html/HtmlTagTest.kt index 22008800..c9429a79 100644 --- a/visionforge-core/src/commonTest/kotlin/hep/dataforge/vision/html/HtmlTagTest.kt +++ b/visionforge-core/src/commonTest/kotlin/hep/dataforge/vision/html/HtmlTagTest.kt @@ -3,6 +3,7 @@ package hep.dataforge.vision.html import hep.dataforge.meta.DFExperimental import hep.dataforge.meta.set import hep.dataforge.vision.VisionBase +import hep.dataforge.vision.configure import kotlinx.html.* import kotlinx.html.stream.createHTML import kotlin.test.Test diff --git a/visionforge-plotly/src/commonMain/kotlin/hep/dataforge/vision/plotly/VisionOfPlotly.kt b/visionforge-plotly/src/commonMain/kotlin/hep/dataforge/vision/plotly/VisionOfPlotly.kt index 4e81cd12..a295deb9 100644 --- a/visionforge-plotly/src/commonMain/kotlin/hep/dataforge/vision/plotly/VisionOfPlotly.kt +++ b/visionforge-plotly/src/commonMain/kotlin/hep/dataforge/vision/plotly/VisionOfPlotly.kt @@ -4,6 +4,7 @@ import hep.dataforge.meta.Config import hep.dataforge.meta.DFExperimental import hep.dataforge.vision.VisionBase import hep.dataforge.vision.html.VisionOutput +import kotlinx.serialization.Serializable import kscience.plotly.Plot import kscience.plotly.Plotly diff --git a/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/geometry.kt b/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/geometry.kt index ae28ca53..8d4fb85a 100644 --- a/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/geometry.kt +++ b/visionforge-solid/src/commonMain/kotlin/hep/dataforge/vision/solid/geometry.kt @@ -4,6 +4,7 @@ import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.meta.double import hep.dataforge.meta.get +import kotlinx.serialization.Serializable import kotlin.math.PI public const val PI2: Float = 2 * PI.toFloat() diff --git a/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeCanvas.kt b/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeCanvas.kt index 2a91b8cc..9562ddb2 100644 --- a/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeCanvas.kt +++ b/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreeCanvas.kt @@ -1,5 +1,7 @@ package hep.dataforge.vision.solid.three +import hep.dataforge.meta.get +import hep.dataforge.meta.string import hep.dataforge.names.Name import hep.dataforge.names.plus import hep.dataforge.names.toName @@ -180,7 +182,7 @@ public class ThreeCanvas( } private fun addControls(element: Node, controls: Controls) { - when (controls.get("type").string) { + when (controls["type"].string) { "trackball" -> TrackballControls(camera, element) else -> OrbitControls(camera, element) } diff --git a/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreePlugin.kt b/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreePlugin.kt index 8468ba53..21afdedb 100644 --- a/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreePlugin.kt +++ b/visionforge-threejs/src/main/kotlin/hep/dataforge/vision/solid/three/ThreePlugin.kt @@ -11,6 +11,8 @@ import hep.dataforge.vision.solid.specifications.Canvas3DOptions import hep.dataforge.vision.visible import info.laht.threekt.core.Object3D import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.flow.launchIn +import kotlinx.coroutines.flow.onEach import org.w3c.dom.Element import org.w3c.dom.HTMLElement import kotlin.collections.set @@ -154,7 +156,7 @@ public class ThreePlugin : AbstractPlugin(), ElementVisionRenderer { * Ensure that [ThreePlugin] is loaded in the global [VisionForge] context */ @JsExport -public fun loadThreeJs(){ +public fun loadThreeJs() { VisionForge.plugins.fetch(ThreePlugin) }