Actor contructor options

Hierarchy

  • ActorArgs

Properties

acc?: Vector

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

anchor?: Vector

Optionally set the anchor for graphics in the actor

angularVelocity?: number

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

collider?: Collider

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

collisionGroup?: CollisionGroup

Optionally suppy a CollisionGroup

collisionType?: CollisionType

Optionally set the collision type

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

coordPlane?: CoordPlane

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

height?: number

Optionally set the height of a box collider for the actor

name?: string

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

pos?: Vector

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

radius?: number

Optionally set the radius of the circle collider for the actor

rotation?: number

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

scale?: Vector

Optionally set the scale of the actor's transform

vel?: Vector

Optionally set the velocity of the actor in pixels/sec

visible?: boolean

Optionally set the visibility of the actor

width?: number

Optionally set the width of a box collider for the actor

x?: number

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

y?: number

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

z?: number

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