Removed box serialial unmarshaling def

This commit is contained in:
Edward R. Gonzalez 2024-03-05 10:41:11 -05:00
parent eb66f5c70d
commit 898f359470

View File

@ -21,18 +21,3 @@ color_json_unmarshal :: proc( value : ^ json.Value ) -> Color {
a := u8(json_color[3].(json.Float))
return { r, g, b, a }
}
box_json_unmarshal :: proc( value : ^ json.Value ) -> Box2 {
object := value.(json.Object)
json_pos := object["position"].(json.Array)
position := Vec2 { f32(json_pos[0].(json.Float)), f32(json_pos[1].(json.Float)) }
width := f32( object["width"] .(json.Float))
height := f32( object["height"].(json.Float))
return {
position = position,
extent = { width, height },
color = color_json_unmarshal( & object["color"] ),
},
}