diff --git a/visualizer-lib/src/main/kotlin/net/hareworks/hcu/visualizer/GeometryVisualizer.kt b/visualizer-lib/src/main/kotlin/net/hareworks/hcu/visualizer/GeometryVisualizer.kt index 948afcd..1993248 100644 --- a/visualizer-lib/src/main/kotlin/net/hareworks/hcu/visualizer/GeometryVisualizer.kt +++ b/visualizer-lib/src/main/kotlin/net/hareworks/hcu/visualizer/GeometryVisualizer.kt @@ -12,8 +12,8 @@ import kotlin.math.sqrt object GeometryVisualizer { - fun drawCuboid(player: Player, minX: Double, minY: Double, minZ: Double, maxX: Double, maxY: Double, maxZ: Double) { - val edgeColor = Particle.DustOptions(Color.fromRGB(100, 255, 100), 0.75f) + fun drawCuboid(player: Player, minX: Double, minY: Double, minZ: Double, maxX: Double, maxY: Double, maxZ: Double, color: Color = Color.fromRGB(100, 255, 100)) { + val edgeColor = Particle.DustOptions(color, 0.75f) val step = 0.5 // Bottom face edges @@ -35,12 +35,12 @@ object GeometryVisualizer { drawLine(player, minX, minY, maxZ, minX, maxY, maxZ, edgeColor, step) } - fun drawCylinder(player: Player, centerX: Double, centerY: Double, centerZ: Double, radius: Int, minY: Double, maxY: Double) { + fun drawCylinder(player: Player, centerX: Double, centerY: Double, centerZ: Double, radius: Int, minY: Double, maxY: Double, color: Color = Color.fromRGB(100, 200, 255)) { val actualRadius = radius + 0.5 val segments = 32 val step = (Math.PI * 2) / segments - val edgeColor = Particle.DustOptions(Color.fromRGB(100, 200, 255), 0.75f) + val edgeColor = Particle.DustOptions(color, 0.75f) // Bottom circle for (i in 0 until segments) {