GamesScriptPlayers games.script-players@1

Generated at from openvibe-contracts v0.143.0 and openvibe-sdk v0.44.0.

Version
1.0.0
Owner
games
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/games/script-players.v1.json

games.script-players@1: game.players() (every player in the mod's place) and game.player(id) (one, or null), read-only (games.players.read).

Fields

This schema has no named fields.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: list
{
  "players": [
    {
      "id": "plr_1",
      "name": "scrapper",
      "pos": {
        "x": 1,
        "y": 0,
        "z": 2
      },
      "yaw": 1.5
    }
  ]
}
Valid: none
null
Rejected: no-name
{
  "players": [
    {
      "id": "plr_1"
    }
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('games.script-players@1', value);   // { valid, errors: [{ path, message }] }