Change Log
Added
// Right returns the right edge position of the camera in world-space.
func (cam *Camera) Right() float64 {
return cam.TopLeftX + cam.w
}
// Bottom returns the bottom edge position of the camera in world-space.
func (cam *Camera) Bottom() float64 {
return cam.TopLeftY + cam.h
}
// SetTopLeft sets top-left position of the camera in world-space.
//
// Unlike the LookAt() method, the position is set directly without any smoothing.
//
// Useful for static cameras.
func (cam *Camera) SetTopLeft(x, y float64) {
cam.TopLeftX, cam.TopLeftY = x, y
}
Changed
cam.topLeftX
and cam.topLeftY
are now exported.
cam.topLeftX -> cam.TopLeftX
cam.topLeftY -> cam.TopLeftY