@rian8337/osu-droid-replay-analyzer 4.0.0-beta.45 → 4.0.0-beta.47

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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-droid-replay-analyzer",
3
- "version": "4.0.0-beta.45",
3
+ "version": "4.0.0-beta.47",
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.45",
37
+ "@rian8337/osu-base": "^4.0.0-beta.47",
38
+ "@rian8337/osu-difficulty-calculator": "^4.0.0-beta.47",
39
+ "@rian8337/osu-rebalance-difficulty-calculator": "^4.0.0-beta.47",
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": "de7b995e670f1703fcd134209d16fbc1c6788eb9"
49
+ "gitHead": "5d907d19c542a636041ed9a29c5a74c4f4c5501d"
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
  /**