v0.2.0-dev-22 #47

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

View File

@ -1,6 +1,7 @@
package hep.dataforge.vision.html package hep.dataforge.vision.html
import hep.dataforge.context.Context import hep.dataforge.context.Context
import hep.dataforge.vision.visionManager
import kotlinx.html.* import kotlinx.html.*
public data class Page( public data class Page(

View File

@ -3,6 +3,7 @@ package hep.dataforge.vision.html
import hep.dataforge.meta.DFExperimental import hep.dataforge.meta.DFExperimental
import hep.dataforge.meta.set import hep.dataforge.meta.set
import hep.dataforge.vision.VisionBase import hep.dataforge.vision.VisionBase
import hep.dataforge.vision.configure
import kotlinx.html.* import kotlinx.html.*
import kotlinx.html.stream.createHTML import kotlinx.html.stream.createHTML
import kotlin.test.Test import kotlin.test.Test

View File

@ -4,6 +4,7 @@ import hep.dataforge.meta.Config
import hep.dataforge.meta.DFExperimental import hep.dataforge.meta.DFExperimental
import hep.dataforge.vision.VisionBase import hep.dataforge.vision.VisionBase
import hep.dataforge.vision.html.VisionOutput import hep.dataforge.vision.html.VisionOutput
import kotlinx.serialization.Serializable
import kscience.plotly.Plot import kscience.plotly.Plot
import kscience.plotly.Plotly import kscience.plotly.Plotly

View File

@ -4,6 +4,7 @@ import hep.dataforge.meta.Meta
import hep.dataforge.meta.MetaBuilder import hep.dataforge.meta.MetaBuilder
import hep.dataforge.meta.double import hep.dataforge.meta.double
import hep.dataforge.meta.get import hep.dataforge.meta.get
import kotlinx.serialization.Serializable
import kotlin.math.PI import kotlin.math.PI
public const val PI2: Float = 2 * PI.toFloat() public const val PI2: Float = 2 * PI.toFloat()

View File

@ -1,5 +1,7 @@
package hep.dataforge.vision.solid.three 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.Name
import hep.dataforge.names.plus import hep.dataforge.names.plus
import hep.dataforge.names.toName import hep.dataforge.names.toName
@ -180,7 +182,7 @@ public class ThreeCanvas(
} }
private fun addControls(element: Node, controls: Controls) { private fun addControls(element: Node, controls: Controls) {
when (controls.get("type").string) { when (controls["type"].string) {
"trackball" -> TrackballControls(camera, element) "trackball" -> TrackballControls(camera, element)
else -> OrbitControls(camera, element) else -> OrbitControls(camera, element)
} }

View File

@ -11,6 +11,8 @@ import hep.dataforge.vision.solid.specifications.Canvas3DOptions
import hep.dataforge.vision.visible import hep.dataforge.vision.visible
import info.laht.threekt.core.Object3D import info.laht.threekt.core.Object3D
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import org.w3c.dom.Element import org.w3c.dom.Element
import org.w3c.dom.HTMLElement import org.w3c.dom.HTMLElement
import kotlin.collections.set import kotlin.collections.set
@ -154,7 +156,7 @@ public class ThreePlugin : AbstractPlugin(), ElementVisionRenderer {
* Ensure that [ThreePlugin] is loaded in the global [VisionForge] context * Ensure that [ThreePlugin] is loaded in the global [VisionForge] context
*/ */
@JsExport @JsExport
public fun loadThreeJs(){ public fun loadThreeJs() {
VisionForge.plugins.fetch(ThreePlugin) VisionForge.plugins.fetch(ThreePlugin)
} }