melonfunction / ebiten-camera Goto Github PK
View Code? Open in Web Editor NEWSimple camera for ebiten
License: MIT License
Simple camera for ebiten
License: MIT License
Is there a reason why GetTranslation
automatically centers the GeoM
coordinates?
Lines 92 to 97 in 695003d
*ebiten.DrawImageOptions
must belong to the camera. The ebiten.FilterLinear
option is inaccessible.
Line 121 in 695003d
v2.6.3 compatible enhanced version can be like this:
// Blit draws the camera's surface to the screen and applies zoom
func (c *Camera) Blit(screen *ebiten.Image) {
centerX := float64(c.Width) / 2.0
centerY := float64(c.Height) / 2.0
c.CamDrawOps.GeoM.Reset()
c.CamDrawOps.GeoM.Translate(-centerX, -centerY)
c.CamDrawOps.GeoM.Scale(c.Scale, c.Scale)
c.CamDrawOps.GeoM.Rotate(c.Rot)
c.CamDrawOps.GeoM.Translate(centerX*c.Scale, centerY*c.Scale)
screen.DrawImage(c.Surface, c.CamDrawOps)
}
All settings are now accessible., for example:
game.MyCamera.CamDrawOps.Filter = ebiten.FilterNearest
Would this be compatible with Gohan?
Got this error when running go mod tidy
:
go: github.com/MatusOllah/gophengine/internal/state/mainmenu imports
github.com/MelonFunction/ebiten-camera: github.com/MelonFunction/[email protected]: parsing go.mod:
module declares its path as: github.com/melonfunction/ebiten-camera
but was required as: github.com/MelonFunction/ebiten-camera
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.