v0.2.0-dev-22 #47
@ -43,7 +43,7 @@ internal class VisionForgePlayGroundForJupyter : JupyterIntegration() {
|
|||||||
}
|
}
|
||||||
script {
|
script {
|
||||||
type = "text/javascript"
|
type = "text/javascript"
|
||||||
unsafe { +"renderVisionsAt(\"$id\");" }
|
unsafe { +"window.renderVisionsAt(\"$id\");" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ internal class VisionForgePlayGroundForJupyter : JupyterIntegration() {
|
|||||||
"hep.dataforge.vision.solid.*"
|
"hep.dataforge.vision.solid.*"
|
||||||
)
|
)
|
||||||
|
|
||||||
import("hep.dataforge.vision.VisionForge")
|
import<VisionForge>()
|
||||||
|
|
||||||
render<Gdml> { gdmlModel ->
|
render<Gdml> { gdmlModel ->
|
||||||
val fragment = VisionForge.fragment {
|
val fragment = VisionForge.fragment {
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
|
import hep.dataforge.misc.DFExperimental
|
||||||
import hep.dataforge.vision.VisionForge
|
import hep.dataforge.vision.VisionForge
|
||||||
import hep.dataforge.vision.plotly.usePlotly
|
import hep.dataforge.vision.plotly.usePlotly
|
||||||
import hep.dataforge.vision.solid.three.useThreeJs
|
import hep.dataforge.vision.solid.three.useThreeJs
|
||||||
|
import kotlinx.browser.window
|
||||||
|
|
||||||
|
@DFExperimental
|
||||||
fun main(): Unit = VisionForge.run{
|
fun main(): Unit = VisionForge.run{
|
||||||
usePlotly()
|
usePlotly()
|
||||||
useThreeJs()
|
useThreeJs()
|
||||||
renderVisionsInWindow()
|
renderVisionsInWindow()
|
||||||
|
window.asDynamic()["renderVisionsAt"] = ::renderVisionsAt
|
||||||
|
window.asDynamic()["renderVisionsInWindow"] = ::renderVisionsInWindow
|
||||||
}
|
}
|
@ -43,17 +43,20 @@ public val VisionForge.visionClient: VisionClient
|
|||||||
get() = plugins.fetch(VisionClient)
|
get() = plugins.fetch(VisionClient)
|
||||||
|
|
||||||
|
|
||||||
|
///**
|
||||||
/**
|
// * Render all visions in this [window] using current global state of [VisionForge]
|
||||||
* Render all visions in this [window] using current global state of [VisionForge]
|
// */
|
||||||
*/
|
//@DFExperimental
|
||||||
@DFExperimental
|
//@JsExport
|
||||||
@JsExport
|
//public fun renderVisionsInWindow(): Unit {
|
||||||
public fun renderVisionsInWindow(): Unit = VisionForge.renderVisionsInWindow()
|
// VisionForge.renderVisionsInWindow()
|
||||||
|
//}
|
||||||
/**
|
//
|
||||||
* Render all visions in an element with a given [id]
|
///**
|
||||||
*/
|
// * Render all visions in an element with a given [id]
|
||||||
@DFExperimental
|
// */
|
||||||
@JsExport
|
//@DFExperimental
|
||||||
public fun renderVisionsAt(id: String): Unit = VisionForge.renderVisionsAt(id)
|
//@JsExport
|
||||||
|
//public fun renderVisionsAt(id: String): Unit {
|
||||||
|
// VisionForge.renderVisionsAt(id)
|
||||||
|
//}
|
Loading…
Reference in New Issue
Block a user