Fixes and move to jvmDemo (#286)

This commit is contained in:
Vechro
2023-01-15 16:27:19 +02:00
committed by GitHub
parent e27f7eb4cb
commit 47d4293a57
117 changed files with 75 additions and 310 deletions

View File

@@ -0,0 +1,37 @@
import org.openrndr.WindowMultisample
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.DrawPrimitive
import org.openrndr.draw.shadeStyle
import org.openrndr.extra.camera.*
import org.openrndr.extra.gui.GUI
import org.openrndr.extra.gui.addTo
import org.openrndr.extra.meshgenerators.boxMesh
import org.openrndr.extra.meshgenerators.sphereMesh
import org.openrndr.math.Vector3
fun main() = application {
configure {
multisample = WindowMultisample.SampleCount(8)
}
program {
val gui = GUI()
val po = ParametricOrbital()
po.addTo(gui)
extend(gui)
extend(po)
val bm = boxMesh()
extend {
drawer.clear(ColorRGBa.PINK)
drawer.shadeStyle = shadeStyle {
fragmentTransform = """
vec3 n = normalize(v_viewNormal) * 0.5 + 0.5;
x_fill = vec4(n, 1.0);
""".trimIndent()
}
drawer.vertexBuffer(bm, DrawPrimitive.TRIANGLES)
}
}
}