renderer

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBackground

func WithBackground(c color.Color) func(*DrawOption)

Set the background color

func WithHidden

func WithHidden() func(*DrawOption)

Prevent rendering to the final screen

func WithPosition

func WithPosition(x, y float64) func(*DrawOption)

Set the position

func WithScale

func WithScale(scale float64) func(*DrawOption)

Set the scale

Types

type DrawOption

type DrawOption struct {
	// contains filtered or unexported fields
}

Options for drawing

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer(model *cubism.Model) (r *Renderer, err error)

Constructor for the Renderer struct

func (*Renderer) Draw

func (r *Renderer) Draw(screen *ebiten.Image, opts ...func(*DrawOption))

Draw the renderer

func (*Renderer) GetModel

func (r *Renderer) GetModel() *cubism.Model

Get the model set in the renderer

func (*Renderer) IsHit

func (r *Renderer) IsHit(x, y int, id string) (hit bool, err error)

Perform collision detection

func (*Renderer) Update

func (r *Renderer) Update() error

Update the renderer

Jump to

Keyboard shortcuts

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