camera

package
v0.0.0-...-1ebc2e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CameraModeDefault = iota
	CameraModeCenter
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	Surface *ebiten.Image
	// contains filtered or unexported fields
}

Camera implements a basic camera following the idea from https://github.com/MelonFunction/ebiten-camera

func NewCamera

func NewCamera(w, h int) *Camera

func (*Camera) Draw

func (c *Camera) Draw(target *ebiten.Image)

func (*Camera) Move

func (c *Camera) Move(dest vector.Vec2d)

func (*Camera) SetMode

func (c *Camera) SetMode(mode CameraMode)

func (*Camera) SetZoom

func (c *Camera) SetZoom(zoom float64) *Camera

SetZoom sets the zoom

type CameraMode

type CameraMode int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL