Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LimitedCamera ¶
type LimitedCamera struct {
// contains filtered or unexported fields
}
LimitedCamera is a camera implementation with ranged controls for zooming and moving.
func NewLimited ¶
func NewLimited(minZoom, maxZoom float32, minPos, maxPos float32) *LimitedCamera
NewLimited returns a new instance of a LimitedCamera.
func (*LimitedCamera) MoveBy ¶
func (cam *LimitedCamera) MoveBy(dx, dy float32)
MoveBy adjusts the requested view offset by given delta values in world coordinates.
func (*LimitedCamera) MoveTo ¶
func (cam *LimitedCamera) MoveTo(worldX, worldY float32)
MoveTo sets the requested view offset to the given world coordinates.
func (*LimitedCamera) SetViewportSize ¶
func (cam *LimitedCamera) SetViewportSize(width, height float32)
SetViewportSize notifies the camera how big the view is.
func (*LimitedCamera) ViewMatrix ¶
func (cam *LimitedCamera) ViewMatrix() *mgl.Mat4
ViewMatrix implements the Viewer interface.
func (*LimitedCamera) ZoomAt ¶
func (cam *LimitedCamera) ZoomAt(levelDelta float32, x, y float32)
ZoomAt adjusts the requested zoom level by given delta, centered around given world position. Positive values zoom in.
Click to show internal directories.
Click to hide internal directories.