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

x/caviar/src/entities/mod.ts>Rectangle

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

Constructors

new
Rectangle(
x: number,
y: number,
width: number,
height: number,
fill: RGBA | string,
)

Properties

bottom: number
down: number
fill: RGBA
height: number
left: number
right: number
up: number
width: number

Methods

setAlpha(a: number): void
setFill(c: RGBA | string): void