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

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