Options
All
  • Public
  • Public/Protected
  • All
Menu

Excalibur.js v0.25.0 API Documentation

Index

References

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

References

canonicalizeAngle

Re-exports canonicalizeAngle

clamp

Re-exports clamp

randomInRange

Re-exports randomInRange

randomIntInRange

Re-exports randomIntInRange

range

Re-exports range

toDegrees

Re-exports toDegrees

toRadians

Re-exports toRadians

Type aliases

AnimationEvents

AnimationEvents: { ended: Animation; frame: Frame; loop: Animation }

Type declaration

CanvasPosition

CanvasPosition: string | AbsolutePosition

ComponentCtor

ComponentCtor<T>: new (...args: any[]) => T

Type parameters

Type declaration

    • new (...args: any[]): T
    • Component Contructor Types

      Parameters

      • Rest ...args: any[]

      Returns T

ComponentStringType

ComponentStringType<T>: T extends Component<infer R> ? R : string

Plucks the string type out of a component type

Type parameters

  • T

ComponentType

ComponentType<ComponentToParse>: ComponentToParse extends Component<infer TypeName> ? TypeName : never

Type parameters

  • ComponentToParse

Constructor

Constructor<T>: {}

Type parameters

  • T

Type declaration

DestinationSize

DestinationSize: { height: number; width: number }

Type declaration

  • height: number
  • width: number

ExResponseType

ExResponseType: "" | "arraybuffer" | "blob" | "document" | "json" | "text"

HTMLImageSource

HTMLImageSource: HTMLImageElement | HTMLCanvasElement

Id

Id<T>: { type: T; value: number }

Type parameters

  • T: string

Type declaration

  • type: T
  • value: number

MaybeObserver

MaybeObserver<T>: Partial<Observer<T>>

Defines an interface for something that might be an observer if a notify() is present

Type parameters

  • T

SourceView

SourceView: { height: number; width: number; x: number; y: number }

Type declaration

  • height: number
  • width: number
  • x: number
  • y: number

SystemTypes

SystemTypes<ComponentTypes>: ComponentTypes extends Component<infer TypeName> ? TypeName : never

Type parameters

  • ComponentTypes

activate

activate: "activate"

axis

axis: "axis"

button

button: "button"

cancel

cancel: "cancel"

collisionend

collisionend: "collisionend"

collisionstart

collisionstart: "collisionstart"

connect

connect: "connect"

deactivate

deactivate: "deactivate"

disconnect

disconnect: "disconnect"

down

down: "down"

enter

enter: "enter"

entertrigger

entertrigger: "enter"

enterviewport

enterviewport: "enterviewport"

exittrigger

exittrigger: "exit"

exitviewport

exitviewport: "exitviewport"

hidden

hidden: "hidden"

hold

hold: "hold"

initialize

initialize: "initialize"

kill

kill: "kill"

leave

leave: "leave"

move

move: "move"

pointercancel

pointercancel: "pointercancel"

pointerdown

pointerdown: "pointerdown"

pointerdragend

pointerdragend: "pointerdragend"

pointerdragenter

pointerdragenter: "pointerdragenter"

pointerdragleave

pointerdragleave: "pointerdragleave"

pointerdragmove

pointerdragmove: "pointerdragmove"

pointerdragstart

pointerdragstart: "pointerdragstart"

pointerenter

pointerenter: "pointerenter"

pointerleave

pointerleave: "pointerleave"

pointermove

pointermove: "pointermove"

pointerup

pointerup: "pointerup"

pointerwheel

pointerwheel: "pointerwheel"

postcollision

postcollision: "postcollision"

postdebugdraw

postdebugdraw: "postdebugdraw"

postdraw

postdraw: "postdraw"

postframe

postframe: "postframe"

postkill

postkill: "postkill"

postupdate

postupdate: "postupdate"

precollision

precollision: "precollision"

predebugdraw

predebugdraw: "predebugdraw"

predraw

predraw: "predraw"

preframe

preframe: "preframe"

prekill

prekill: "prekill"

press

press: "press"

preupdate

preupdate: "preupdate"

release

release: "release"

start

start: "start"

stop

stop: "stop"

subscribe

subscribe: "subscribe"

unsubscribe

unsubscribe: "unsubscribe"

up

up: "up"

visible

visible: "visible"

wheel

wheel: "wheel"

Variables

Const ClosestLineJumpTable

ClosestLineJumpTable: { CircleCircleClosestLine: any; CircleEdgeClosestLine: any; EdgeEdgeClosestLine: any; PolygonCircleClosestLine: any; PolygonEdgeClosestLine: any; PolygonPolygonClosestLine: any } = ...

Type declaration

Const CollisionJumpTable

CollisionJumpTable: { CollideCircleCircle: any; CollideCircleEdge: any; CollideCirclePolygon: any; CollideEdgeEdge: any; CollidePolygonEdge: any; CollidePolygonPolygon: any; FindContactSeparation: any } = ...

Type declaration

Const EX_VERSION

EX_VERSION: string = ...

The current Excalibur version string

description

process.env.__EX_VERSION gets replaced by Webpack on build

Const maxMessages

maxMessages: 5 = 5

Functions

ClosestLine

  • Finds the closes line between 2 line segments, were the magnitude of u, v are the lengths of each segment L1 = P(s) = p0 + s * u, where s is time and p0 is the start of the line L2 = Q(t) = q0 + t * v, where t is time and q0 is the start of the line

    Parameters

    • p0: Vector

      Point where L1 begins

    • u: Vector

      Direction and length of L1

    • q0: Vector

      Point were L2 begins

    • v: Vector

      Direction and length of L2

    Returns Line

Configurable

  • Configurable<T>(base: T): T
  • Configurable helper extends base type and makes all properties available as option bag arguments

    internal

    Type parameters

    Parameters

    • base: T

    Returns T

createId

  • createId<T>(type: T, value: number): Id<T>
  • Type parameters

    • T: string

    Parameters

    • type: T
    • value: number

    Returns Id<T>

hasGraphicsTick

hasOnInitialize

hasOnPostUpdate

hasOnPreUpdate

hasPostDraw

hasPreDraw

has_initialize

has_postupdate

has_preupdate

isAddedComponent

isAddedSystemEntity

isRemoveSystemEntity

isRemovedComponent

obsolete

Const resetObsoleteCounter

  • resetObsoleteCounter(): void

vec

  • vec(x: number, y: number): Vector
  • Shorthand for creating new Vectors - returns a new Vector instance with the provided X and Y components.

    Parameters

    • x: number

      X component of the Vector

    • y: number

      Y component of the Vector

    Returns Vector