Skip to main content

BBox

class BBox implements TypeWebGLConvertible

Constructors

constructor

public new BBox(): BBox
public new BBoxfrom: PossibleBBox: BBox
public new BBoxx: numbery?: numberwidth?: numberheight?: number: BBox

Properties

height

public height: number = 0

width

public width: number = 0

x

public x: number = 0

y

public y: number = 0

symbol

static readonly public symbol: typeof symbol = ...

Accessors

bottom

public set bottomvalue: number: void
public get bottom(): number

Parameters


bottomLeft

public get bottomLeft(): Vector2

bottomRight

public get bottomRight(): Vector2

center

public get center(): Vector2

corners

public get corners(): Vector2Vector2Vector2Vector2

left

public set leftvalue: number: void
public get left(): number

Parameters


pixelPerfect

public get pixelPerfect(): BBox

position

public set positionvalue: Vector2: void
public get position(): Vector2

Parameters


public set rightvalue: number: void
public get right(): number

Parameters


size

public get size(): Vector2

top

public set topvalue: number: void
public get top(): number

Parameters


topLeft

public get topLeft(): Vector2

topRight

public get topRight(): Vector2

Methods

addSpacing

public addSpacingvalue: PossibleSpacing: BBox

Expand the bounding box to accommodate the given spacing.

Deprecated

Use expand instead.

Parameters


expand

public expandvalue: PossibleSpacing: BBox

Expand the bounding box to accommodate the given spacing.

Parameters


includes

public includespoint: Vector2: boolean

Parameters


intersection

public intersectionother: BBox: BBox

Parameters


intersects

public intersectsother: BBox: boolean

Parameters


lerp

public lerpto: BBoxvalue: numberVector2BBox: BBox

Parameters


serialize

public serialize(): SerializedBBox

toString

public toString(): string

toSymbol

public toSymbol(): symbol

toUniform

public toUniformgl: WebGL2RenderingContextlocation: WebGLUniformLocation: void

Parameters

  • gl: WebGL2RenderingContext
  • location: WebGLUniformLocation

transform

public transformmatrix: PossibleMatrix2D: BBox

Parameters


transformCorners

public transformCornersmatrix: PossibleMatrix2D: Vector2[]

Parameters


union

public unionother: BBox: BBox

Parameters


arcLerp

static public arcLerpfrom: BBoxto: BBoxvalue: numberreverse: boolean = falseratio?: number: BBox

Parameters


createSignal

static public createSignalinitial?: SignalValuePossibleBBoxinterpolation: InterpolationFunctionBBoxany[] = BBox.lerp: RectSignalvoid

Parameters


fromBBoxes

static public fromBBoxes...boxes: BBox[]: BBox

Parameters


fromPoints

static public fromPoints...points: Vector2[]: BBox

Parameters


fromSizeCentered

static public fromSizeCenteredsize: Vector2: BBox

Parameters


lerp

static public lerpfrom: BBoxto: BBoxvalue: numberVector2BBox: BBox

Parameters