Aller au contenu

Setting

Description of the setting field

interface SettingState {
    highQuality: boolean
    antiAliasing: boolean
    adaptiveFramerate: boolean
    hideTriggers: boolean
    hideAvatars: boolean
    settings: any
}

highQuality

Updated by: UI

Data model

highQuality: boolean

Enable the "High Quality" mode in the Player.

Examples

Enable the "High Quality" mode

{
  "setting":{
    ...
    "highQuality": true
    ...
}

antiAliasing

Updated by: UI

Enable the Anti-Aliasing in the Player.

Data model

antiAliasing: boolean

Examples

Enable the Anti-Aliasing

{
  "setting":{
    ...
    "antiAliasing": true
    ...
}

adaptiveFramerate

Updated by: UI

Enable the "Adaptive Framerate" setting in the Player.

Data model

adaptiveFramerate: boolean

Examples

Enable the "Adaptive Framerate" mode

{
  "setting":{
    ...
    "adaptiveFramerate": true
    ...
}

hideTriggers

Updated by: UI

Change the "Hide triggers" setting in the Player.

Data model

hideTriggers: boolean

Examples

Hide the triggers

{
  "setting":{
    ...
    "hideTriggers": true
    ...
}

hideAvatars

Updated by: UI

Change the "Hide avatars" setting in the Player.

Data model

hideAvatars: boolean

Examples

Hide the avatars

{
  "setting":{
    ...
    "hideAvatars": true
    ...
}

settings

Updated by: UI/Player

Set by the Player to communicate the internal settings of the Player to the UI during the initialization of the communication between the Player and the UI.

The settings are directly loaded from the application settings.

Data model

settings: any

Example

Set the application URL

{
  "setting": {
    "settings": {
      "general": {
        "app url": "https://smartshape.io.test"
        ...
      }
      ...
    }
    ...
  }
  ...
}

Operations done by the Player

When the Player is initialized, it sends its settings to the UI.

Here are the kind of operations done by the Player when loading the settings:

[
  {
    "op": "remove",
    "path": "/setting/settings"
  },
  {
    "op": "add",
    "path": "/setting/settings",
    "value": { ... }
  },
  {
    "op": "replace",
    "path": "/setting/settings/general/app url",
    "value": "https://smartshape.io.test"
  }
]

When the application URL is changed from the UI, the Player resolves the redirections and sets the resolved URL back:

[
  {
    "op": "replace",
    "path": "/setting/settings/general/app url",
    "value": "https://smartshape.io.test"
  }
]

November 24, 2022 March 8, 2022