Class: com_prsonas_sdk_App

com_prsonas_sdk_App

App Class


new com_prsonas_sdk_App()

Constructs a new App object

Methods


close(closeAvatar)

Closes the viewer application

Parameters:
Name Type Description
closeAvatar boolean

If set to true then the avatar will close as well


broadcast(text)

Broadcasts a message to all web socket clients that are connected to the viewer

Parameters:
Name Type Description
text object

The data being broadcast.


hide()

Hides the viewer


show()

Un-hides the viewer


toggleVisibility()

Toggles the viewer application's visibility


resize(top, left, width, height)

Resize/moves the window to the specified size/location

Parameters:
Name Type Description
top int

The top coordinate of the top left corner of the viewer.

left int

The left coordinate of the top left corner of the viewer.

width int

The new width of the viewer.

height int

The new height of the viewer.


<async> getWindowRect(callback)

Returns the viewer's current screen coordinates.

Parameters:
Name Type Description
callback function

The callback that will be invoked with the window
rectangle values.


getSetting(name)

Parameters:
Name Type Description
name string

The name of the parameter to get the value of.


getCommandLineParameters()

Returns a lookup of all the parameters passed into the Viewer
application


getViewerVersion()

Returns the current version of the Viewer