Bump OPENRNDR to 0.3.35-rc1
Bump Kotlin to 1.3.41 Bump kotlinx-coroutines-core to 1.3.0-RC Fix OPENRNDR 0.3.35-rc1 incompatibilities
This commit is contained in:
@@ -4,7 +4,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group 'org.openrndr.extra'
|
group 'org.openrndr.extra'
|
||||||
version '0.0.29'
|
version '0.0.30'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -13,7 +13,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
openrndrVersion = "0.3.34-rc2"
|
openrndrVersion = "0.3.35-rc1"
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
@@ -33,7 +33,7 @@ subprojects {
|
|||||||
compile "org.openrndr:openrndr-core:$openrndrVersion"
|
compile "org.openrndr:openrndr-core:$openrndrVersion"
|
||||||
compile "org.openrndr:openrndr-filter:$openrndrVersion"
|
compile "org.openrndr:openrndr-filter:$openrndrVersion"
|
||||||
compile "org.openrndr:openrndr-shape:$openrndrVersion"
|
compile "org.openrndr:openrndr-shape:$openrndrVersion"
|
||||||
compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.0.1'
|
compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.3.0-RC'
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.openrndr.extras.meshgenerators
|
package org.openrndr.extras.meshgenerators
|
||||||
|
|
||||||
|
import org.openrndr.math.Matrix44
|
||||||
import org.openrndr.math.Vector2
|
import org.openrndr.math.Vector2
|
||||||
import org.openrndr.math.Vector3
|
import org.openrndr.math.Vector3
|
||||||
import org.openrndr.math.transforms.rotateY
|
import org.openrndr.math.transforms.rotateY
|
||||||
@@ -19,8 +20,8 @@ fun generateCap(sides: Int, radius: Double, enveloppe: List<Vector2> = listOf(Ve
|
|||||||
val baseNormals = normals2D.map { Vector3(it.x, it.y, 0.0) }
|
val baseNormals = normals2D.map { Vector3(it.x, it.y, 0.0) }
|
||||||
|
|
||||||
for (side in 0 until sides) {
|
for (side in 0 until sides) {
|
||||||
val r0 = rotateY(360.0 / sides * side)
|
val r0 = Matrix44.rotateY(360.0 / sides * side)
|
||||||
val r1 = rotateY(360.0 / sides * (side + 1))
|
val r1 = Matrix44.rotateY(360.0 / sides * (side + 1))
|
||||||
|
|
||||||
val v0 = basePositions.map { (r0 * it.xyz0).xyz }
|
val v0 = basePositions.map { (r0 * it.xyz0).xyz }
|
||||||
val v1 = basePositions.map { (r1 * it.xyz0).xyz }
|
val v1 = basePositions.map { (r1 * it.xyz0).xyz }
|
||||||
@@ -62,16 +63,12 @@ fun generateRevolve(sides: Int, length: Double, enveloppe: List<Vector2> = listO
|
|||||||
|
|
||||||
val extended = listOf(normals2D[0]) + normals2D + normals2D[normals2D.size-1]
|
val extended = listOf(normals2D[0]) + normals2D + normals2D[normals2D.size-1]
|
||||||
|
|
||||||
// extended.zipW
|
|
||||||
|
|
||||||
println(normals2D.joinToString(", "))
|
|
||||||
|
|
||||||
val basePositions = cleanEnveloppe.map { Vector3(it.x, it.y, 0.0) }
|
val basePositions = cleanEnveloppe.map { Vector3(it.x, it.y, 0.0) }
|
||||||
val baseNormals = normals2D.map { Vector3(it.x, it.y, 0.0) }
|
val baseNormals = normals2D.map { Vector3(it.x, it.y, 0.0) }
|
||||||
|
|
||||||
for (side in 0 until sides) {
|
for (side in 0 until sides) {
|
||||||
val r0 = rotateY(360.0 / sides * side)
|
val r0 = Matrix44.rotateY(360.0 / sides * side)
|
||||||
val r1 = rotateY(360.0 / sides * (side + 1))
|
val r1 = Matrix44.rotateY(360.0 / sides * (side + 1))
|
||||||
|
|
||||||
val v0 = basePositions.map { (r0 * it.xyz0).xyz }
|
val v0 = basePositions.map { (r0 * it.xyz0).xyz }
|
||||||
val v1 = basePositions.map { (r1 * it.xyz0).xyz }
|
val v1 = basePositions.map { (r1 * it.xyz0).xyz }
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.openrndr.extras.meshgenerators
|
package org.openrndr.extras.meshgenerators
|
||||||
|
|
||||||
import org.openrndr.draw.VertexBuffer
|
import org.openrndr.draw.VertexBuffer
|
||||||
|
import org.openrndr.math.Matrix44
|
||||||
import org.openrndr.math.Vector2
|
import org.openrndr.math.Vector2
|
||||||
import org.openrndr.math.Vector3
|
import org.openrndr.math.Vector3
|
||||||
import org.openrndr.math.mix
|
import org.openrndr.math.mix
|
||||||
@@ -56,8 +57,8 @@ fun generateTaperedCylinder(sides: Int, segments: Int, radiusStart: Double, radi
|
|||||||
val v1 = (side + 1.0) / sides
|
val v1 = (side + 1.0) / sides
|
||||||
|
|
||||||
|
|
||||||
val n0 = (rotateZ(side * ddeg) * baseNormal.xyz0).xyz.normalized * invertFactor
|
val n0 = (Matrix44.rotateZ(side * ddeg) * baseNormal.xyz0).xyz.normalized * invertFactor
|
||||||
val n1 = (rotateZ((side+1) * ddeg) * baseNormal.xyz0).xyz.normalized * invertFactor
|
val n1 = (Matrix44.rotateZ((side+1) * ddeg) * baseNormal.xyz0).xyz.normalized * invertFactor
|
||||||
|
|
||||||
|
|
||||||
if (!invert) {
|
if (!invert) {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ fun GeneratorBuffer.twist(degreesPerUnit: Double, start: Double, axis: Vector3 =
|
|||||||
val p = it.position.projectedOn(axis)
|
val p = it.position.projectedOn(axis)
|
||||||
val t = if (axis.x != 0.0) p.x / axis.x else if (axis.y != 0.0) p.y / axis.y else if (axis.z != 0.0) p.z / axis.z else
|
val t = if (axis.x != 0.0) p.x / axis.x else if (axis.y != 0.0) p.y / axis.y else if (axis.z != 0.0) p.z / axis.z else
|
||||||
throw IllegalArgumentException("0 axis")
|
throw IllegalArgumentException("0 axis")
|
||||||
val r = rotate(axis, t * degreesPerUnit)
|
val r = Matrix44.rotate(axis, t * degreesPerUnit)
|
||||||
GeneratorBuffer.VertexData((r * it.position.xyz1).xyz, (r * it.normal.xyz0).xyz, it.texCoord)
|
GeneratorBuffer.VertexData((r * it.position.xyz1).xyz, (r * it.normal.xyz0).xyz, it.texCoord)
|
||||||
}.toMutableList()
|
}.toMutableList()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile project(":orx-file-watcher")
|
compile project(":orx-file-watcher")
|
||||||
compile "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.31"
|
compile "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.41"
|
||||||
compile "org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.31"
|
compile "org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.41"
|
||||||
compile "org.jetbrains.kotlin:kotlin-script-runtime:1.3.31"
|
compile "org.jetbrains.kotlin:kotlin-script-runtime:1.3.41"
|
||||||
compile "org.jetbrains.kotlin:kotlin-script-util:1.3.31"
|
compile "org.jetbrains.kotlin:kotlin-script-util:1.3.41"
|
||||||
compile "org.jetbrains.kotlin:kotlin-scripting-compiler:1.3.31"
|
compile "org.jetbrains.kotlin:kotlin-scripting-compiler:1.3.41"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user