phaser - v4.0.0-rc.4
    Preparing search index...

    Provides methods used for setting the debug properties of an Arcade Physics Body.

    interface Debug {
        debugBodyColor: number;
        debugShowBody: boolean;
        debugShowVelocity: boolean;
        setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this;
        setDebugBodyColor(value: number): this;
    }

    Implemented by

    Index

    Properties

    debugBodyColor: number

    The color of the body outline when it renders to the debug display.

    debugShowBody: boolean

    Set to true to have this body render its outline to the debug display.

    debugShowVelocity: boolean

    Set to true to have this body render a velocity marker to the debug display.

    Methods

    • Sets the debug values of this body.

      Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole. Note that there is a performance cost in drawing debug displays. It should never be used in production.

      Parameters

      • showBody: boolean

        Set to true to have this body render its outline to the debug display.

      • showVelocity: boolean

        Set to true to have this body render a velocity marker to the debug display.

      • bodyColor: number

        The color of the body outline when rendered to the debug display.

      Returns this

    • Sets the color of the body outline when it renders to the debug display.

      Parameters

      • value: number

        The color of the body outline when rendered to the debug display.

      Returns this