Talos docs

ViewModelFrame

Since 0.6

One frame: an image of the project and where its pivot is.

Plain text

Signature

export interface ViewModelFrame {
  /** A PNG by its path from the project root: `scenes/sprites/gun.png`, `ui/hands.png`. */
  image: string
  /** Its size in source pixels. */
  size: Vec2
  /** The source pixel that lands on the anchor. Default bottom-centre, `[size[0] / 2, size[1]]`. */
  pivot?: Vec2
}

Import: import type { ViewModelFrame } from "@argus/gameplay"

Members

MemberSignatureDescription
imageimage: stringA PNG by its path from the project root: scenes/sprites/gun.png, ui/hands.png.
sizesize: Vec2Its size in source pixels.
pivotpivot?: Vec2The source pixel that lands on the anchor. Default bottom-centre, [size[0] / 2, size[1]].