jetlag2d
    Preparing search index...

    Interface ActorConfig

    Everything that can be given to the Actor constructor, other than data, which has its own rules (see the constructor)

    interface ActorConfig {
        appearance: AppearanceComponent | AppearanceComponent[];
        behaviors?: Behavior | Behavior[];
        gestures?: GestureHandlers;
        movement?: MovementComponent;
        onDisappear?: (a: Actor) => void;
        rigidBody: RigidBodyComponent;
        sounds?: SoundEffectComponent;
    }
    Index

    What the actor looks like: one appearance component, or an array of them, drawn in order. An empty array is an error.

    behaviors?: Behavior | Behavior[]

    What the actor does when it touches other actors: one behavior, or an array of them. If omitted, the actor has a PassiveBehavior, so it doesn't collide with anything

    gestures?: GestureHandlers

    Functions to run when the player touches, pans, swipes, or hovers over the actor

    How the actor moves. If omitted, the actor only moves when physics moves it

    onDisappear?: (a: Actor) => void

    Code to run when the actor disappears

    The physical body (BoxBody, CircleBody, or PolygonBody). It also decides which scene the actor lives in. Required, because every actor needs a place in the world.

    The sounds to play for this actor, such as when it disappears