feat: ビジュアライズのカラー

This commit is contained in:
Keisuke Hirata 2025-12-20 02:25:41 +09:00
parent 0f432b0e89
commit d256db9f51

View File

@ -12,8 +12,8 @@ import kotlin.math.sqrt
object GeometryVisualizer { object GeometryVisualizer {
fun drawCuboid(player: Player, minX: Double, minY: Double, minZ: Double, maxX: Double, maxY: Double, maxZ: Double) { 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.fromRGB(100, 255, 100), 0.75f) val edgeColor = Particle.DustOptions(color, 0.75f)
val step = 0.5 val step = 0.5
// Bottom face edges // Bottom face edges
@ -35,12 +35,12 @@ object GeometryVisualizer {
drawLine(player, minX, minY, maxZ, minX, maxY, maxZ, edgeColor, step) 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 actualRadius = radius + 0.5
val segments = 32 val segments = 32
val step = (Math.PI * 2) / segments 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 // Bottom circle
for (i in 0 until segments) { for (i in 0 until segments) {