@momo2555/koppeliajs 0.0.94 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,13 +43,19 @@ export declare class Koppelia {
|
|
|
43
43
|
*/
|
|
44
44
|
getGameId(): string;
|
|
45
45
|
/**
|
|
46
|
-
* Get the list of plays
|
|
46
|
+
* Get the list of plays, the plays returned by this function doesn't include the raw
|
|
47
|
+
* You have to call a function in from the play object to download all the raw files
|
|
47
48
|
* @param count limit of plays to get
|
|
48
49
|
* @param index index from which to start fetching the plays
|
|
49
50
|
* @param orderBy order by date or name
|
|
50
|
-
* @returns the List of plays an array of objects of type Play
|
|
51
|
+
* @returns the List of plays an array of objects of type Play,
|
|
51
52
|
*/
|
|
52
53
|
getPlays(count?: number, index?: number, orderBy?: string): Promise<Play[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Get the current play that has been set
|
|
56
|
+
* @returns the current play
|
|
57
|
+
*/
|
|
58
|
+
getCurrentPlay(): Promise<Play>;
|
|
53
59
|
/**
|
|
54
60
|
* This function enables the difficulty cursor, to change the difficulty in live when playing from Koppeli'App
|
|
55
61
|
* @param callback : callback to call when difficulty changes
|
package/dist/scripts/koppelia.js
CHANGED
|
@@ -113,11 +113,12 @@ export class Koppelia {
|
|
|
113
113
|
return PUBLIC_GAME_ID;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Get the list of plays
|
|
116
|
+
* Get the list of plays, the plays returned by this function doesn't include the raw
|
|
117
|
+
* You have to call a function in from the play object to download all the raw files
|
|
117
118
|
* @param count limit of plays to get
|
|
118
119
|
* @param index index from which to start fetching the plays
|
|
119
120
|
* @param orderBy order by date or name
|
|
120
|
-
* @returns the List of plays an array of objects of type Play
|
|
121
|
+
* @returns the List of plays an array of objects of type Play,
|
|
121
122
|
*/
|
|
122
123
|
async getPlays(count = 10, index = 0, orderBy = "date") {
|
|
123
124
|
return new Promise((resolve, reject) => {
|
|
@@ -138,6 +139,23 @@ export class Koppelia {
|
|
|
138
139
|
});
|
|
139
140
|
});
|
|
140
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Get the current play that has been set
|
|
144
|
+
* @returns the current play
|
|
145
|
+
*/
|
|
146
|
+
async getCurrentPlay() {
|
|
147
|
+
return new Promise((resolve, reject) => {
|
|
148
|
+
let getCuurentPlayRequest = new Message();
|
|
149
|
+
getCuurentPlayRequest.setRequest("getCurrentPlay");
|
|
150
|
+
getCuurentPlayRequest.setDestination(PeerType.MASTER, "");
|
|
151
|
+
this._console.sendMessage(getCuurentPlayRequest, (response) => {
|
|
152
|
+
let playData = response.getParam("play", {});
|
|
153
|
+
let playId = response.getParam("playId", "");
|
|
154
|
+
let play = new Play(this._console, playId, playData);
|
|
155
|
+
resolve(play);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
}
|
|
141
159
|
/**
|
|
142
160
|
* This function enables the difficulty cursor, to change the difficulty in live when playing from Koppeli'App
|
|
143
161
|
* @param callback : callback to call when difficulty changes
|
package/dist/styles/fonts.css
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'Luciole';
|
|
3
|
-
src: url('../assets/fonts/Luciole-Regular.ttf')
|
|
3
|
+
src: url('../assets/fonts/Luciole-Regular.ttf');
|
|
4
4
|
font-weight: normal;
|
|
5
5
|
font-style: normal;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
@font-face {
|
|
9
9
|
font-family: 'Luciole';
|
|
10
|
-
src: url('../assets/fonts/Luciole-Bold.ttf')
|
|
10
|
+
src: url('../assets/fonts/Luciole-Bold.ttf');
|
|
11
11
|
font-weight: bold;
|
|
12
12
|
font-style: normal;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@font-face {
|
|
16
16
|
font-family: 'Luciole';
|
|
17
|
-
src: url('../assets/fonts/Luciole-Regular-Italic.ttf')
|
|
17
|
+
src: url('../assets/fonts/Luciole-Regular-Italic.ttf');
|
|
18
18
|
font-weight: normal;
|
|
19
19
|
font-style: italic;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
@font-face {
|
|
23
23
|
font-family: 'Luciole';
|
|
24
|
-
src: url('../assets/fonts/Luciole-Bold-Italic.ttf')
|
|
24
|
+
src: url('../assets/fonts/Luciole-Bold-Italic.ttf');
|
|
25
25
|
font-weight: bold;
|
|
26
26
|
font-style: italic;
|
|
27
27
|
}
|