@rian8337/osu-difficulty-calculator 4.0.0-beta.85 → 4.0.0-beta.87
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 +6 -6
- package/package.json +6 -6
- package/typings/index.d.ts +6 -5
package/dist/index.js
CHANGED
|
@@ -409,7 +409,7 @@ class DifficultyHitObject {
|
|
|
409
409
|
this.lazyEndPosition = this.object.stackedPosition;
|
|
410
410
|
// Stop here if the slider has too short duration, allowing the player to essentially
|
|
411
411
|
// complete the slider without movement, making travel distance and time irrelevant.
|
|
412
|
-
if (osuBase.Precision.
|
|
412
|
+
if (osuBase.Precision.almostEquals(this.object.startTime, this.object.endTime)) {
|
|
413
413
|
return;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
@@ -542,7 +542,7 @@ class DroidDifficultyHitObject extends DifficultyHitObject {
|
|
|
542
542
|
}
|
|
543
543
|
previous(backwardsIndex) {
|
|
544
544
|
var _a;
|
|
545
|
-
return (_a = this.hitObjects[this.index - backwardsIndex]) !== null && _a !== void 0 ? _a : null;
|
|
545
|
+
return ((_a = this.hitObjects[this.index - backwardsIndex]) !== null && _a !== void 0 ? _a : null);
|
|
546
546
|
}
|
|
547
547
|
next(forwardsIndex) {
|
|
548
548
|
var _a;
|
|
@@ -1343,7 +1343,6 @@ class DroidReadingEvaluator {
|
|
|
1343
1343
|
*/
|
|
1344
1344
|
static calculateCurrentVisibleObjectsDensity(current) {
|
|
1345
1345
|
let visibleObjectCount = 0;
|
|
1346
|
-
let index = 0;
|
|
1347
1346
|
let next = current.next(0);
|
|
1348
1347
|
while (next) {
|
|
1349
1348
|
if (next.startTime - current.startTime > this.readingWindowSize ||
|
|
@@ -1352,13 +1351,14 @@ class DroidReadingEvaluator {
|
|
|
1352
1351
|
break;
|
|
1353
1352
|
}
|
|
1354
1353
|
if (next.isOverlapping(true)) {
|
|
1354
|
+
next = next.next(0);
|
|
1355
1355
|
continue;
|
|
1356
1356
|
}
|
|
1357
1357
|
const timeNerfFactor = this.getTimeNerfFactor(next.startTime - current.startTime);
|
|
1358
1358
|
visibleObjectCount +=
|
|
1359
1359
|
next.opacityAt(current.object.startTime, this.emptyModMap) *
|
|
1360
1360
|
timeNerfFactor;
|
|
1361
|
-
next =
|
|
1361
|
+
next = next.next(0);
|
|
1362
1362
|
}
|
|
1363
1363
|
return visibleObjectCount;
|
|
1364
1364
|
}
|
|
@@ -2297,7 +2297,7 @@ class PerformanceCalculator {
|
|
|
2297
2297
|
const miss = this.computedAccuracy.nmiss;
|
|
2298
2298
|
this.combo = (_b = options === null || options === void 0 ? void 0 : options.combo) !== null && _b !== void 0 ? _b : maxCombo - miss;
|
|
2299
2299
|
if ((options === null || options === void 0 ? void 0 : options.sliderEndsDropped) !== undefined &&
|
|
2300
|
-
|
|
2300
|
+
options.sliderTicksMissed !== undefined) {
|
|
2301
2301
|
this._usingClassicSliderAccuracy = false;
|
|
2302
2302
|
this._sliderEndsDropped = options.sliderEndsDropped;
|
|
2303
2303
|
this._sliderTicksMissed = options.sliderTicksMissed;
|
|
@@ -2908,7 +2908,7 @@ class OsuAimEvaluator {
|
|
|
2908
2908
|
const last = current.previous(0);
|
|
2909
2909
|
if (current.object instanceof osuBase.Spinner ||
|
|
2910
2910
|
current.index <= 1 ||
|
|
2911
|
-
|
|
2911
|
+
last.object instanceof osuBase.Spinner) {
|
|
2912
2912
|
return 0;
|
|
2913
2913
|
}
|
|
2914
2914
|
const lastLast = current.previous(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-difficulty-calculator",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.87",
|
|
4
4
|
"description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the current difficulty and performance algorithm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "rollup -c ../../rollup.config.mjs",
|
|
28
|
-
"lint": "eslint
|
|
29
|
-
"prepublishOnly": "
|
|
30
|
-
"test": "jest"
|
|
28
|
+
"lint": "eslint 'src/**/*.ts'",
|
|
29
|
+
"prepublishOnly": "pnpm build",
|
|
30
|
+
"test": "jest --silent"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/Rian8337/osu-droid-module/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@rian8337/osu-base": "
|
|
36
|
+
"@rian8337/osu-base": "4.0.0-beta.87"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "5678b07d0b7492bb61b2fdc5fd4a118ba680e609"
|
|
42
42
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -324,19 +324,19 @@ interface StrainPeaks {
|
|
|
324
324
|
/**
|
|
325
325
|
* The strain peaks of aim difficulty if sliders are considered.
|
|
326
326
|
*/
|
|
327
|
-
aimWithSliders: number[];
|
|
327
|
+
aimWithSliders: readonly number[];
|
|
328
328
|
/**
|
|
329
329
|
* The strain peaks of aim difficulty if sliders are not considered.
|
|
330
330
|
*/
|
|
331
|
-
aimWithoutSliders: number[];
|
|
331
|
+
aimWithoutSliders: readonly number[];
|
|
332
332
|
/**
|
|
333
333
|
* The strain peaks of speed difficulty.
|
|
334
334
|
*/
|
|
335
|
-
speed: number[];
|
|
335
|
+
speed: readonly number[];
|
|
336
336
|
/**
|
|
337
337
|
* The strain peaks of flashlight difficulty.
|
|
338
338
|
*/
|
|
339
|
-
flashlight: number[];
|
|
339
|
+
flashlight: readonly number[];
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
/**
|
|
@@ -1662,4 +1662,5 @@ declare abstract class OsuSpeedEvaluator {
|
|
|
1662
1662
|
static evaluateDifficultyOf(current: OsuDifficultyHitObject, mods: ModMap): number;
|
|
1663
1663
|
}
|
|
1664
1664
|
|
|
1665
|
-
export {
|
|
1665
|
+
export { DifficultyAttributes, DifficultyCalculator, DifficultyHitObject, DroidAim, DroidAimEvaluator, DroidDifficultyAttributes, DroidDifficultyCalculator, DroidDifficultyHitObject, DroidFlashlight, DroidFlashlightEvaluator, DroidPerformanceCalculator, DroidReading, DroidReadingEvaluator, DroidRhythm, DroidRhythmEvaluator, DroidTap, DroidTapEvaluator, ExtendedDroidDifficultyAttributes, OsuAim, OsuAimEvaluator, OsuDifficultyAttributes, OsuDifficultyCalculator, OsuDifficultyHitObject, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, PerformanceCalculator };
|
|
1666
|
+
export type { CacheableDifficultyAttributes, DifficultSlider, HighStrainSection, IDifficultyAttributes, IDroidDifficultyAttributes, IExtendedDroidDifficultyAttributes, IOsuDifficultyAttributes, PerformanceCalculationOptions, StrainPeaks };
|