Documentation
¶
Index ¶
- func GetAnimationFrame(sheet coldbrew.Sprite, anim client.AnimationData, frameIndex int, ...) *ebiten.Image
- func RenderBackground(backgroundSprite coldbrew.Sprite, position vector.Two, ...)
- func RenderEntity(position vector.Two, rotation float64, scale vector.Two, ...)
- func RenderEntityFromCursor(cursor *warehouse.Cursor, cam coldbrew.Camera, currentTick int)
- func RenderSprite(sprite coldbrew.Sprite, position vector.Two, rotation float64, ...)
- func RenderSpriteSheetAnimation(sheet coldbrew.Sprite, spriteBlueprint *client.SpriteBlueprint, index int, ...)
- func RenderTiles(sprite coldbrew.Sprite, blueprint *client.SpriteBlueprint, ...)
- type DebugRenderer
- type DefaultDialogueRenderSystem
- type GlobalRenderer
- type RenderItem
- type ShapeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAnimationFrame ¶
func GetAnimationFrame(sheet coldbrew.Sprite, anim client.AnimationData, frameIndex int, logger *slog.Logger) *ebiten.Image
GetAnimationFrame extracts a single frame from a sprite sheet based on animation data
func RenderBackground ¶
func RenderBackground( backgroundSprite coldbrew.Sprite, position vector.Two, bgConfig *client.ParallaxBackground, cam coldbrew.Camera, sceneWidth int, )
RenderBackground draws a parallax background with proper scrolling behavior
func RenderEntity ¶
func RenderEntity( position vector.Two, rotation float64, scale vector.Two, direction spatial.Direction, spr coldbrew.Sprite, blueprint *client.SpriteBlueprint, cam coldbrew.Camera, currentTick int, )
RenderEntity draws a single entity with all its transformations applied
func RenderEntityFromCursor ¶
RenderEntityFromCursor renders an entity directly from a warehouse cursor
func RenderSprite ¶
func RenderSprite( sprite coldbrew.Sprite, position vector.Two, rotation float64, scale vector.Two, offset vector.Two, direction spatial.Direction, static bool, cam coldbrew.Camera, )
RenderSprite draws a static sprite with transformations applied
func RenderSpriteSheetAnimation ¶
func RenderSpriteSheetAnimation( sheet coldbrew.Sprite, spriteBlueprint *client.SpriteBlueprint, index int, position vector.Two, rotation float64, scale vector.Two, direction spatial.Direction, offset vector.Two, static bool, cam coldbrew.Camera, tick int, logger *slog.Logger, cm *colorm.ColorM, )
RenderSpriteSheetAnimation draws an animated sprite with proper frame selection
Types ¶
type DebugRenderer ¶
type DebugRenderer struct{}
DebugRenderer visualizes physics and collisions for debugging purposes It operates independently from actual collision processing systems A messy expensive system...a temporary solution for now
type DefaultDialogueRenderSystem ¶
type DefaultDialogueRenderSystem struct {
FONT_FACE *text.GoTextFace
PORTRAIT_FONT_FACE *text.GoTextFace
PADDING_X int // TEXT PADDING_X
PADDING_Y int // TEXT PADDING Y
PORTRAIT_PADDING_X int
PORTRAIT_PADDING_Y int
PORTRAIT_TEXT_PADDING_X int
PORTRAIT_TEXT_PADDING_Y int
PORTRAIT_NAME_BOX_WIDTH float64
NEXT_INDICATOR_PADDING_X float64
NEXT_INDICATOR_PADDING_Y float64
NEXT_MIN_DELAY float64
NEXT_LAST_SHOWN float64
}
func (DefaultDialogueRenderSystem) Render ¶
func (sys DefaultDialogueRenderSystem) Render(scene coldbrew.Scene, screen coldbrew.Screen, cli coldbrew.LocalClient)
type GlobalRenderer ¶
type GlobalRenderer struct {
// contains filtered or unexported fields
}
GlobalRenderer is the default render system for the coldbrew package It automatically handles sprites, sprite sheets, tiles, and parallax backgrounds
type RenderItem ¶
type RenderItem struct {
// contains filtered or unexported fields
}
RenderItem contains all state needed for rendering an entity