[orx-dnk3] Fix demos

This commit is contained in:
Edwin Jakobs
2023-04-04 23:33:25 +02:00
parent 16455b9069
commit daf9c75bb3
17 changed files with 92 additions and 283 deletions

View File

@@ -1,6 +1,5 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extensions.SingleScreenshot
import org.openrndr.extra.dnk3.*
import org.openrndr.extra.dnk3.gltf.buildSceneNodes
@@ -18,12 +17,6 @@ fun main() = application {
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val gltf = loadGltfFromFile(File("demo-data/gltf-models/duck/Duck.gltf"))
val scene = Scene(SceneNode())
@@ -38,7 +31,7 @@ fun main() = application {
scene.root.entities.add(HemisphereLight().apply {
upColor = ColorRGBa.WHITE.shade(1.0)
downColor = ColorRGBa.WHITE.shade(0.1)
})
})
scene.root.children.add(lightNode)
scene.root.children.addAll(gltf.buildSceneNodes().scenes.first())