Skip to content

aidencompsci/kamera

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc

Kamera

Camera package for Ebitengine.

import "github.com/setanarut/kamera/v2"

Features

  • Camera trauma shake effect with Opensimplex noise
  • Lerp motion
  • Rotate/Zoom

Example

Run example on your local machine

go run github.com/setanarut/kamera/v2/examples/demo@latest

Usage

A pseudo code:

func (g *Game) Update() error {
    g.MainCamera.LookAt(player.X, player.Y)
 }
func (g *Game) Draw(screen *ebiten.Image) {
    // Apply all world-space `DrawImageOptions.GeoM` transformations before `Camera.Draw()`
    g.MainCamera.Draw(playerImage, playerDrawImageOptions, screen)
 }

See the ./examples/demo/main.go for a real working code example.

About

Camera package for Ebitengine v2

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%