SceneGraph but DOM
Find a file
eater 7fc4b44571
Some checks failed
continuous-integration/drone/push Build is failing
add gl and example
2020-05-24 19:19:01 +02:00
gradle/wrapper Initial commit 2020-05-17 13:49:57 +02:00
script Initial commit 2020-05-17 13:49:57 +02:00
threedom add gl and example 2020-05-24 19:19:01 +02:00
threedom-example add gl and example 2020-05-24 19:19:01 +02:00
threedom-gl add gl and example 2020-05-24 19:19:01 +02:00
threedom-kapt add gl and example 2020-05-24 19:19:01 +02:00
tools add gl and example 2020-05-24 19:19:01 +02:00
.drone.yml trigger 2020-05-17 14:07:34 +02:00
.gitignore Initial commit 2020-05-17 13:49:57 +02:00
build.gradle Initial commit 2020-05-17 13:49:57 +02:00
gradle.properties Initial commit 2020-05-17 13:49:57 +02:00
gradlew Initial commit 2020-05-17 13:49:57 +02:00
gradlew.bat Initial commit 2020-05-17 13:49:57 +02:00
README.md small fixes 2020-05-17 18:17:54 +02:00
settings.gradle add gl and example 2020-05-24 19:19:01 +02:00

3DOM

A SceneGraph written as if it's a DOM

fun main() {
    val doc = Document()
    val node = doc.createNode<PlainNode>()
    node.model { setTranslation(10, 30, 3) }
    
    doc.on<DOMTreeUpdate.Insert> { (ev) ->
        println("Node has been added at ${ev.absolute.translation}")
    }

    doc.addNode(node)

    doc.inRange(Vector3d(0, 0, 0), 50).forEach {
        println("Node found at ${it.absolute.translation}")
    }
}