[orx-mesh-generators] Comment extrude demos

Remove deprecated use of Random.
This commit is contained in:
Abe Pazos
2025-08-28 11:45:20 +02:00
parent c8e02bfb1c
commit a4079327dd
6 changed files with 73 additions and 14 deletions

View File

@@ -6,7 +6,7 @@ import org.openrndr.draw.shadeStyle
import org.openrndr.extra.camera.Orbital
import org.openrndr.extra.meshgenerators.buildTriangleMesh
import org.openrndr.extra.meshgenerators.extrudeContourStepsScaled
import org.openrndr.extra.noise.Random
import org.openrndr.extra.noise.simplex
import org.openrndr.math.Vector3
import org.openrndr.shape.Circle
import org.openrndr.shape.Path3D
@@ -15,7 +15,15 @@ import kotlin.math.PI
import kotlin.math.cos
/**
* Extruded Bézier tubes grown on a morphing Bézier surface.
* A series of 3D Bézier tubes grown on an animated,
* morphing, invisible Bézier surface.
*
* This variation uses [extrudeContourStepsScaled] to
* apply a varying scaling to the cross-sections,
* making the ends shrink to a hairline.
*
* Calls `destroy` on the [org.openrndr.draw.VertexBuffer]
* on every animation frame to free the used memory.
*
*/
fun main() = application {
@@ -43,7 +51,7 @@ fun main() = application {
val m = buildTriangleMesh {
val beziers = List(4) { curveId ->
val n = List(12) {
Random.simplex(it * 7.387, curveId * 5.531 + seconds * 0.05) * 10.0
simplex(7453, it * 7.387, curveId * 5.531 + seconds * 0.05) * 10.0
}
Segment3D(
Vector3(n[0], n[1], n[2]),