The client object.

interface Client {
    accountName: string;
    address: string;
    color: string | number[] | { tint: number };
    hideFPS: boolean;
    inInput: boolean;
    macroAtlas: string;
    mainMap: string;
    mainOutput: string;
    mainWebStyle: string;
    mapView: MapViewInstance | MapViewConfig;
    maxFPS: number;
    mob: Diob;
    preventScreenCulling: boolean;
    preventServerInterfaces: boolean;
    renderApp: any;
    screenBackground: null | string;
    screenView: ScreenView;
    viewEyeDelay: { max: { x: number; y: number }; step: number };
    volume: number;
    webBackground: string;
    xEdgeLimit: number;
    xView: number;
    xViewEyeOffset: number;
    yEdgeLimit: number;
    yView: number;
    yViewEyeOffset: number;
    addCommand(pCommand: string, pFunc: Function): void;
    addCustomFont(
        pName: string | number,
        pPath: string,
        pRemote?: boolean,
        pStyle?: object,
    ): void;
    addCustomMacro(
        pName: string | number,
        pKey: string,
        pDown?: string,
        pUp?: string,
    ): void;
    addFilter(pName: string | number, pType: string, pArgs: unknown): void;
    addInterfaceElement(
        pType: string,
        pInterface: string,
        pName?: string | number,
        pX?: number,
        pY?: number,
        pArgs?: unknown[],
    ): Diob;
    addOverlay(
        pOver: string | Diob | Object,
        pAppearance?: AppearMask,
        pSkipEvent?: boolean,
    ): Diob;
    addWebScript(
        pName: string | number,
        pLink: string,
        pModule?: boolean,
        pFunc?: Function,
    ): void;
    addWebStyle(pName: string | number, pStyle: string): void;
    alert(pMes: string): void;
    callCommand(pCommand: string, pArgs: unknown[], pSend?: boolean): void;
    callWebTagEvent(pID: string, pEvent: string): void;
    changeServer(pAddres: string): void;
    checkInterfaceShown(pInt: string, pEl?: string): boolean;
    checkLocalStorage(): boolean;
    clearKeyDownEvents(): void;
    confirm(pMes: string, pFunc: Function): void;
    createInterface(pName: string | number): void;
    createTopScreen(
        pName: string | number,
        pLayer?: number,
        pSet?: object,
    ): void;
    endMove(pDir: string): void;
    endMove(pDir: string): void;
    evalWebScript(pScript: string): void;
    getAccountName(): string;
    getAddress(): string;
    getCustomMacroNames(): string[];
    getFilters(): string[];
    getFocus(): null | Diob;
    getFPS(): number;
    getInterface(pPane?: string | InterfacePane, pEl?: string): any;
    getInterfaceCanvas(pInt: string, pEl: string): HTMLCanvasElement;
    getInterfaceElement(pInterface: string, pElement: Diob): Diob;
    getInterfaceElements(
        pInterface: string,
        pType?: string,
        pChild?: boolean,
    ): Diob[];
    getInterfaceElementsFromScreen(
        pX: number,
        pY: number,
        pType?: string,
        pChild?: boolean,
        pPage?: string,
    ): Diob[];
    getInterfaceNames(): string[];
    getInterfacePane(pPane: string): InterfacePane;
    getLocalStorage(pKey: string): null | string;
    getMapView(): MapViewInstance;
    getMouseCursor(): { cursor: string; x: number; y: number };
    getMousePos(): { x: number; y: number };
    getNavigator(): Navigator;
    getOverlays(pType?: string, pChild?: boolean): Diob[];
    getPlane(pPlane?: number): Diob | Diob[];
    getPosFromScreen(
        pX: number,
        pY: number,
        pO?: object,
    ): { x: number; y: number };
    getScreenDiobs(pType?: string, pChild?: boolean): Diob[];
    getScreenPos(pO?: Partial<Point2D>): Point2D;
    getScreenScale(pO?: object): { x: number; y: number };
    getScreenSize(pO?: Partial<Size2D>): Size2D;
    getScreenView(): ScreenView;
    getTopScreen(
        pName?: string | number,
        pType?: "url" | "pixels" | "canvas",
    ): ScreenCaptureData;
    getViewEye(): Diob;
    getViewEyeDelay(): { max: { x: number; y: number }; step: number };
    getViewEyeOffsets(): { x: number; y: number };
    getWebTag(pID: string): HTMLElement;
    getWebTagContent(pID: string): string;
    getWindowSize(pO?: Partial<Size2D>): Size2D;
    hideInterface(pInterface: string, pElement?: Diob): void;
    isGuest(): boolean;
    onFileUpload(pFiles: FileList): boolean | Promise<boolean>;
    onKeyDown(pKey: string, pEvent?: KeyboardEvent): void;
    onKeyUp(pKey: string, pEvent?: KeyboardEvent): void;
    onMouseClick(
        pDiob: 0 | Diob,
        pX: number,
        pY: number,
        pButton: MouseButton,
    ): void;
    onMouseDblClick(
        pDiob: 0 | Diob,
        pX: number,
        pY: number,
        pButton: MouseButton,
    ): void;
    onMouseDown(
        pDiob: 0 | Diob,
        pX: number,
        pY: number,
        pButton: MouseButton,
    ): void;
    onMouseEnter(pDiob: 0 | Diob, pX: number, pY: number): void;
    onMouseExit(pDiob: 0 | Diob, pX: number, pY: number): void;
    onMouseMove(pDiob: 0 | Diob, pX: number, pY: number): void;
    onMouseUp(
        pDiob: 0 | Diob,
        pX: number,
        pY: number,
        pButton: MouseButton,
    ): void;
    onMouseWheelScrollDown(pDiob: 0 | Diob, pX: number, pY: number): void;
    onMouseWheelScrollUp(pDiob: 0 | Diob, pX: number, pY: number): void;
    onTouchEnd(
        pDiob: 0 | Diob,
        pX: number,
        pY: number,
        pCancel?: boolean,
        pEvent?: TouchEvent,
    ): void;
    onTouchMove(
        pDiob: 0 | Diob,
        pX: number,
        pY: number,
        pEvent?: TouchEvent,
    ): void;
    onTouchStart(
        pDiob: 0 | Diob,
        pX: number,
        pY: number,
        pEvent?: TouchEvent,
    ): void;
    outputText(pText: string, pInt: string, pEl: string): void;
    playSound(
        pSound: string | { soundName: string; volume: number },
        pStart?: number,
        pDuration?: number,
    ): void;
    prompt(pTitle: string, pMes: string, pFunc: Function): void;
    refreshInterface(pPlane?: number): void;
    refreshTiles(): void;
    removeCommand(pCommand: string): void;
    removeCustomFont(pName: string | number): void;
    removeCustomMacro(pName: string | number): void;
    removeFilter(pName: string | number): void;
    removeInterfaceElement(
        pInterface: string | InterfacePane,
        pName?: string | number | Diob,
        pSave?: boolean,
    ): void;
    removeOverlay(pOver: string | Diob | Object): void;
    removeWebScript(pName: string | number): void;
    removeWebStyle(pName: string | number): void;
    removeWebTag(pID: string): void;
    sendDiob(pD: Diob, pVar?: string[]): void;
    sendPacket(pName: string | number, pData: unknown, pForce?: boolean): void;
    setEdgeLimit(pX: number, pY: number): void;
    setFocus(): void;
    setLocalStorage(pKey?: string, pData?: string): void;
    setMacroAtlas(pMacro: string): void;
    setMainOutput(pOutput: string): void;
    setMapView(pView?: null | string | Partial<MapViewConfig>): void;
    setMaxFPS(pFPS: number): void;
    setMouseCursor(pCursor: string, pX?: number, pY?: number): void;
    setOverlays(pOver: Diob[]): void;
    setPlane(pPlane: number, pVar?: string, pVal?: boolean): void;
    setPlayerMob(pMob: Diob): void;
    setScreenSize(pWidth: number, pHeight: number): void;
    setScreenView(pView?: null | Partial<ScreenView>): void;
    setTopScreen(
        pName: string | number,
        pNewName: string,
        pNewLayer: number,
        pNewData?: any,
        pNewSet?: object,
    ): void;
    setViewEye(pDiob: Diob): void;
    setViewEyeDelay(pDelay: number): void;
    setViewEyeOffsets(pX: number, pY: number): void;
    setWebBackground(pBack: string): void;
    setWebTagContent(pID: string, pContent: string): void;
    setWebTagFocus(pID: string): void;
    setWebTagStyle(pID: string, pStyle: string, pValue: string): void;
    showInterface(pInterface: string, pElement?: Diob, pForce?: boolean): void;
    startMove(pDir: string): void;
    toggleLoadScreen(pVal?: boolean): void;
    toggleMacroCapture(pVal?: boolean): void;
    toggleScreenDrawing(pVal?: boolean): void;
    topScreenDraw(
        pArgs: DrawCommandArgs | DrawCommandArgs[],
        pName: string | number,
    ): void;
    uploadFile(
        pURL?: string,
        pOptions?: Record<string, string>,
    ): Promise<string | void>;
    [key: string]: any;
}

Indexable

  • [key: string]: any

Properties

Methods

Events

Properties

accountName: string

Name of the client's account.

Client | Server

address: string

A string containing the address the client is connected to the server with (in format IP:port, or localhost if not connected to a server).

Client | Server

color: string | number[] | { tint: number }

Hex, rgb, rgba, color matrix value, or a tint object. Applies color filter to diob. Example: ( #000000 ). Example: ( rgb(10, 20, 30) ). Example: ( {'tint': 0x444444} ).

Client | Server

hideFPS: boolean

CLIENT-ONLY. Toggles whether to hide the on-screen frames-per-second (FPS) DOM label element (#fps_label).

When true, the default FPS counter overlay is hidden from the client view. When false, the FPS label element is displayed in the corner of the game screen and updated every second.

Client

// Hide the built-in FPS counter display
VYLO.Client.hideFPS = true;
inInput: boolean

Set in order to tell the engine the client is in an input and key commands should be used as text input, false for normal. Engine automatically sets this for most inputs.

Client | Server

macroAtlas: string

The name of the macro atlas currently active for this client.

Client | Server

client.macroAtlas = 'default_controls';
mainMap: string

Name of the default map file to load when the client connects or initializes.

When the client's controlled mob is created and does not already have an assigned map, it is automatically placed onto this map at coordinates (0, 0).

Client | Server

VYLO.Client.mainMap = 'world-map';
mainOutput: string

Name of the interface element to send default messages to (ex: interface1.output1 ).

Client | Server

mainWebStyle: string

String containing CSS to be used as a web style (ex .test{font-weight: bold;}.test2{color: #000;}). Style can be referenced by the namedefault`.

Client | Server

mapView: MapViewInstance | MapViewConfig

Active MapView viewport controller instance for this client, or a configuration object when configuring the type.

Client | Server

maxFPS: number

Maximum number of frames the client will attempt to draw per second. Default is 60.

Client | Server

mob: Diob

A reference to the player mob of this client.

Client | Server

preventScreenCulling: boolean

CLIENT-ONLY. Controls whether off-screen display objects (Diobs) and map tiles are culled from rendering.

By default (false), the Vylocity engine performs screen frustum culling, automatically removing non-visible map tiles and cullable Diobs from the screen display list to maximize rendering performance.

When set to true, screen culling is prevented, forcing all map tiles and objects within the map view to remain added to the display list regardless of whether they are outside the current camera viewport.

Client

// Prevent culling so all diobs and tiles stay on screen
VYLO.Client.preventScreenCulling = true;
preventServerInterfaces: boolean

Setting this will prevent the server from automatically loading interfaces on the server-side. If you want the server to have access, you will need to show the interface manually.

Server

renderApp: any

CLIENT-ONLY. The underlying PixiJS Application instance managing the game canvas renderer (ScreenManager.pixiApp).

Client

screenBackground: null | string

String containing a color (null for transparent) to set the client's screen background to, for example #000 for black. Default is #000.

Client | Server

screenView: ScreenView

Current screenView viewport configuration and state object for this client.

Client | Server

viewEyeDelay: { max: { x: number; y: number }; step: number }

Object containing eye delay information. Possible values step (determines number of pixels the eye moves per frame. Default 1) and max (object determining maximum distance in pixels the screen can be from the eye {'x': 100, 'y': 100}). Example: {step: 2, max: {'x': 100, 'y': 100}}.

Client | Server

volume: number

CLIENT-ONLY. Master volume level for sound playback on the client (default 100).

Client

// Set client master volume to 50%
VYLO.Client.volume = 50;
webBackground: string

A string containing the HTML to display behind the game screen; #web_background to set the style of the entire background.

Client | Server

xEdgeLimit: number

Amount of blank tiles that can be seen on the left and right of the view.

Client | Server

xView: number

CLIENT-ONLY. The current horizontal scroll position of the client's screen viewport in map pixels. Read-only.

Client

console.log('Current horizontal screen scroll:', VYLO.Client.xView);
xViewEyeOffset: number

Amount of pixels the client's view is offset by from the view eye on the x-axis.

Client | Server

yEdgeLimit: number

Amount of blank tiles that can be seen on the top and bottom of the view.

Client | Server

yView: number

CLIENT-ONLY. The current vertical scroll position of the client's screen viewport in map pixels. Read-only.

Client

console.log('Current vertical screen scroll:', VYLO.Client.yView);
yViewEyeOffset: number

Amount of pixels the client's view is offset by from the view eye on the y-axis.

Client | Server

Methods

  • Adds a new command to the client's commands. If pFunc is null and pCommand is the name of an pre-defined command, that command will be added.

    Parameters

    • pCommand: string

      Name of the client command to be added.

    • pFunc: Function

      Function to be called when the command is executed.

    Returns void

    Client | Server

  • Adds a custom font.

    Parameters

    • pName: string | number

      Name of the font.

    • pPath: string

      Url or path to the font file.

    • OptionalpRemote: boolean

      (Optional) Set this if the path is outside of the project.

    • OptionalpStyle: object

      (Optional) Custom style object to apply to the font. Example: {'font-weight': bold}.

    Returns void

    Client | Server

  • Creates a new custom macro named pName with the keyDown command of pDown and the keyUp command of pUp. Custom macros override macro atlas macros.

    Parameters

    • pName: string | number

      Name of the custom macro.

    • pKey: string

      String of key that will execute the macro.

    • OptionalpDown: string

      (Optional) String containing the command to be executed when the key is pushed down. Example: test(1) would execute the test client command with one parameter equal to 1.

    • OptionalpUp: string

      (Optional) String containing the command to be executed when the key is let go of. Example: test(1) would execute the test client command with one parameter equal to 1.

    Returns void

    Client | Server

  • Adds the specified filter.

    Parameters

    • pName: string | number

      Name of the filter. Only one name may be used at a time, using the name will remove the old filter with that name.

    • pType: string

      The type of filter to add. Below is the types and their specific possible pArgs values.

    • pArgs: unknown

      Color-based filter.

    Returns void

    Client | Server

  • Adds an interface element to the interface and returns it.

    Parameters

    • pType: string

      Type of interface object to add.

    • pInterface: string

      Name of the interface to add the interface element to.

    • OptionalpName: string | number

      (Optional) Name to give the element being added.

    • OptionalpX: number

      (Optional) X position to give the element.

    • OptionalpY: number

      (Optional) Y position to the give the element.

    • OptionalpArgs: unknown[]

      (Optional) Array of arguments to pass to the onNew event of the interface element being created.

    Returns Diob

    Returns it.

    Client | Server

  • Adds an overlay to the client which is a visual icon that always follows the screen. Returns the new overlay. If pOver is already an overlay of a diob it will remove it form that diob and add it to this diob.

    Parameters

    • pOver: string | Diob | Object

      String of the type of object or overlay to add an overlay of or actual diob to add.

    • OptionalpAppearance: AppearMask

      (Optional) If true, this overlay will be be treated as if it is part of the the parent's actual appearance - appearance settings such as angle and alpha of the parent will be used for this overlay and the overlay will be drawn directly on top of the parent so no other diobs that are not an overlay of the parent can appear between it and the parent (it will basically be an extension of the parent's icon). If this is false, the overlay will be treated as an independent diob that just follows the parent around. Instead of true or false this can be an object containing information on the appearMask, shareIcon to have the overlay share the same iconName as the parent and isUnder to make the overlay appear under the parent instead of above, ownState to have this overlay not sync up with the parent's iconState. Example: {'shareIcon': true, 'isUnder': true}.

    • OptionalpSkipEvent: boolean

      (Optional) If true, the onAddOverlay event will not be called.

    Returns Diob

    Returns the new overlay. If pOver is already an overlay of a diob it will remove it form that diob and add it to this diob.

    Client | Server

  • Loads a JavaScript file into the project.

    Parameters

    • pName: string | number

      Name to give the script.

    • pLink: string

      Link to the JavaScript file to load.

    • OptionalpModule: boolean

      (Optional) Load script as a module.

    • OptionalpFunc: Function

      (Optional) Function to call after the JavaScript file has loaded.

    Returns void

    Client | Server

  • Adds CSS style.

    Parameters

    • pName: string | number

      Unique name of style.

    • pStyle: string

      Text as CSS to add to the client.

    Returns void

    Client | Server

  • Brings up an alert window with pMes in it.

    Parameters

    • pMes: string

      Message to show in the alert.

    Returns void

    Client | Server

  • Calls the client command of pCommand with the arguments of pArgs.

    Parameters

    • pCommand: string

      Name of the client command to call.

    • pArgs: unknown[]

      Array of arguments to pass to the command.

    • OptionalpSend: boolean

      (Optional) If set the command will also be sent to the server.

    Returns void

    Client

  • Executes the event pEvent of the web tag with the id pID.

    Parameters

    • pID: string

      Id of the web tag to call the event of.

    • pEvent: string

      Name of the event to call: onMouseDown, onMouseUp, onMouseClick, onMouseDblClick, onMouseMove.

    Returns void

    Client | Server

  • Moves the client to a new server located at the address pAddress.

    Parameters

    • pAddres: string

      Address for the server to move the client to. Example: 127.0.0.1:1234.

    Returns void

    Client | Server

  • Returns true if pInt is currently shown, false if not. If pEl is set, checks if the specified element is shown.

    Parameters

    • pInt: string

      Name of the interface.

    • OptionalpEl: string

      (Optional) Name of the element.

    Returns boolean

    Returns true if pInt is currently shown, false if not. If pEl is set, checks if the specified element is shown.

    Client | Server

  • Checks whether window.localStorage is supported, enabled, and functioning on the client's browser.

    Tests accessibility by attempting to write and remove a temporary test key.

    Returns boolean

    true if local storage is available and functional; otherwise false.

    Client

    if (VYLO.Client.checkLocalStorage()) {
    VYLO.Client.setLocalStorage('savedLevel', '5');
    }
  • Clears all the keys the client is holding and calls their key up events. If the client continues to hold the key and once the user manually releases the key, the key event may still continue to trigger, so take that into consideration.

    Returns void

    Client | Server

  • Brings up a confirm window asking the user to select "yes" or "no". Returns true or false.

    Parameters

    • pMes: string

      Message to display in the confirm window.

    • pFunc: Function

      Function to call after input. The first argument will be the input. Can be a "callback array" containing the function, the this, and arguments. Example: ( [this.someFunc, this] ).

    Returns void

    Returns true or false.

    Client | Server

  • Creates a new interface file named pName.

    Parameters

    • pName: string | number

      Name of the interface to create.

    Returns void

    Client | Server

  • Creates a new top screen named pName with the layer pLayer.

    Parameters

    • pName: string | number

      Name of the top screen to create.

    • OptionalpLayer: number

      (Optional) Layer to give the screen.

    • OptionalpSet: object

      (Optional) Settings object. Example: ( {'scaleType': 'nearest'} ).

    Returns void

    Client | Server

  • Ends movement of client.playerMob in the direction of pDir.

    Parameters

    • pDir: string

      Name of direction to stop moving the client's playerMob in. PDir being undefined ends all movement.

    Returns void

    Client | Server

  • Sets the background of the client's screen background.

    Parameters

    • pDir: string

      Direction to stop moving in.

    Returns void

    Client | Server

  • Evaluates the JavaScript code in the pScript string. Returns undefined on the server-side.

    Parameters

    • pScript: string

      A string containing the JavaScript code to evaluate.

    Returns void

    Returns undefined on the server-side.

    Client | Server

  • Returns the name of the account the client is logged in with.

    Returns string

    Returns the name of the account the client is logged in with.

    Client | Server

  • Returns address of the client, localhost for local or ip:port if connected to a server.

    Returns string

    Returns address of the client, localhost for local or ip:port if connected to a server.

    Client | Server

  • Returns an array of custom macro names.

    Returns string[]

    Returns an array of custom macro names.

    Client | Server

  • Returns an array of filter names.

    Returns string[]

    Returns an array of filter names.

    Client | Server

  • Returns the Diob currently focused by this client (e.g. for input or camera tracking), or null if none.

    Returns null | Diob

    The currently focused Diob instance, or null.

    Client | Server

    const focusedDiob = client.getFocus();
    if (focusedDiob) {
    console.log('Currently focused:', focusedDiob.tag);
    }
  • Returns the current FPS.

    Returns number

    Returns the current FPS.

    Client | Server

  • Retrieves an interface pane or an element within an interface pane.

    • If pEl is omitted or undefined: returns the interface pane corresponding to pPane.
    • If pEl is specified: returns the child element within that interface pane named pEl.

    Parameters

    • OptionalpPane: string | InterfacePane

      Name of the interface pane or the pane instance itself.

    • OptionalpEl: string

      Optional name of the element within the interface pane.

    Returns any

    The interface pane or the requested interface element.

    Client

    const hud = VYLO.Client.getInterface('hud');
    const healthBar = VYLO.Client.getInterface('hud', 'healthBar');
  • Returns the canvas element that this element is drawn on to.

    Parameters

    • pInt: string

      Name of the interface that element is on.

    • pEl: string

      Name of the element.

    Returns HTMLCanvasElement

    Returns the canvas element that this element is drawn on to.

    Client | Server

  • Returns the interface element object of the specified interface.

    Parameters

    • pInterface: string

      Name of the interface to get element from.

    • pElement: Diob

      Name of the element to get.

    Returns Diob

    Returns the interface element object of the specified interface.

    Client | Server

  • Returns an array of interface elements on the interface pInterface depending on the provided arguments. If pType is not set, all elements on the interface will be returned. If pType is set but pChild is not, elements on the interface with the exact type of pType will be returned. If pType is set and pChild is set, all elements with the type pType or a parent type of pType will be returned. For example, if pType is set to Interface/A with pChild undefined, all elements with the exact type of Interface/A will be returned, but if pChild is set, then all types starting with Interface/A on the interface will be returned.

    Parameters

    • pInterface: string

      Name of the interface to get element from.

    • OptionalpType: string

      (Optional) String containing type path to return.

    • OptionalpChild: boolean

      (Optional) Boolean that determines if child types are included.

    Returns Diob[]

    Returns an array of interface elements on the interface pInterface depending on the provided arguments. If pType is not set, all elements on the interface will be returned. If pType is set but pChild is not, elements on the interface with the exact type of pType will be returned. If pType is set and pChild is set, all elements with the type pType or a parent type of pType will be returned. For example, if pType is set to Interface/A with pChild undefined, all elements with the exact type of Interface/A will be returned, but if pChild is set, then all types starting with Interface/A on the interface will be returned.

    Client | Server

  • Returns an array of diobs on the screen that overlap the specified position box depending on the provided arguments. If pType is not set, all diobs in the position box will be returned. If pType is set but pChild is not, diobs in the position box with the exact type of pType will be returned. If pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned. For example, if pType is set to Interface with pChild undefined, all diobs with the exact type of Interface will be returned, but if pChild is set, then all interfaces on the screen will be returned.

    Parameters

    • pX: number

      Starting x position.

    • pY: number

      Starting y position.

    • OptionalpType: string

      (Optional) Ending x position.

    • OptionalpChild: boolean

      (Optional) Ending y position.

    • OptionalpPage: string

      (Optional) String containing type path to return.

    Returns Diob[]

    Returns an array of diobs on the screen that overlap the specified position box depending on the provided arguments. If pType is not set, all diobs in the position box will be returned. If pType is set but pChild is not, diobs in the position box with the exact type of pType will be returned. If pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned. For example, if pType is set to Interface with pChild undefined, all diobs with the exact type of Interface will be returned, but if pChild is set, then all interfaces on the screen will be returned.

    Client | Server

  • Returns an array of names of all created interfaces.

    Returns string[]

    Returns an array of names of all created interfaces.

    Client | Server

  • Returns the interface pane instance with the specified name pPane.

    Parameters

    • pPane: string

      The identifier name of the interface pane to retrieve.

    Returns InterfacePane

    The interface pane instance, or undefined if not found.

    Client

    const chatPane = VYLO.Client.getInterfacePane('chat');
    chatPane?.show();
  • Gets the data as a string that is stored with the key pKey on the client's computer.

    Parameters

    • pKey: string

      Key used to get data stored locally on the client's computer.

    Returns null | string

    Returns the stored string data or null if not found.

    Client | Server

  • Returns the client's active MapView viewport instance (MapViewInstance).

    Returns MapViewInstance

    The active MapView instance controlling map display, zoom, eye offsets, and bounds.

    Client | Server

    const mapView = client.getMapView();
    mapView.setZoom(1.5, 1.5);
    console.log(`MapView dimensions: ${mapView.width}x${mapView.height}`);
  • Returns an object containing the cursor information. Example: ( {'cursor': 'default', 'x': 0, 'y': 0} ).

    Returns { cursor: string; x: number; y: number }

    returns an object containing the cursor information. Example: ( {'cursor': 'default', 'x': 0, 'y': 0} ).

    Client | Server

  • Returns an object containing the mouse position. Example: ( {'x': 0, 'y': 0} ).

    Returns { x: number; y: number }

    returns an object containing the mouse position. Example: ( {'x': 0, 'y': 0} ).

    Client | Server

  • Returns an object containing information about the client's browser and operating system. Example: {'platform': 'Netscape', 'version': 'Chrome/38.0.2125.104', 'vendor': 'Google', 'language': 'en-US', 'system': 'Windows 95'}.

    Returns Navigator

    Returns an object containing information about the client's browser and operating system. Example: {'platform': 'Netscape', 'version': 'Chrome/38.0.2125.104', 'vendor': 'Google', 'language': 'en-US', 'system': 'Windows 95'}.

    Client | Server

  • Returns an array of diobs that are overlays of this diob using the provided arguments. If pType is not set, all diobs will be returned. If pType is set but pChild is not, all diobs with the exact type of pType will be returned. If pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned. For example, if pType is set to Mob with pChild undefined, all diobs with the exact type of Mob will be returned, but if pChild is set, then all mobs will be returned.

    Parameters

    • OptionalpType: string

      (Optional) String containing type path to return.

    • OptionalpChild: boolean

      (Optional) Boolean that determines if child types are included.

    Returns Diob[]

    Returns an array of diobs that are overlays of this diob using the provided arguments. If pType is not set, all diobs will be returned. If pType is set but pChild is not, all diobs with the exact type of pType will be returned. If pType is set and pChild is set, all diobs with the type pType or a parent type of pType will be returned. For example, if pType is set to Mob with pChild undefined, all diobs with the exact type of Mob will be returned, but if pChild is set, then all mobs will be returned.

    Client | Server

  • Returns the diob plane pPlane ir specified, otherwise returns an array of existing planes. You can then alter it like any other diob and all visual changes will be applied to all diobs on this plane.

    Parameters

    • OptionalpPlane: number

      (Optional) Value of plane to get.

    Returns Diob | Diob[]

    Returns the diob plane pPlane ir specified, otherwise returns an array of existing planes. You can then alter it like any other diob and all visual changes will be applied to all diobs on this plane.

    Client | Server

  • Returns an object {'x': x, 'y': y} containing the x and y position on the map that currently matches the pX and pY position on the screen.

    Parameters

    • pX: number

      X position on the screen.

    • pY: number

      Y position on the screen.

    • OptionalpO: object

      (Optional) An existing object to set the x and y of.

    Returns { x: number; y: number }

    returns an object {'x': x, 'y': y} containing the x and y position on the map that currently matches the pX and pY position on the screen.

    Client | Server

  • Returns an array of diobs that are currently on the screen.

    Parameters

    • OptionalpType: string

      (Optional) String containing type path to return.

    • OptionalpChild: boolean

      (Optional) Boolean that determines if child types are included.

    Returns Diob[]

    Returns an array of diobs that are currently on the screen.

    Client | Server

  • Returns the screen's top-left coordinates { x, y } relative to the game map.

    Parameters

    • OptionalpO: Partial<Point2D>

      Optional destination object to populate with x and y coordinates.

    Returns Point2D

    Coordinates of the screen on the map.

    Client | Server

    const screenPos = client.getScreenPos();
    console.log(`Screen map position: (${screenPos.x}, ${screenPos.y})`);
  • Returns an object containing the x and y of the game scale. Example:: {'x': 2, 'y': 2}.

    Parameters

    • OptionalpO: object

      (Optional) An existing object to set the x and y of.

    Returns { x: number; y: number }

    returns an object containing the x and y of the game scale. Example:: {'x': 2, 'y': 2}.

    Client | Server

  • Returns the dimensions { width, height } of the client's render screen canvas in pixels.

    Parameters

    • OptionalpO: Partial<Size2D>

      Optional destination object to populate with width and height.

    Returns Size2D

    Dimensions containing width and height in pixels.

    Client | Server

    const { width, height } = client.getScreenSize();
    console.log(`Screen canvas: ${width}x${height}`);
  • Returns the current screenView settings and state configuration object for this client.

    Returns ScreenView

    The client's active screenView configuration.

    Client | Server

    const view = client.getScreenView();
    console.log(`Scale mode: ${view.scaleTo}, Size: ${view.width}x${view.height}`);
  • Captures screen data for the entire top screen surface named pName (or default if omitted).

    Parameters

    • OptionalpName: string | number

      Optional identifier name of the top screen layer to capture.

    • OptionalpType: "url" | "pixels" | "canvas"

      Type of representation: 'url', 'pixels', or 'canvas'.

    Returns ScreenCaptureData

    Screen capture details and pixel/data payload.

    Client | Server

    const capture = client.getTopScreen('hud', 'pixels');
    console.log('Top screen dimensions:', capture.width, capture.height);
  • Returns the diob the client's screen eye is currently set to.

    Returns Diob

    Returns the diob the client's screen eye is currently set to.

    Client | Server

  • Returns an object {step: step, max: {'x': x, 'y': y}} containing delay details of client's view eye.

    Returns { max: { x: number; y: number }; step: number }

    returns an object {step: step, max: {'x': x, 'y': y}} containing delay details of client's view eye.

    Client | Server

  • Returns an object {'x': x, 'y': y} containing the x and y offsets of client's view eye.

    Returns { x: number; y: number }

    returns an object {'x': x, 'y': y} containing the x and y offsets of client's view eye.

    Client | Server

  • Returns a reference to the web tag with the id pID.

    Parameters

    • pID: string

      Id of the web tag.

    Returns HTMLElement

    Returns a reference to the web tag with the id pID.

    Client | Server

  • Returns the content of the web tag with the id of pID.

    Parameters

    • pID: string

      Id of the web tag to get the content of.

    Returns string

    Returns the content of the web tag with the id of pID.

    Client | Server

  • Returns the pixel dimensions { width, height } of the browser/game window.

    Parameters

    • OptionalpO: Partial<Size2D>

      Optional destination object to populate with width and height.

    Returns Size2D

    Dimensions containing width and height in pixels.

    Client | Server

    const { width, height } = client.getWindowSize();
    console.log(`Window: ${width}x${height}`);
  • Hides the interface of pInterface if pElement is not specified, otherwise it only hides pElement.

    Parameters

    • pInterface: string

      Name of the interface to hide or the interface containing pElement.

    • OptionalpElement: Diob

      (Optional) Name of interface lement in pInterface to hide.

    Returns void

    Client | Server

  • Checks whether the client is logged in with a guest account (e.g. Guest, Guest-xxx, or Guest1234).

    Returns boolean

    true if the connected account is a guest account; otherwise false.

    Client | Server

    if (client.isGuest()) {
    client.prompt('Register', 'Please create an account to save your progress!', (name) => { ... });
    }
  • Outputs text to an interface element. If pInt or pEl is not set or is invalid, text goes to client.mainOutput.

    Parameters

    • pText: string

      Text to be displayed.

    • pInt: string

      String containing interface file name to output to.

    • pEl: string

      String containing the interface element name to output to.

    Returns void

    Client | Server

  • Plays a sound to this client. Returns the Sound object.

    Parameters

    • pSound: string | { soundName: string; volume: number }

      either a string with the name of a sound file, or a string containing the path of a Sound object, or an actual Sound object, or a basic object with the proper information; ex ( {'soundName': 'name', 'volume': 50} )

    • OptionalpStart: number

      (Optional) Time in seconds to start playing the sound at.

    • OptionalpDuration: number

      (Optional) How long in seconds to play the sound for.

    Returns void

    Returns the Sound object.

    Client | Server

  • Brings up a prompt window to ask for text from the user.

    Parameters

    • pTitle: string

      Title of the prompt.

    • pMes: string

      Default text in the input.

    • pFunc: Function

      Function to call after input. The first argument will be the input. Can be a "callback array" containing the function, the this, and arguments. Example: ( [this.someFunc, this] ).

    Returns void

    Client | Server

  • CLIENT-ONLY. Flags the client interface layout to refresh and redraw on the next animation frame.

    Parameters

    • OptionalpPlane: number

      Optional interface plane index to refresh.

    Returns void

    Client

    VYLO.Client.refreshInterface();
    
  • CLIENT-ONLY. Forces all tiles on the screen to be redrawn on the next frame.

    Returns void

    Client

  • Removes the client command from the client's commands.

    Parameters

    • pCommand: string

      Name of the client command to remove.

    Returns void

    Client | Server

  • Removes a font from being usable.

    Parameters

    • pName: string | number

      Name of the font to remove.

    Returns void

    Client | Server

  • Removes the custom macro pName from the client's custom macros.

    Parameters

    • pName: string | number

      Name of the custom macro.

    Returns void

    Client | Server

  • Removes the specified filter.

    Parameters

    • pName: string | number

      Name of filter to remove.

    Returns void

    Client | Server

  • Removes an interface element from the interface.

    Parameters

    • pInterface: string | InterfacePane

      Name of the interface (or InterfacePane instance) to remove an interface element from.

    • OptionalpName: string | number | Diob

      Optional name of the interface element or Diob element instance to remove.

    • OptionalpSave: boolean

      Optional flag indicating whether to keep the element instance from being deleted.

    Returns void

    Client | Server

  • Removes all overlays with the pOver type or the exact overlay matching pOver.

    Parameters

    • pOver: string | Diob | Object

      String of the type of object or overlay to remove or actual overlay to remove.

    Returns void

    Client | Server

  • Removes the script with the pName name from the game.

    Parameters

    • pName: string | number

      Name of script to remove.

    Returns void

    Client | Server

  • Removes a CSS style with the name pName.

    Parameters

    • pName: string | number

      Unique name of style.

    Returns void

    Client | Server

  • Removes a web tag with the id of pID from the client's screen.

    Parameters

    • pID: string

      Id of the web tag to remove from the client's screen.

    Returns void

    Client | Server

  • Sends the data for the pD diob to the client, if pVar is set it will send only those variables, if it is not set it will only send built-in engine variables.

    Parameters

    • pD: Diob

      Reference to the diob to send.

    • OptionalpVar: string[]

      (Optional) Variable name or array of variable names.

    Returns void

    Server

  • Sends a packet to a client or server, depending on where the code is executed. Client code executing this will send the packet to the server. Server code executing this will send the packet to the client. This will invoke Client/onPacket on client-side if the sendPacket is server-side and on the server-side if it is on the client-side.

    Parameters

    • pName: string | number

      Name of packet to send.

    • pData: unknown

      An object containing data to be sent. Example: {'a': 1, 'b': 2}.

    • OptionalpForce: boolean

      (Optional) Send the packet immediately instead of buffering it with the packet delay.

    Returns void

    Client | Server

  • Sets the edge limit of the map for the client.

    Parameters

    • pX: number

      Number of black tiles visible on the left and right edges of the map; -1 for default.

    • pY: number

      Number of black tiles visible on the top and bottom edges of the map; -1 for default.

    Returns void

    Client | Server

  • Focuses on the interface element object.

    Returns void

    Client | Server

  • Stores pData as a string locally on the client's computer and can be referenced using pKey. Leaving pKey and pData blank will clear all local storage; 3000 characters are allowed to be saved per game (keys and values combined).

    Parameters

    • OptionalpKey: string

      Key used to reference the stored data.

    • OptionalpData: string

      Data as a string to store locally for the client.

    Returns void

    Client | Server

  • Changes the macro file the client uses.

    Parameters

    • pMacro: string

      Name of macro file to set client macros to.

    Returns void

    Client | Server

  • Sets the client's mainOutput.

    Parameters

    • pOutput: string

      Name of the interface element to send default messages to (ex: interface1.output1 ).

    Returns void

    Client | Server

  • Configures or updates the client's mapView viewport settings (dimensions, zoom bounds, padding). Passing null resets the mapView to default settings.

    Parameters

    • OptionalpView: null | string | Partial<MapViewConfig>

      MapView configuration options or preset string.

    Returns void

    Client | Server

    client.setMapView({
    width: 800,
    height: 600,
    zoom: { x: 1, y: 1 },
    preventAutoScale: true
    });
  • Sets the max FPS of the client to pFPS.

    Parameters

    • pFPS: number

      Cap the amount the FPS the client will try to reach when drawing the screen. Default is 60.

    Returns void

    Client | Server

  • Sets the cursor of the client.

    Parameters

    • pCursor: string

      A string containing the name of the cursor for built-in cursors, a URL path to an image, or a diob. Built-in (auto, all-scroll, crosshair, default, help, inherit, move, pointer, progress, text, vertical-text, wait, no-drop, not-allowed, e-resize, n-resize, s-resize, w-resize, col-resize, row-resize, ne-resize, nw-resize, se-resize, sw-resize). Passing a diob will use the diob's icon. Blank for default.

    • OptionalpX: number

      (Optional) Offsets the icon left or right by pX pixels.

    • OptionalpY: number

      (Optional) Offsets the icon up or down by pY pixels.

    Returns void

    Client | Server

  • Sets the client's overlays to the array pOver.

    Parameters

    • pOver: Diob[]

      Array of overlays to set this client's overlays to.

    Returns void

    Client | Server

  • Sets the variable pVar to pVal for the plane pPlane.

    Parameters

    • pPlane: number

      Value of plane to set.

    • OptionalpVar: string

      (Optional) String containing name of variable to set.

    • OptionalpVal: boolean

      (Optional) Value to give this plane's pVar variable.

    Returns void

    Client | Server

  • Sets the client's playerMob to pMob.

    Parameters

    • pMob: Diob

      Reference to a Mob diob to give this client control of.

    Returns void

    Client | Server

  • Sets the client's game screen size to pWidth width and pHeight height.

    Parameters

    • pWidth: number

      Width as a number.

    • pHeight: number

      Height as a number.

    Returns void

    Client | Server

  • Configures the client's screenView settings (scaling policies, pixel ratio, rendering resolutions). Passing null restores default viewport scaling settings.

    Parameters

    • OptionalpView: null | Partial<ScreenView>

      Screen view viewport configuration options.

    Returns void

    Client | Server

    client.setScreenView({
    scaleTo: 'ratio',
    scaleNearest: true,
    disableImageSmoothing: true,
    resolution: window.devicePixelRatio || 1
    });
  • Changes the name and layer of the top screen with the name pName. Adding data optional.

    Parameters

    • pName: string | number

      Name of the top screen to set.

    • pNewName: string

      New name of the top screen.

    • pNewLayer: number

      New layer of the top screen.

    • OptionalpNewData: any

      (Optional) Data to add to the screen.

    • OptionalpNewSet: object

      (Optional) New settings object.

    Returns void

    Client | Server

  • Sets the view eye of the client to be centered on pDiob. The default is the player mob.

    Parameters

    • pDiob: Diob

      Diob to have the client's screen view centered on.

    Returns void

    Client | Server

  • Sets the client's view eye delay which is how many pixels the screen can be off center of the view eye and how quickly it catches up to the view eye. Set step to 0 for no delay (the default).

    Parameters

    • pDelay: number

      Object containing eye delay information. Possible values step (determines number of pixels the eye moves per frame. Default 0) and max (object determining maximum distance in pixels the screen can be from the eye {'x': 100, 'y': 100}). Example: {step: 2, max: {'x': 100, 'y': 100}}.

    Returns void

    Client | Server

  • Sets the client's view eye offsets.

    Parameters

    • pX: number

      Amount of pixels for the screen to be offset from the client's view eye on the x-axis.

    • pY: number

      Amount of pixels for the screen to be offset from the client's view eye on the y-axis.

    Returns void

    Client | Server

  • Sets the HTML of the web box behind the game screen.

    Parameters

    • pBack: string

      String containing HTML to set use in the web box behind the game screen.

    Returns void

    Client | Server

  • Sets the content of the web tag with the id pID to the value of pContent.

    Parameters

    • pID: string

      Id of the web tag to set the content of.

    • pContent: string

      String containing the content to change the web tag's content to.

    Returns void

    Client | Server

  • Sets the focus on the web tag with the id pID.

    Parameters

    • pID: string

      Id of the web tag to set focus to.

    Returns void

    Client | Server

  • Sets the style of pStyle to the value of pValue of the web tag with the id pID.

    Parameters

    • pID: string

      Id of the web tag to set the style of.

    • pStyle: string

      Type of style to set.

    • pValue: string

      Value as a string to set the style to.

    Returns void

    Client | Server

  • Displays the interface of pInterface, if not already displayed, along with all elements of the interface with that are not hidden by default. If pElement is specified, it makes that element no longer hidden.

    Parameters

    • pInterface: string

      Name of interface to show.

    • OptionalpElement: Diob

      (Optional) Name of interface element in pInterface to show.

    • OptionalpForce: boolean

      (Optional) If set, all hidden elements will be forced to be shown.

    Returns void

    Client | Server

  • Moves the client.playerMob in the direction pDir until told to stop via endMove(pDir).

    Parameters

    • pDir: string

      Name of direction to move client.playerMob.

    Returns void

    Client | Server

  • Toggles load screen on and off.

    Parameters

    • OptionalpVal: boolean

      (Optional) True to show load screen, false to hide load screen.

    Returns void

    Client | Server

  • Toggles macro capturing on and off.

    Parameters

    • OptionalpVal: boolean

      (Optional) True to resume capturing macros, false to pause capturing macros.

    Returns void

    Client | Server

  • Toggles screen drawing on and off.

    Parameters

    • OptionalpVal: boolean

      (Optional) True to resume screen drawing, false to pause all screen drawing, map to pause only the map drawing.

    Returns void

    Client | Server

  • Executes 2D canvas drawing commands onto the top screen surface named pName.

    Parameters

    • pArgs: DrawCommandArgs | DrawCommandArgs[]

      A draw command configuration object or array of draw commands.

    • pName: string | number

      Target top screen identifier name or layer index.

    Returns void

    Client | Server

    client.topScreenDraw({
    type: 'fillRect',
    color: '#ff0000',
    x: 10,
    y: 10,
    width: 100,
    height: 50
    }, 'hud');
  • CLIENT-ONLY. Prompts the user to select one or more local files for upload, optionally posting them as multipart form data to pURL.

    Parameters

    • OptionalpURL: string

      Optional target endpoint URL to upload files to via POST.

    • OptionalpOptions: Record<string, string>

      Optional HTML attributes to set on the hidden <input type="file"> element (such as accept, multiple).

    Returns Promise<string | void>

    Resolves with the server's text response if uploaded to pURL, or resolves with void.

    Client

    await VYLO.Client.uploadFile('https://example.com/api/upload', { accept: 'image/*' });
    

Events

  • CLIENT-ONLY. Called when files are selected for upload via uploadFile. Return false (or a Promise resolving to false) to cancel the upload.

    Parameters

    • pFiles: FileList

      The native FileList containing the selected files.

    Returns boolean | Promise<boolean>

    Return false to abort the upload; otherwise return true.

    Client

  • Called when a key is pressed down.

    Parameters

    • pKey: string

      Name of key that was pressed.

    • OptionalpEvent: KeyboardEvent

      (Optional) The native KeyboardEvent triggered on the browser screen.

    Returns void

    Client | Server

  • Called when a key is released.

    Parameters

    • pKey: string

      Name of key that was released.

    • OptionalpEvent: KeyboardEvent

      (Optional) The native KeyboardEvent triggered on the browser screen.

    Returns void

    Client | Server

  • Called when a mouse button is clicked (press and release sequence) by this client.

    Parameters

    • pDiob: 0 | Diob

      The diob clicked, or 0 if clicked over empty space.

    • pX: number

      Horizontal coordinate of the click on the screen viewport.

    • pY: number

      Vertical coordinate of the click on the screen viewport.

    • pButton: MouseButton

      The mouse button clicked (MouseButton.Left, MouseButton.Middle, or MouseButton.Right).

    Returns void

    Client | Server

  • Called when a mouse button is double clicked by this client.

    Parameters

    • pDiob: 0 | Diob

      The diob double clicked, or 0 if double clicked over empty space.

    • pX: number

      Horizontal coordinate of the double click on the screen viewport.

    • pY: number

      Vertical coordinate of the double click on the screen viewport.

    • pButton: MouseButton

      The mouse button clicked (MouseButton.Left, MouseButton.Middle, or MouseButton.Right).

    Returns void

    Client | Server

  • Called when a mouse button is pressed by this client anywhere on screen or over a diob.

    Parameters

    • pDiob: 0 | Diob

      The diob instance underneath the cursor, or 0 if clicked on empty screen/map space.

    • pX: number

      Horizontal coordinate of the cursor on the screen viewport.

    • pY: number

      Vertical coordinate of the cursor on the screen viewport.

    • pButton: MouseButton

      The mouse button that was pressed (MouseButton.Left, MouseButton.Middle, or MouseButton.Right).

    Returns void

    Client | Server

    client.onMouseDown = (pDiob, pX, pY, pButton) => {
    if (pButton === MouseButton.Right) {
    console.log(`Right click at viewport (${pX}, ${pY})`);
    }
    };
  • Called when the mouse enters the bounding area of a diob.

    Parameters

    • pDiob: 0 | Diob

      The diob entered.

    • pX: number

      Horizontal viewport coordinate of the cursor.

    • pY: number

      Vertical viewport coordinate of the cursor.

    Returns void

    Client | Server

  • Called when the mouse exits the bounding area of a diob.

    Parameters

    • pDiob: 0 | Diob

      The diob exited.

    • pX: number

      Horizontal viewport coordinate of the cursor.

    • pY: number

      Vertical viewport coordinate of the cursor.

    Returns void

    Client | Server

  • Called when the mouse moves within the game window.

    Parameters

    • pDiob: 0 | Diob

      The diob currently hovered over, or 0 if none.

    • pX: number

      Horizontal viewport position of the mouse.

    • pY: number

      Vertical viewport position of the mouse.

    Returns void

    Client | Server

  • Called when a mouse button is released by this client.

    Parameters

    • pDiob: 0 | Diob

      The diob instance underneath the cursor, or 0 if released over empty screen/map space.

    • pX: number

      Horizontal coordinate of the cursor on the screen viewport.

    • pY: number

      Vertical coordinate of the cursor on the screen viewport.

    • pButton: MouseButton

      The mouse button that was released (MouseButton.Left, MouseButton.Middle, or MouseButton.Right).

    Returns void

    Client | Server

  • Called when the mouse wheel is scrolled downwards.

    Parameters

    • pDiob: 0 | Diob

      The diob underneath the cursor, or 0.

    • pX: number

      Horizontal viewport coordinate of the cursor.

    • pY: number

      Vertical viewport coordinate of the cursor.

    Returns void

    Client | Server

  • Called when the mouse wheel is scrolled upwards.

    Parameters

    • pDiob: 0 | Diob

      The diob underneath the cursor, or 0.

    • pX: number

      Horizontal viewport coordinate of the cursor.

    • pY: number

      Vertical viewport coordinate of the cursor.

    Returns void

    Client | Server

  • Called when a touch point is removed from the touch surface.

    Parameters

    • pDiob: 0 | Diob

      The diob instance underneath the touch point, or 0 if empty map/screen.

    • pX: number

      Horizontal coordinate of the touch point on the screen.

    • pY: number

      Vertical coordinate of the touch point on the screen.

    • OptionalpCancel: boolean

      (Optional) Whether the touch was cancelled (e.g. touchcancel event).

    • OptionalpEvent: TouchEvent

      (Optional) The native browser TouchEvent.

    Returns void

    Client | Server

  • Called when a touch point is moved along the touch surface.

    Parameters

    • pDiob: 0 | Diob

      The diob instance underneath the touch point, or 0 if empty map/screen.

    • pX: number

      Horizontal coordinate of the touch point on the screen.

    • pY: number

      Vertical coordinate of the touch point on the screen.

    • OptionalpEvent: TouchEvent

      (Optional) The native browser TouchEvent.

    Returns void

    Client | Server

  • Called when a touch point is placed on the touch surface.

    Parameters

    • pDiob: 0 | Diob

      The diob instance underneath the touch point, or 0 if empty map/screen.

    • pX: number

      Horizontal coordinate of the touch point on the screen.

    • pY: number

      Vertical coordinate of the touch point on the screen.

    • OptionalpEvent: TouchEvent

      (Optional) The native browser TouchEvent.

    Returns void

    Client | Server

    client.onTouchStart = (pDiob, pX, pY, pEvent) => {
    console.log(`Touch started at (${pX}, ${pY}) on`, pDiob);
    };