Remove global VisionForge object

This commit is contained in:
Alexander Nozik 2021-05-05 22:53:11 +03:00
parent 8a41f185de
commit 3a87e43483
2 changed files with 3 additions and 3 deletions

View File

@ -16,14 +16,13 @@ allprojects {
mavenCentral() mavenCentral()
jcenter() jcenter()
maven("https://repo.kotlin.link") maven("https://repo.kotlin.link")
maven("https://dl.bintray.com/pdvrieze/maven")
maven("https://maven.jzy3d.org/releases") maven("https://maven.jzy3d.org/releases")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers") maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers")
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
} }
group = "space.kscience" group = "space.kscience"
version = "0.2.0-dev-15" version = "0.2.0-dev-16"
} }
subprojects { subprojects {

View File

@ -4,6 +4,7 @@ import javafx.collections.FXCollections
import javafx.scene.Parent import javafx.scene.Parent
import javafx.scene.control.Tab import javafx.scene.control.Tab
import space.kscience.dataforge.context.Global import space.kscience.dataforge.context.Global
import space.kscience.dataforge.context.fetch
import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.Meta
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.visionforge.VisionLayout import space.kscience.visionforge.VisionLayout
@ -23,7 +24,7 @@ class FXDemoGrid : View(title = "DataForge-vis FX demo"), VisionLayout<Solid> {
} }
} }
private val fx3d = Global.plugins.fetch(FX3DPlugin) private val fx3d = Global.fetch(FX3DPlugin)
override fun render(name: Name, vision: Solid, meta: Meta) { override fun render(name: Name, vision: Solid, meta: Meta) {
outputs.getOrPut(name) { FXCanvas3D(fx3d, canvasOptions) }.render(vision) outputs.getOrPut(name) { FXCanvas3D(fx3d, canvasOptions) }.render(vision)