interfaces impl - wxyz-abcd/node-haxball GitHub Wiki
Impl
Implementation of Haxball's inner classes. Some important classes are exported through this object.
The explanations will be cut short, vague and sometimes partially ambiguous here; and only some of the properties of classes will be explored due to the potentially harmful nature of explaining these in detail.
The classes are put into 3 categories for now:
Core
1. Some important core classes used inside Haxball.
H
1.1. Point class.
1.1.1. Properties
x: number
: The x coordinate of the point.y: number
: The y coordinate of the point.
ka
1.2. TeamColors class.
1.2.1. Properties
angle: number
: The angle of stripes rendered inside a player.text: int
: The numeric color of the avatar text rendered inside a player.inner: int[]
: The numeric colors of each stripe rendered inside a player.
p
1.3. Team class
1.3.1. Static objects
spec: Team
: The static spectators team.red: Team
: The static red team.blue: Team
: The static blue team.byId: Team[]
: A static array to get all teams using their ids. Its definition isTeam.byId = [Team.spec, Team.red, Team.blue]
.
1.3.2. Properties
rival: Team
: The rival of current Team object.id: int
: The id of current Team object.color: int
: The numeric color value of current Team object.name: string
: The name of current Team object.colors: TeamColors
: Object that stores custom color values to render striped team colors.className: string
: Name of the class for HTML elements. Can be either "t-spec", "t-red", or "t-blue".
T
1.4. GeoLocation class
1.4.1. Properties
flag: string
: Two-letter country code.lon: number
: Longitudelat: number
: Latitude
Stream
2. These classes are used to read/write data from/to replay files and/or network/WebRTC stream.
F
2.1. StreamReader class
w
2.2. StreamWriter class
Utils
3. Some utility classes. (All of them may not be necessarily useful but still, why not export them?)
U
3.1. String operations 1
D
3.2. String operations 2
J
3.3. String operations 3
K
3.4. String operations 4
r
3.5. Mostly used for object casting
M
3.6. Webserver api operations
n
3.7. Connection constants
va
3.8. RoomList operations
q
3.9. Haxball's original global error class