SceneGraph but DOM
|
||
---|---|---|
gradle/wrapper | ||
script | ||
threedom | ||
threedom-example | ||
threedom-gl | ||
threedom-kapt | ||
tools | ||
.drone.yml | ||
.gitignore | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
README.md | ||
settings.gradle |
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}")
}
}