Version: v0.0.0-...-544bd7e Latest Latest

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

Go to latest
Published: Feb 26, 2016 License: BSD-2-Clause Imports: 4 Imported by: 0


Zoom Demo

What does it do?

It demonstrates how one can zoom in/out, by using the mouse wheel.

For doing so, it created a green background. This way, you'll notice the zooming.

What are important aspects of the code?

These lines are key in this demo:

// Scroll is called whenever the mouse wheel scrolls
func (game *Game) Scroll(amount float32) {
	// Adding this line, allows for zooming on scrolling the mouse wheel
	engi.Mailbox.Dispatch(engi.CameraMessage{Axis: engi.ZAxis, Value: amount * zoomSpeed, Incremental: true})


The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL