Fixed default theme border to thick, fixed BoundingBox#point? order dependent

This commit is contained in:
2019-10-01 14:57:17 -05:00
parent b25f76e124
commit ae44083cf2
2 changed files with 11 additions and 5 deletions

View File

@@ -68,11 +68,17 @@ module CyberarmEngine
other.max.x <= max.x && other.max.y <= max.y && other.max.z <= max.z
end
# returns whether the vector is inside of the bounding box
# returns whether the 3D vector is inside of the bounding box
def inside?(vector)
(vector.x.between?(@min.x, @max.x) || vector.x.between?(@max.x, @min.x)) &&
(vector.y.between?(@min.y, @max.y) || vector.y.between?(@max.y, @min.y)) &&
(vector.z.between?(@min.z, @max.z) || vector.z.between?(@max.z, @min.z))
end
# returns whether the 2D vector is inside of the bounding box
def point?(vector)
vector.x.between?(@min.x, @max.x) &&
vector.y.between?(@min.y, @max.y) &&
vector.z.between?(@min.z, @max.z)
(vector.x.between?(@min.x, @max.x) || vector.x.between?(@max.x, @min.x)) &&
(vector.y.between?(@min.y, @max.y) || vector.y.between?(@max.y, @min.y))
end
def volume

View File

@@ -65,7 +65,7 @@ module CyberarmEngine
Button: { # < Label
margin: 1,
padding: 4,
border_thickness: 4,
border_thickness: 1,
border_color: ["ffd59674".hex, "ffff8746".hex],
border_radius: 0,
background: ["ffc75e61".to_i(16), "ffe26623".to_i(16)],