end
# Center of the screen, from the point of view of the camera, at z = 0
- fun center: Point3d[Float] do return new Point3d[Float](position.x + width / 2.0, position.y + height / 2.0, 0.0)
+ fun center: Point3d[Float] do return new Point3d[Float](position.x + width / 2.0, position.y - height / 2.0, 0.0)
# Anchor in the top left corner of the screen, at z = 0
fun top_left: Point3d[Float] do return new Point3d[Float](position.x, position.y, 0.0)
fun top_right: Point3d[Float] do return new Point3d[Float](position.x + width, position.y, 0.0)
# Anchor in the bottom left corner of the screen, at z = 0
- fun bottom_left: Point3d[Float] do return new Point3d[Float](position.x, position.y + height, 0.0)
+ fun bottom_left: Point3d[Float] do return new Point3d[Float](position.x, position.y - height, 0.0)
# Anchor in the bottom right corner of the screen, at z = 0
- fun bottom_right: Point3d[Float] do return new Point3d[Float](position.x + width, position.y + height, 0.0)
+ fun bottom_right: Point3d[Float] do return new Point3d[Float](position.x + width, position.y - height, 0.0)
# TODO cache the anchors and the matrix
simple_2d_program.color.array_enabled = false
simple_2d_program.scale.array_enabled = false
- simple_2d_program.translation.uniform(center.x, -center.y, center.z, 0.0)
+ simple_2d_program.translation.uniform(center.x, center.y, center.z, 0.0)
simple_2d_program.color.uniform(tint[0], tint[1], tint[2], tint[3])
simple_2d_program.scale.uniform scale