components

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaskPosition = uint64(1 << 0)
	MaskSize     = uint64(1 << 1)
	MaskTexture  = uint64(1 << 2)
	MaskVelocity = uint64(1 << 3)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Position

type Position struct {
	X float32 `json:"x"`
	Y float32 `json:"y"`
}

func NewPosition

func NewPosition() *Position

func (*Position) Mask

func (a *Position) Mask() uint64

func (*Position) WithX

func (a *Position) WithX(x float32) *Position

func (*Position) WithY

func (a *Position) WithY(y float32) *Position

type Size

type Size struct {
	Width  float32 `json:"width"`
	Height float32 `json:"height"`
}

func NewSize

func NewSize() *Size

func (*Size) Mask

func (a *Size) Mask() uint64

func (*Size) WithHeight

func (a *Size) WithHeight(height float32) *Size

func (*Size) WithWidth

func (a *Size) WithWidth(width float32) *Size

type Texture

type Texture struct {
	Path    string `json:"path"`
	Visible bool   `json:"visible"`
	Tex     *rl.Texture2D
}

func NewTexture

func NewTexture() *Texture

func (*Texture) Mask

func (a *Texture) Mask() uint64

func (*Texture) WithPath

func (a *Texture) WithPath(path string) *Texture

func (*Texture) WithVisible

func (a *Texture) WithVisible(visible bool) *Texture

type Velocity

type Velocity struct {
	X float32 `json:"x"`
	Y float32 `json:"y"`
}

func NewVelocity

func NewVelocity() *Velocity

func (*Velocity) Mask

func (a *Velocity) Mask() uint64

func (*Velocity) WithX

func (a *Velocity) WithX(x float32) *Velocity

func (*Velocity) WithY

func (a *Velocity) WithY(y float32) *Velocity

Jump to

Keyboard shortcuts

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