diff --git a/README.md b/README.md index 7a9bff0a..67708fac 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A growing library of assorted data structures, algorithms and utilities. - [`orx-obj-loader`](orx-obj-loader/README.md), simple Wavefront .obj mesh loader ## Usage -ORX 0.0.16 is built against OPENRNDR 0.3.30, make sure you use this version in your project. Because OPENRNDR's API is pre 1.0 it tends to change from time to time. +ORX 0.0.18 is built against OPENRNDR 0.3.32, make sure you use this version in your project. Because OPENRNDR's API is pre 1.0 it tends to change from time to time. The easiest way to add ORX to your project is through the use of Jitpack. [Jitpack](http://jitpack.io) is a service that pulls Gradle based libraries from Github, builds them and serves the jar files. @@ -30,13 +30,13 @@ repositories { You can then add any of the ORX artefacts to your `dependencies {}`: ``` dependencies { - compile 'com.github.openrndr.orx::v0.0.16' + compile 'com.github.openrndr.orx::v0.0.18' } ``` For example if you want to use the `orx-no-clear` artifact one would use: ``` dependencies { - compile 'com.github.openrndr.orx:orx-no-clear:v0.0.16' + compile 'com.github.openrndr.orx:orx-no-clear:v0.0.18' } ``` diff --git a/build.gradle b/build.gradle index 395c0574..7e5d964c 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { allprojects { group 'org.openrndr.extra' - version '0.0.16' + version '0.0.18' } repositories { @@ -13,7 +13,7 @@ repositories { } ext { - openrndrVersion = "0.3.30" + openrndrVersion = "0.3.32-rc1" } subprojects { diff --git a/orx-jumpflood/src/main/kotlin/JumpFlood.kt b/orx-jumpflood/src/main/kotlin/JumpFlood.kt index b1104d9d..41a978f6 100644 --- a/orx-jumpflood/src/main/kotlin/JumpFlood.kt +++ b/orx-jumpflood/src/main/kotlin/JumpFlood.kt @@ -2,7 +2,6 @@ package org.openrndr.extra.jumpfill import org.openrndr.color.ColorRGBa import org.openrndr.draw.* -import org.openrndr.filter.filterShaderFromUrl import org.openrndr.math.Matrix44 import org.openrndr.math.Vector2 import org.openrndr.resourceUrl diff --git a/orx-mesh-generators/src/main/kotlin/Box.kt b/orx-mesh-generators/src/main/kotlin/Box.kt index 12c9017f..4463ec93 100644 --- a/orx-mesh-generators/src/main/kotlin/Box.kt +++ b/orx-mesh-generators/src/main/kotlin/Box.kt @@ -26,13 +26,13 @@ fun generateBox(width: Double = 1.0, height: Double = 1.0, depth: Double = 1.0, // +x -- ZY generatePlane(Vector3(width / 2.0 * sign, 0.0, 0.0), Vector3.UNIT_Z, Vector3.UNIT_Y, Vector3.UNIT_X, - depth, height, + -depth, -height, depthSegments, heightSegments, writer) // -x -- ZY generatePlane(Vector3(-width / 2.0 * sign, 0.0, 0.0), Vector3.UNIT_Z, Vector3.UNIT_Y, -Vector3.UNIT_X, - depth, height, + -depth, height, depthSegments, heightSegments, writer) // +y -- XZ @@ -44,13 +44,13 @@ fun generateBox(width: Double = 1.0, height: Double = 1.0, depth: Double = 1.0, // -y -- XZ generatePlane(Vector3(0.0, -height / 2.0 * sign, 0.0), Vector3.UNIT_X, Vector3.UNIT_Z, -Vector3.UNIT_Y, - width, depth, + width, -depth, widthSegments, depthSegments, writer) // +z -- XY generatePlane(Vector3(0.0, 0.0, depth / 2.0 * sign), Vector3.UNIT_X, Vector3.UNIT_Y, Vector3.UNIT_Z, - width, height, + -width, height, widthSegments, heightSegments, writer) // -z -- XY diff --git a/orx-mesh-generators/src/main/kotlin/Plane.kt b/orx-mesh-generators/src/main/kotlin/Plane.kt index 6f5942ed..50dbf4b9 100644 --- a/orx-mesh-generators/src/main/kotlin/Plane.kt +++ b/orx-mesh-generators/src/main/kotlin/Plane.kt @@ -9,7 +9,7 @@ fun planeMesh(center: Vector3, forward: Vector3, up: Vector3 = forward.cross(right).normalized, width: Double = 1.0, height: Double = 1.0, - widthSegments: Int = 1, heightSegments: Int = 2): VertexBuffer { + widthSegments: Int = 1, heightSegments: Int = 1): VertexBuffer { val vertexCount = (widthSegments * heightSegments) * 6 val vb = meshVertexBuffer(vertexCount) @@ -72,13 +72,13 @@ fun generatePlane(center: Vector3, val c10 = corner + forwardStep * v.toDouble() + rightStep * (u + 1).toDouble() val c11 = corner + forwardStep * (v + 1).toDouble() + rightStep * (u + 1).toDouble() - writer(c00, up, uv00) + writer(c11, up, uv00) writer(c10, up, uv10) - writer(c11, up, uv11) + writer(c00, up, uv11) - writer(c11, up, uv11) + writer(c00, up, uv11) writer(c01, up, uv01) - writer(c00, up, uv00) + writer(c11, up, uv00) } } } \ No newline at end of file diff --git a/orx-mesh-generators/src/main/kotlin/Sphere.kt b/orx-mesh-generators/src/main/kotlin/Sphere.kt index f17fd241..f2735343 100644 --- a/orx-mesh-generators/src/main/kotlin/Sphere.kt +++ b/orx-mesh-generators/src/main/kotlin/Sphere.kt @@ -33,17 +33,17 @@ fun generateSphere(sides: Int, segments: Int, radius: Double = 1.0, invert: Bool writer(st11.cartesian, st11.cartesian.normalized * inverter, Vector2(st11.phi / phiMax, st11.theta / thetaMax)) } segments - 1 -> { - writer(st00.cartesian, st00.cartesian.normalized * inverter, Vector2(st00.phi / phiMax, st00.theta / thetaMax)) - writer(st10.cartesian, st10.cartesian.normalized * inverter, Vector2(st10.phi / phiMax, st10.theta / thetaMax)) writer(st11.cartesian, st11.cartesian.normalized * inverter, Vector2(st11.phi / phiMax, st11.theta / thetaMax)) + writer(st10.cartesian, st10.cartesian.normalized * inverter, Vector2(st10.phi / phiMax, st10.theta / thetaMax)) + writer(st00.cartesian, st00.cartesian.normalized * inverter, Vector2(st00.phi / phiMax, st00.theta / thetaMax)) } else -> { writer(st00.cartesian, st00.cartesian.normalized * inverter, Vector2(st00.phi / phiMax, st00.theta / thetaMax)) - writer(st10.cartesian, st10.cartesian.normalized * inverter, Vector2(st10.phi / phiMax, st10.theta / thetaMax)) + writer(st01.cartesian, st01.cartesian.normalized * inverter, Vector2(st01.phi / phiMax, st01.theta / thetaMax)) writer(st11.cartesian, st11.cartesian.normalized * inverter, Vector2(st11.phi / phiMax, st11.theta / thetaMax)) writer(st11.cartesian, st11.cartesian.normalized * inverter, Vector2(st11.phi / phiMax, st11.theta / thetaMax)) - writer(st01.cartesian, st01.cartesian.normalized * inverter, Vector2(st01.phi / phiMax, st01.theta / thetaMax)) + writer(st10.cartesian, st10.cartesian.normalized * inverter, Vector2(st10.phi / phiMax, st10.theta / thetaMax)) writer(st00.cartesian, st00.cartesian.normalized * inverter, Vector2(st00.phi / phiMax, st00.theta / thetaMax)) } }