Documentation
¶
Index ¶
- Constants
- type Camera
- func (camera *Camera) Center(x int, y int)
- func (camera *Camera) GetAnimatedZoom() float64
- func (camera *Camera) GetOffsetX() float64
- func (camera *Camera) GetOffsetY() float64
- func (camera *Camera) GetTileBounds() (int, int, int, int)
- func (camera *Camera) GetX() int
- func (camera *Camera) GetY() int
- func (camera *Camera) GetZoom() float64
- func (camera *Camera) GetZoomedMaxY() float64
- func (camera *Camera) GetZoomedX() float64
- func (camera *Camera) GetZoomedY() float64
- func (camera *Camera) Move(dx int, dy int)
- func (camera *Camera) SetOffset(x float64, y float64)
- func (camera Camera) UpdateSize(sizeX int, sizeY int) Camera
Constants ¶
View Source
const ZoomDefault = 10
View Source
const ZoomMax = 10
View Source
const ZoomMin = 3
View Source
const ZoomStep = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Camera ¶
type Camera struct { // tile coordinates X int Y int // fractional tile coordinates DX float64 DY float64 Zoom int AnimatedZoom float64 SizeX int SizeY int }
func MakeCamera ¶
func MakeCamera() Camera
func MakeCameraAt ¶
func (*Camera) GetAnimatedZoom ¶
func (*Camera) GetOffsetX ¶
func (*Camera) GetOffsetY ¶
func (*Camera) GetTileBounds ¶
return the bounds of a rectangle upper left (x1, y1) and lower right (x2, y2) all tiles within these bounds are visible, with some margin of error to account for edges
func (*Camera) GetZoomedMaxY ¶
func (*Camera) GetZoomedX ¶
func (*Camera) GetZoomedY ¶
Click to show internal directories.
Click to hide internal directories.