renderer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 8 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)

背景色を設定する

func WithHidden

func WithHidden() func(*DrawOption)

最終的なscreenに対する描画を行わないようにする

func WithPosition

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

位置を設定する

func WithScale

func WithScale(scale float64) func(*DrawOption)

スケールを設定する

Types

type DrawOption

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

描画オプション

type Renderer

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

func NewRenderer

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

新しいレンダラを作成する

func (*Renderer) Draw

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

描画する

func (*Renderer) GetModel

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

レンダラに設定されているモデルを取得する

func (*Renderer) IsHit

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

当たり判定を行う

func (*Renderer) Update

func (r *Renderer) Update() error

レンダラを更新する

Jump to

Keyboard shortcuts

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