# renderer

  • Property: renderer
  • Type: RpgRenderer
  • Optional: true
  • Read Only
  • Usage:

Get the rendering


# socket

  • Property: socket
  • Type: Socket
  • Optional: true
  • Read Only
  • Usage:

Get the socket


# globalConfig

  • Property: globalConfig
  • Type: object
  • Optional: true
  • Read Only
  • Usage:

retrieve the global configurations assigned at the entry point


# controls

Get the class managing the keyboard


# objects

  • Property: objects
  • Type: Observable< { [id: string]: { object: any, paramsChanged: any } } >
  • Optional: true
  • Read Only
  • Usage:

Read objects synchronized with the server


# tick

  • Since: 3.0.0-beta.5
  • Property: tick
  • Type: Observable<{ timestamp: number, deltaTime: number, frame: number }>
  • Optional: false
  • Read Only
  • Example:
client.tick.subscribe(({ timestamp, deltaTime, frame }) => {

})
  • Usage:

Listen to each frame


# Add Spritesheet

  • Since: 3.0.0-beta.3
  • Method: addSpriteSheet(spritesheetClass|spritesheetClass[])
  • Arguments:
    • { Class|Class[] } spritesheetClass. (Optional: false)
    • {string} url. Define the url of the resource (Optional: false)
    • {string} id. Define a resource identifier (Optional: false)
  • Return: Class
  • Usage:

Adds Spritesheet classes


# Add Sound

  • Since: 3.0.0-beta.3
  • Method: addSound(soundClass|soundClass[])
  • Arguments:
    • { Class|Class[] } soundClass. (Optional: false)
    • {string} url. Define the url of the resource (Optional: false)
    • {string} id. Define a resource identifier (Optional: false)
  • Return: Class
  • Usage:

Adds Sound classes


# Start Client Engine

  • Method: start()
  • Return: Promise< void >
  • Usage:

Starts the client side and connects to the server


# Next Frame

  • Since: 3.0.0-beta.5
  • Method: nextFrame()
  • Arguments:
    • {number} timestamp. Indicate the timestamp of the frame (Optional: false)
  • Usage:

Display the next frame. Useful for unit tests


# Connect to server

  • Method: connection()
  • Return: void
  • Usage:

Connect to the server


# vueApp

  • Property: vueApp
  • Type: Vue
  • Optional: true
  • Read Only
  • Usage:

VueJS Application instance

https://v3.vuejs.org/api/application-api.html


# vueInstance

  • Property: vueInstance
  • Type: Vue Instance
  • Optional: true
  • Read Only
  • Usage:

VueJS Parent component instance

https://v3.vuejs.org/api/instance-properties.html


# scene

  • Property: scene
  • Type: RpgScene
  • Optional: true
  • Read Only
  • Usage:

retrieves the current scene (SceneMap if you are on a map)


# Connect to server

  • Method: getScene()
  • Return: RpgScene
  • Usage:

retrieves the current scene (SceneMap if you are on a map)