Players
const Players = require("~system/Players");Methods
interface Request {}
interface Response {
players: Player[];
}
function getPlayersInScene(Request): Promise<Response>;Types
Last updated
const Players = require("~system/Players");interface Request {}
interface Response {
players: Player[];
}
function getPlayersInScene(Request): Promise<Response>;Last updated
interface Request {}
interface Response {
players: Player[];
}
function getConnectedPlayers(Request): Promise<Response>;interface Request {
// The user identifier, (for non-guests, their Ethereum address).
userId: string;
}
interface Response {
// The profile information for this user, if available.
data?: UserData;
}
function getPlayerData(Request): Promise<Response>;interface Player {
// The user identifier, (for non-guests, their Ethereum address).
userId: string;
}export interface UserData {
// The user identifier (i.e. their Ethereum address).
userId: string;
// A name to call them in the UI.
displayName: string;
// The Ethereum public key they sign with.
publicKey?: string;
// Whether they have web3 functionality enabled.
hasConnectedWeb3: boolean;
// The sequential version of this information, incremented on each user update.
version: number;
// Information about their avatar, if available.
avatar?: {
// Pointers to the assets required to render this avatar.
bodyShape: string;
wearables: string[];
// Hex-encoded RGB/RGBA color tints for different body parts.
skinColor: string;
hairColor: string;
eyeColor: string;
// File identifiers for the "photos" of this avatar.
snapshots?: {
face256: string;
body: string;
};
};
}