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

x/caviar/web/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.5.0/web/mod.ts";

Constructors

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

Properties

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

Methods

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