@rian8337/osu-droid-replay-analyzer 4.0.0-beta.46 → 4.0.0-beta.48

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.
package/dist/index.js CHANGED
@@ -56,6 +56,27 @@ class CursorOccurrence {
56
56
  this.position = new osuBase.Vector2(x, y);
57
57
  this.id = id;
58
58
  }
59
+ /**
60
+ * Returns a string representation of this `CursorOccurrence`.
61
+ */
62
+ toString() {
63
+ let str = `${this.time}ms `;
64
+ switch (this.id) {
65
+ case exports.MovementType.down:
66
+ str += "Down";
67
+ break;
68
+ case exports.MovementType.up:
69
+ str += "Up";
70
+ break;
71
+ case exports.MovementType.move:
72
+ str += "Move";
73
+ break;
74
+ }
75
+ if (this.id !== exports.MovementType.up) {
76
+ str += ` (${this.position.x.toFixed(2)}, ${this.position.y.toFixed(2)})`;
77
+ }
78
+ return str;
79
+ }
59
80
  }
60
81
 
61
82
  /**
@@ -184,6 +205,12 @@ class CursorOccurrenceGroup {
184
205
  // l will be the first cursor occurrence with time > this._moves[l].time, but we want the one before it
185
206
  return this._moves[l - 1];
186
207
  }
208
+ /**
209
+ * Returns a string representation of this `CursorOccurrenceGroup`.
210
+ */
211
+ toString() {
212
+ return `Down: ${this.down.time}ms (${this.down.position.x.toFixed(2)}, ${this.down.position.y.toFixed(2)}) | Moves: ${this.moves.length} | Up: ${this.up ? `${this.up.time}ms` : "N/A"}`;
213
+ }
187
214
  }
188
215
 
189
216
  /**
@@ -2230,7 +2257,6 @@ class ReplayAnalyzer {
2230
2257
  const v = hitObjectData[i];
2231
2258
  const o = objects[i];
2232
2259
  if (o instanceof osuBase.Spinner || v.result === exports.HitResult.miss) {
2233
- accuracies.push(0);
2234
2260
  continue;
2235
2261
  }
2236
2262
  const { accuracy } = v;
@@ -2238,7 +2264,6 @@ class ReplayAnalyzer {
2238
2264
  // Do not include slider breaks.
2239
2265
  (-mehWindow > accuracy ||
2240
2266
  accuracy > Math.min(mehWindow, o.duration))) {
2241
- accuracies.push(0);
2242
2267
  continue;
2243
2268
  }
2244
2269
  accuracies.push(accuracy);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-droid-replay-analyzer",
3
- "version": "4.0.0-beta.46",
3
+ "version": "4.0.0-beta.48",
4
4
  "description": "A replay analyzer for analyzing osu!droid replay files.",
5
5
  "keywords": [
6
6
  "osu",
@@ -34,9 +34,9 @@
34
34
  "url": "https://github.com/Rian8337/osu-droid-module/issues"
35
35
  },
36
36
  "dependencies": {
37
- "@rian8337/osu-base": "^4.0.0-beta.44",
38
- "@rian8337/osu-difficulty-calculator": "^4.0.0-beta.44",
39
- "@rian8337/osu-rebalance-difficulty-calculator": "^4.0.0-beta.46",
37
+ "@rian8337/osu-base": "^4.0.0-beta.48",
38
+ "@rian8337/osu-difficulty-calculator": "^4.0.0-beta.48",
39
+ "@rian8337/osu-rebalance-difficulty-calculator": "^4.0.0-beta.48",
40
40
  "java-deserialization": "^0.1.0",
41
41
  "unzipper": "^0.10.11"
42
42
  },
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "efe2ba882932f2de27ec1228a4931385049d0fb6"
49
+ "gitHead": "da34d3703153595c0314e3a6bb62a0b989bae53a"
50
50
  }
@@ -39,6 +39,10 @@ declare class CursorOccurrence {
39
39
  */
40
40
  readonly id: MovementType;
41
41
  constructor(time: number, x: number, y: number, id: MovementType);
42
+ /**
43
+ * Returns a string representation of this `CursorOccurrence`.
44
+ */
45
+ toString(): string;
42
46
  }
43
47
 
44
48
  /**
@@ -117,6 +121,10 @@ declare class CursorOccurrenceGroup {
117
121
  * @returns The cursor occurrence at the given time, `null` if not found.
118
122
  */
119
123
  cursorAt(time: number): CursorOccurrence | null;
124
+ /**
125
+ * Returns a string representation of this `CursorOccurrenceGroup`.
126
+ */
127
+ toString(): string;
120
128
  }
121
129
 
122
130
  /**