use tuples for colours
This commit is contained in:
parent
1c55fae236
commit
6bfcd30558
8 changed files with 145 additions and 365 deletions
|
|
@ -171,12 +171,12 @@ export interface PlayerUpdateKey {
|
|||
|
||||
export type UnitNumber = UInt;
|
||||
|
||||
export interface Colour {
|
||||
red?: Float;
|
||||
green?: Float;
|
||||
blue?: Float;
|
||||
alpha?: Float;
|
||||
}
|
||||
export type Colour = [
|
||||
red: Float,
|
||||
green: Float,
|
||||
blue: Float,
|
||||
alpha: Float,
|
||||
];
|
||||
|
||||
export type MapEntityPosition = [
|
||||
x: Double,
|
||||
|
|
|
|||
|
|
@ -86,12 +86,12 @@ export namespace Converters {
|
|||
// }
|
||||
|
||||
export function mapColour(color: ColorTable): Colour {
|
||||
return {
|
||||
red: color.r ?? 0,
|
||||
green: color.g ?? 0,
|
||||
blue: color.b ?? 0,
|
||||
alpha: color.a ?? 0,
|
||||
}
|
||||
return [
|
||||
color.r ?? 0,
|
||||
color.g ?? 0,
|
||||
color.b ?? 0,
|
||||
color.a ?? 0,
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
"engines": {
|
||||
"node": "~14.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
},
|
||||
"devDependencies": {},
|
||||
"dependencies": {
|
||||
"lua-types": "^2.11.0",
|
||||
"typescript-to-lua": "1.4.3",
|
||||
|
|
@ -19,10 +18,7 @@
|
|||
},
|
||||
"// @types/node": "^12.0.8",
|
||||
"license": "UNLICENSED",
|
||||
"peerDependencies": {
|
||||
},
|
||||
"optionalDependencies": {
|
||||
},
|
||||
"bundledDependencies": [
|
||||
]
|
||||
"peerDependencies": {},
|
||||
"optionalDependencies": {},
|
||||
"bundledDependencies": []
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue