2021-01-12 12:52:22 +03:00
|
|
|
package hep.dataforge.vision.examples
|
|
|
|
|
|
|
|
import hep.dataforge.meta.DFExperimental
|
|
|
|
import hep.dataforge.vision.VisionForge
|
|
|
|
import hep.dataforge.vision.VisionManager
|
|
|
|
import hep.dataforge.vision.html.ResourceLocation
|
|
|
|
import hep.dataforge.vision.html.fragment
|
|
|
|
import hep.dataforge.vision.solid.box
|
|
|
|
import hep.dataforge.vision.solid.solid
|
2021-01-12 13:25:43 +03:00
|
|
|
import hep.dataforge.vision.solid.withSolids
|
2021-01-12 12:52:22 +03:00
|
|
|
|
|
|
|
@OptIn(DFExperimental::class)
|
|
|
|
fun main() {
|
|
|
|
val content = VisionManager.fragment {
|
|
|
|
vision("canvas") {
|
|
|
|
solid {
|
|
|
|
box(100, 100, 100)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-12 13:25:43 +03:00
|
|
|
VisionForge.withSolids().makeVisionFile(content, resourceLocation = ResourceLocation.SYSTEM)
|
2021-01-12 12:52:22 +03:00
|
|
|
}
|