Skip to main content

ActorArgs

Actor constructor options

Index

Properties

optionalacc

acc?: Vector

Optionally set the acceleration of the actor in pixels/sec^2

optionalanchor

anchor?: Vector

Optionally set the anchor for graphics in the actor

optionalangularVelocity

angularVelocity?: number

Optionally set the angular velocity of the actor in radians/sec (180 degrees = Math.PI radians)

optionalcollider

collider?: Collider

Optionally supply a collider for an actor, if supplied ignores any supplied width/height

optionalcollisionGroup

collisionGroup?: CollisionGroup

Optionally supply a [[CollisionGroup]]

optionalcollisionType

collisionType?: CollisionType

Optionally set the collision type

optionalcolor

color?: Color

Optionally set the color of an actor, only used if no graphics are present If a width/height or a radius was set a default graphic will be added

optionalcoordPlane

coordPlane?: CoordPlane

Optionally set the coordinate plane of the actor, default is [[CoordPlane.World]] meaning actor is subject to camera positioning

optionalheight

height?: number

Optionally set the height of a box collider for the actor

optionalname

name?: string

Optionally set the name of the actor, default is 'anonymous'

optionaloffset

offset?: Vector

Optionally set the anchor for graphics in the actor

optionalopacity

opacity?: number

Optionally set the color of an actor, only used if no graphics are present If a width/height or a radius was set a default graphic will be added

optionalpos

pos?: Vector

Optionally set the (x, y) position of the actor as a vector, default is (0, 0)

optionalradius

radius?: number

Optionally set the radius of the circle collider for the actor

optionalrotation

rotation?: number

Optionally se the rotation in radians (180 degrees = Math.PI radians)

optionalscale

scale?: Vector

Optionally set the scale of the actor's transform

optionalvel

vel?: Vector

Optionally set the velocity of the actor in pixels/sec

optionalvisible

visible?: boolean

Optionally set the visibility of the actor

optionalwidth

width?: number

Optionally set the width of a box collider for the actor

optionalx

x?: number

Optionally set the x position of the actor, default is 0

optionaly

y?: number

Optionally set the y position of the actor, default is 0

optionalz

z?: number

Optionally set the z index of the actor, default is 0