visionforge/demo/playground/src/jvmMain/kotlin/gdmlIaxo.kt

24 lines
859 B
Kotlin
Raw Normal View History

2021-03-07 16:19:43 +03:00
package space.kscience.visionforge.examples
2021-03-04 09:47:41 +03:00
2021-03-07 16:19:43 +03:00
import space.kscience.dataforge.misc.DFExperimental
2021-03-04 09:47:41 +03:00
import space.kscience.gdml.Gdml
import space.kscience.gdml.LUnit
import space.kscience.gdml.decodeFromStream
2021-03-07 16:19:43 +03:00
import space.kscience.visionforge.VisionForge
import space.kscience.visionforge.gdml.toVision
import space.kscience.visionforge.html.ResourceLocation
import space.kscience.visionforge.html.fragment
import space.kscience.visionforge.invoke
import space.kscience.visionforge.solid.Solids
2021-03-04 09:47:41 +03:00
@DFExperimental
fun main() = VisionForge(Solids) {
val content = VisionForge.fragment {
vision("canvas") {
Gdml.decodeFromStream(Gdml.javaClass.getResourceAsStream("/gdml/babyIAXO.gdml")!!, true).toVision {
lUnit = LUnit.MM
}
}
}
makeVisionFile(content, resourceLocation = ResourceLocation.EMBED)
}