keid-render-basic-0.1.9.0: Basic rendering programs for Keid engine.
Safe HaskellSafe-Inferred
LanguageGHC2021

Render.Unlit.Sprite.Model

Synopsis

Documentation

data InstanceAttrs Source #

Instances

Instances details
Generic InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Sprite.Model

Associated Types

type Rep InstanceAttrs :: Type -> Type #

Show InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Sprite.Model

GStorable InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Sprite.Model

HasVkFormat InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Sprite.Model

Methods

getVkFormat :: [Format]

Zero InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Sprite.Model

Methods

zero :: InstanceAttrs #

HasVertexInputBindings InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Sprite.Model

Methods

vertexInputBindings :: [VertexInputBinding]

type Rep InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Sprite.Model

type Specialization Pipeline 
Instance details

Defined in Render.Unlit.Sprite.Pipeline

type Specialization Pipeline = (Float, Bool)

type InstanceBuffer stage = Allocated stage InstanceAttrs Source #

fromTexture Source #

Arguments

:: Int32

Sampler index.

-> Int32

Texture index.

-> Vec2

Sprite size.

-> Vec2

Sprite position.

-> InstanceAttrs 

fromAtlas Source #

Arguments

:: Int32

Texture ID.

-> Atlas 
-> Vec2

Sprite scale, wrt. to native tile size

-> Vec2

Tile position in atlas tiles. Can be fractional when using subgrids.

-> Vec2

Sprite position.

-> InstanceAttrs 

animate_ :: ("margin" ::: Float) -> ("num.frames" ::: Int) -> ("frame duration" ::: Float) -> ("phase" ::: Float) -> InstanceAttrs -> InstanceAttrs Source #

Simple animation controller with left-to-right linear cycle.