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

x/caviar/web/src/entities/geometry/Rectangle.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.6.0/web/src/entities/geometry/Rectangle.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

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