import { AvatarEnum } from "./user"; export interface RankingTrackTeamItem { /** * Id of the team */ id: number; /** * Zero based ordinal number o the team in the Ranking (from 0 to 10) */ position: number; /** * Name of the team */ name: string; /** * Points of the team on every stage of the game */ points: number[]; /** * Main avatar of the team */ mainAvatar: AvatarEnum; } export interface RankingTrackProps { /** * The order of the items in the array will be used to * set the rack number of each team (from 0 to 10) */ teams: RankingTrackTeamItem[]; /** * Why do we have a separate value from points? * Because some times we will want them to have a minimum value * ir order to avoid to draw a team at the end of the track width * only one point when they have the best score. * To se this property, I will suggest something like: * Math.max(10, ...teams.map(i=>i.points)) */ maxPoints: number; /** * X Target Screen Offset to displace the track position * in the viewport (https://playground.babylonjs.com/#L4BACB#2) */ xOffset: number; /** * Y Target Screen Offset to displace the track position * in the viewport (https://playground.babylonjs.com/#L4BACB#2) */ yOffset: number; /** * Total stages ot the game */ totalStages: number; }