Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/caviar/src/entities/sprites/mod.ts>Sprite

⚡ Blazing fast, modern, Game Engine powered by WebGPU for Deno and the browser
Go to Latest
class Sprite
extends Entity
import { Sprite } from "https://deno.land/x/caviar@2.0.0/src/entities/sprites/mod.ts";

Constructors

new
Sprite(
scene: Scene,
texture: string,
x: number,
y: number,
width: number,
height: number,
unnamed 6: spriteConfig,
frame?: number,
)

Properties

frame: Frame
frames: Array<Frame>
height: number
surface: any
texture: any
width: number

Methods

nextFrame(): void
setFrame(frame: number): void