traviso.js - v0.1.12
    Preparing search index...

    Type Alias TEngineConfiguration

    Type declaration for engine-specific configuration.

    type TEngineConfiguration = {
        assetsToLoad?: string[];
        backgroundColor?: number;
        changeTransparencies?: boolean;
        checkPathOnEachTile?: boolean;
        dontAutoMoveToTile?: boolean;
        engineInstanceReadyCallback?: (engineInstance: EngineView) => unknown;
        followCharacter?: boolean;
        highlightPath?: boolean;
        highlightTargetTile?: boolean;
        initialPositionFrame?: TPositionFrame;
        initialZoomLevel?: number;
        instantCameraRelocation?: boolean;
        instantCameraZoom?: boolean;
        instantObjectRelocation?: boolean;
        isoAngle?: number;
        mapDataPath: string;
        mapDraggable?: boolean;
        maxScale?: number;
        maxZoom?: number;
        minScale?: number;
        minZoom?: number;
        numberOfZoomLevels?: number;
        objectReachedDestinationCallback?: (objectView: ObjectView) => unknown;
        objectSelectCallback?: (objectView: ObjectView) => unknown;
        objectUpdateCallback?: (objectView: ObjectView) => unknown;
        otherObjectsOnTheNextTileCallback?: (
            objectView: ObjectView,
            otherObjectViews: ObjectView[],
        ) => unknown;
        pathFindingClosest?: boolean;
        pathFindingType?: number;
        tileHeight?: number;
        tileHighlightAnimated?: boolean;
        tileHighlightFillAlpha?: number;
        tileHighlightFillColor?: number;
        tileHighlightStrokeAlpha?: number;
        tileHighlightStrokeColor?: number;
        tileSelectCallback?: (r: number, c: number) => unknown;
        useMask?: boolean;
        zoomIncrement?: number;
    }
    Index

    Properties

    assetsToLoad?: string[]

    Array of paths to the assets that are desired to be loaded by traviso, no need to use if assets are already loaded to PIXI cache, default null

    null
    
    backgroundColor?: number

    Background color, if defined the engine will create a solid colored background for the map, default null

    null
    
    changeTransparencies?: boolean

    Make objects transparent when the controllable is behind them, default true

    true
    
    checkPathOnEachTile?: boolean

    Looks for a path every time an object moves to a new tile (set to false if you don't have other moving objects on your map), default true

    true
    
    dontAutoMoveToTile?: boolean

    When a tile selected don't move the controllable immediately but still call 'tileSelectCallback', default false

    false
    
    engineInstanceReadyCallback?: (engineInstance: EngineView) => unknown

    Callback function that will be called once everything is loaded and engine instance is ready, default null

    null
    
    followCharacter?: boolean

    defines if the camera will follow the current controllable or not, default true

    true
    
    highlightPath?: boolean

    Highlight the path when the current controllable moves on the map, default true

    true
    
    highlightTargetTile?: boolean

    Highlight the target tile when the current controllable moves on the map, default true

    true
    
    initialPositionFrame?: TPositionFrame

    frame to position the engine, default { x : 0, y : 0, w : 800, h : 600 }

    { x : 0, y : 0, w : 800, h : 600 }
    
    initialZoomLevel?: number

    initial zoom level of the map, default 0

    0
    
    instantCameraRelocation?: boolean

    specifies whether the camera moves instantly or with a tween animation to the target location, default false

    false
    
    instantCameraZoom?: boolean

    specifies whether to zoom instantly or with a tween animation, default false

    false
    
    instantObjectRelocation?: boolean

    specifies whether the map-objects will be moved to target location instantly or with an animation, default false

    false
    
    isoAngle?: number

    the angle between the top-left edge and the horizontal diagonal of a isometric quad, default 30

    30
    
    mapDataPath: string

    The path to the json file that defines map data, required

    mapDraggable?: boolean

    Enable dragging the map with touch-and-touchmove or mousedown-and-mousemove on the map, default true

    true
    
    maxScale?: number

    maximum scale that the PIXI.Container for the map can get, default 1.5

    1.5
    
    maxZoom?: number

    maximum zoom level, engine defined

    minScale?: number

    minimum scale that the PIXI.Container for the map can get, default 0.5

    0.5
    
    minZoom?: number

    minimum zoom level, engine defined

    numberOfZoomLevels?: number

    used to calculate zoom increment, defined by user, default 5

    5
    
    objectReachedDestinationCallback?: (objectView: ObjectView) => unknown

    Callback function that will be called when any moving object reaches its destination (call param will be the moving object itself), default null

    null
    
    objectSelectCallback?: (objectView: ObjectView) => unknown

    Callback function that will be called when a tile with an interactive map-object on it is selected (call param will be the object selected), default null

    null
    
    objectUpdateCallback?: (objectView: ObjectView) => unknown

    Callback function that will be called every time an objects direction or position changed, default null

    null
    
    otherObjectsOnTheNextTileCallback?: (
        objectView: ObjectView,
        otherObjectViews: ObjectView[],
    ) => unknown

    Callback function that will be called when any moving object is in move and there are other objects on the next tile, default null

    null
    
    pathFindingClosest?: boolean

    whether to return the path to the closest node if the target is unreachable, default false

    false
    
    pathFindingType?: number

    the type of path finding algorithm two use, default TRAVISO.PF_ALGORITHMS.ASTAR_ORTHOGONAL

    TRAVISO.PF_ALGORITHMS.ASTAR_ORTHOGONAL
    
    tileHeight?: number

    height of a single isometric tile, default 74

    74
    
    tileHighlightAnimated?: boolean

    Animate the tile highlights, default true

    true
    
    tileHighlightFillAlpha?: number

    Alpha value for the tile highlight fill (this will be overridden if a highlight-image is defined), default 0.5

    0.5
    
    tileHighlightFillColor?: number

    Color code for the tile highlight fill (this will be overridden if a highlight-image is defined), default 0x80d7ff

    0x80d7ff
    
    tileHighlightStrokeAlpha?: number

    Alpha value for the tile highlight stroke (this will be overridden if a highlight-image is defined), default 1.0

    1.0
    
    tileHighlightStrokeColor?: number

    Color code for the tile highlight stroke (this will be overridden if a highlight-image is defined), default 0xFFFFFF

    0xFFFFFF
    
    tileSelectCallback?: (r: number, c: number) => unknown

    Callback function that will be called when a tile is selected (call params will be the row and column indexes of the tile selected), default null

    null
    
    useMask?: boolean

    Creates a mask using the position frame defined by 'initialPositionFrame' property or the 'posFrame' parameter that is passed to 'repositionContent' method, default false

    false
    
    zoomIncrement?: number

    zoom increment amount calculated by the engine according to user settings, default 0.5

    0.5