@rian8337/osu-strain-graph-generator 4.0.0-beta.7 → 4.0.0-beta.71
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 +169 -134
- package/package.json +12 -9
- package/typings/index.d.ts +43 -8
- package/dist/index.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -3,55 +3,56 @@
|
|
|
3
3
|
var osuBase = require('@rian8337/osu-base');
|
|
4
4
|
var canvas = require('canvas');
|
|
5
5
|
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
Copyright (c) Microsoft Corporation.
|
|
8
|
+
|
|
9
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
+
purpose with or without fee is hereby granted.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
13
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
14
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
16
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
17
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
+
***************************************************************************** */
|
|
20
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
24
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
27
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
29
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
34
|
+
var e = new Error(message);
|
|
35
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
36
|
+
};
|
|
37
|
+
|
|
6
38
|
/**
|
|
7
39
|
* Utility to draw a graph with only node-canvas.
|
|
8
40
|
*
|
|
9
41
|
* Used for creating strain graph of beatmaps.
|
|
10
42
|
*/
|
|
11
43
|
class Chart {
|
|
12
|
-
/**
|
|
13
|
-
* The canvas instance of this chart.
|
|
14
|
-
*/
|
|
15
|
-
canvas;
|
|
16
|
-
/**
|
|
17
|
-
* The 2D rendering surface for the drawing surface of this chart.
|
|
18
|
-
*/
|
|
19
|
-
context;
|
|
20
|
-
graphWidth;
|
|
21
|
-
graphHeight;
|
|
22
|
-
minX;
|
|
23
|
-
minY;
|
|
24
|
-
maxX;
|
|
25
|
-
maxY;
|
|
26
|
-
unitsPerTickX;
|
|
27
|
-
unitsPerTickY;
|
|
28
|
-
background;
|
|
29
|
-
xLabel;
|
|
30
|
-
yLabel;
|
|
31
|
-
xValueType;
|
|
32
|
-
yValueType;
|
|
33
|
-
pointRadius;
|
|
34
|
-
padding = 10;
|
|
35
|
-
tickSize = 10;
|
|
36
|
-
axisColor = "#555";
|
|
37
|
-
font = "12pt Calibri";
|
|
38
|
-
axisLabelFont = "bold 11pt Calibri";
|
|
39
|
-
fontHeight = 12;
|
|
40
|
-
baseLabelOffset = 15;
|
|
41
|
-
rangeX;
|
|
42
|
-
rangeY;
|
|
43
|
-
numXTicks;
|
|
44
|
-
numYTicks;
|
|
45
|
-
x;
|
|
46
|
-
y;
|
|
47
|
-
width;
|
|
48
|
-
height;
|
|
49
|
-
scaleX;
|
|
50
|
-
scaleY;
|
|
51
44
|
/**
|
|
52
45
|
* @param values Initializer options for the graph.
|
|
53
46
|
*/
|
|
54
47
|
constructor(values) {
|
|
48
|
+
var _a;
|
|
49
|
+
this.padding = 10;
|
|
50
|
+
this.tickSize = 10;
|
|
51
|
+
this.axisColor = "#424242";
|
|
52
|
+
this.font = "12pt Calibri";
|
|
53
|
+
this.axisLabelFont = "bold 11pt Calibri";
|
|
54
|
+
this.fontHeight = 12;
|
|
55
|
+
this.baseLabelOffset = 15;
|
|
55
56
|
this.graphWidth = values.graphWidth;
|
|
56
57
|
this.graphHeight = values.graphHeight;
|
|
57
58
|
this.canvas = canvas.createCanvas(this.graphWidth, this.graphHeight);
|
|
@@ -67,7 +68,7 @@ class Chart {
|
|
|
67
68
|
this.yLabel = values.yLabel;
|
|
68
69
|
this.xValueType = values.xValueType;
|
|
69
70
|
this.yValueType = values.yValueType;
|
|
70
|
-
this.pointRadius = Math.max(0, values.pointRadius
|
|
71
|
+
this.pointRadius = Math.max(0, (_a = values.pointRadius) !== null && _a !== void 0 ? _a : 1);
|
|
71
72
|
// Relationships
|
|
72
73
|
this.rangeX = this.maxX - this.minX;
|
|
73
74
|
this.rangeY = this.maxY - this.minY;
|
|
@@ -86,8 +87,12 @@ class Chart {
|
|
|
86
87
|
this.rangeY;
|
|
87
88
|
// Draw background and X and Y axis tick marks
|
|
88
89
|
this.setBackground();
|
|
89
|
-
this.
|
|
90
|
-
|
|
90
|
+
if (this.xLabel !== undefined) {
|
|
91
|
+
this.drawXAxis();
|
|
92
|
+
}
|
|
93
|
+
if (this.yLabel !== undefined) {
|
|
94
|
+
this.drawYAxis();
|
|
95
|
+
}
|
|
91
96
|
}
|
|
92
97
|
/**
|
|
93
98
|
* Draws a line graph with specified data, color, and line width.
|
|
@@ -140,11 +145,14 @@ class Chart {
|
|
|
140
145
|
c.lineTo(0, 0);
|
|
141
146
|
c.fill();
|
|
142
147
|
c.restore();
|
|
143
|
-
// Redraw axes since it gets
|
|
144
|
-
// overlapped by chart area
|
|
148
|
+
// Redraw axes since it gets overlapped by chart area.
|
|
145
149
|
if (color !== this.axisColor) {
|
|
146
|
-
this.
|
|
147
|
-
|
|
150
|
+
if (this.xLabel !== undefined) {
|
|
151
|
+
this.drawXAxis();
|
|
152
|
+
}
|
|
153
|
+
if (this.yLabel !== undefined) {
|
|
154
|
+
this.drawYAxis();
|
|
155
|
+
}
|
|
148
156
|
}
|
|
149
157
|
}
|
|
150
158
|
/**
|
|
@@ -155,15 +163,13 @@ class Chart {
|
|
|
155
163
|
}
|
|
156
164
|
/**
|
|
157
165
|
* Draws the X axis of the graph.
|
|
158
|
-
*
|
|
159
|
-
* @param drawLabel Whether or not to draw the axis label.
|
|
160
166
|
*/
|
|
161
|
-
drawXAxis(
|
|
167
|
+
drawXAxis() {
|
|
162
168
|
const c = this.context;
|
|
163
169
|
const labelOffset = this.xLabel ? this.baseLabelOffset : 0;
|
|
164
170
|
const yLabelOffset = this.yLabel ? this.baseLabelOffset : 0;
|
|
165
171
|
c.save();
|
|
166
|
-
if (this.xLabel
|
|
172
|
+
if (this.xLabel) {
|
|
167
173
|
c.textAlign = "center";
|
|
168
174
|
c.font = this.axisLabelFont;
|
|
169
175
|
c.fillText(this.xLabel, this.x + this.width / 2, this.y + this.height + labelOffset);
|
|
@@ -176,12 +182,12 @@ class Chart {
|
|
|
176
182
|
c.lineWidth = 2;
|
|
177
183
|
c.stroke();
|
|
178
184
|
// Draw tick marks
|
|
179
|
-
for (let n = 0; n
|
|
185
|
+
for (let n = 0; n <= this.numXTicks; ++n) {
|
|
180
186
|
c.beginPath();
|
|
181
|
-
c.moveTo((
|
|
187
|
+
c.moveTo((n * (this.width - yLabelOffset)) / this.numXTicks +
|
|
182
188
|
this.x +
|
|
183
189
|
yLabelOffset, this.y + this.height - labelOffset);
|
|
184
|
-
c.lineTo((
|
|
190
|
+
c.lineTo((n * (this.width - yLabelOffset)) / this.numXTicks +
|
|
185
191
|
this.x +
|
|
186
192
|
yLabelOffset, this.y + this.height - labelOffset - this.tickSize);
|
|
187
193
|
c.stroke();
|
|
@@ -191,20 +197,22 @@ class Chart {
|
|
|
191
197
|
c.fillStyle = "black";
|
|
192
198
|
c.textAlign = "center";
|
|
193
199
|
c.textBaseline = "middle";
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
if (this.xLabel !== undefined) {
|
|
201
|
+
for (let n = 0; n <= this.numXTicks; ++n) {
|
|
202
|
+
const label = Math.round((n * this.maxX) / this.numXTicks);
|
|
203
|
+
let stringLabel = label.toString();
|
|
204
|
+
switch (this.xValueType) {
|
|
205
|
+
case "time":
|
|
206
|
+
stringLabel = this.timeString(label);
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
c.save();
|
|
210
|
+
c.translate((n * (this.width - yLabelOffset)) / this.numXTicks +
|
|
211
|
+
this.x +
|
|
212
|
+
yLabelOffset, this.y + this.height + this.padding - labelOffset);
|
|
213
|
+
c.fillText(stringLabel, 0, 0);
|
|
214
|
+
c.restore();
|
|
201
215
|
}
|
|
202
|
-
c.save();
|
|
203
|
-
c.translate(((n + 1) * (this.width - yLabelOffset)) / this.numXTicks +
|
|
204
|
-
this.x +
|
|
205
|
-
yLabelOffset, this.y + this.height + this.padding - labelOffset);
|
|
206
|
-
c.fillText(stringLabel, 0, 0);
|
|
207
|
-
c.restore();
|
|
208
216
|
}
|
|
209
217
|
c.restore();
|
|
210
218
|
}
|
|
@@ -213,12 +221,12 @@ class Chart {
|
|
|
213
221
|
*
|
|
214
222
|
* @param drawLabel Whether or not to draw the axis label.
|
|
215
223
|
*/
|
|
216
|
-
drawYAxis(
|
|
224
|
+
drawYAxis() {
|
|
217
225
|
const c = this.context;
|
|
218
226
|
const labelOffset = this.yLabel ? this.baseLabelOffset : 0;
|
|
219
227
|
const xLabelOffset = this.xLabel ? this.baseLabelOffset : 0;
|
|
220
228
|
c.save();
|
|
221
|
-
if (this.yLabel
|
|
229
|
+
if (this.yLabel) {
|
|
222
230
|
c.textAlign = "center";
|
|
223
231
|
c.font = this.axisLabelFont;
|
|
224
232
|
c.translate(0, this.graphHeight);
|
|
@@ -234,11 +242,15 @@ class Chart {
|
|
|
234
242
|
c.stroke();
|
|
235
243
|
c.restore();
|
|
236
244
|
// Draw tick marks
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
245
|
+
if (this.yLabel !== undefined) {
|
|
246
|
+
for (let n = 0; n < this.numYTicks; ++n) {
|
|
247
|
+
c.beginPath();
|
|
248
|
+
c.moveTo(this.x + labelOffset, (n * (this.height - xLabelOffset)) / this.numYTicks +
|
|
249
|
+
this.y);
|
|
250
|
+
c.lineTo(this.x + labelOffset + this.tickSize, (n * (this.height - xLabelOffset)) / this.numYTicks +
|
|
251
|
+
this.y);
|
|
252
|
+
c.stroke();
|
|
253
|
+
}
|
|
242
254
|
}
|
|
243
255
|
// Draw values
|
|
244
256
|
c.font = this.font;
|
|
@@ -261,14 +273,16 @@ class Chart {
|
|
|
261
273
|
const c = this.context;
|
|
262
274
|
// Move context to point (0, 0) in graph
|
|
263
275
|
c.translate(this.x + (this.yLabel ? this.baseLabelOffset : 0), this.y + this.height - (this.xLabel ? this.baseLabelOffset : 0));
|
|
264
|
-
// Invert the Y scale so that it
|
|
265
|
-
// increments as we go upwards
|
|
276
|
+
// Invert the Y scale so that it increments as we go upwards
|
|
266
277
|
c.scale(1, -1);
|
|
267
278
|
}
|
|
268
279
|
/**
|
|
269
280
|
* Gets the longest width from each label text in Y axis.
|
|
270
281
|
*/
|
|
271
282
|
getLongestValueWidth() {
|
|
283
|
+
if (this.yLabel === undefined) {
|
|
284
|
+
return 0;
|
|
285
|
+
}
|
|
272
286
|
this.context.font = this.font;
|
|
273
287
|
let longestValueWidth = 0;
|
|
274
288
|
for (let n = 0; n < this.numYTicks; ++n) {
|
|
@@ -305,73 +319,94 @@ class Chart {
|
|
|
305
319
|
/**
|
|
306
320
|
* Time string parsing function for axis labels.
|
|
307
321
|
*/
|
|
308
|
-
timeString(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
322
|
+
timeString(seconds) {
|
|
323
|
+
seconds = Math.trunc(seconds);
|
|
324
|
+
const days = Math.floor(seconds / 86400);
|
|
325
|
+
seconds -= days * 86400;
|
|
326
|
+
const hours = Math.floor(seconds / 3600);
|
|
327
|
+
seconds -= hours * 3600;
|
|
328
|
+
const minutes = Math.floor(seconds / 60);
|
|
329
|
+
seconds -= minutes * 60;
|
|
330
|
+
const final = [minutes.toString(), seconds.toString().padStart(2, "0")];
|
|
331
|
+
if (hours > 0) {
|
|
332
|
+
final.unshift(hours.toString());
|
|
333
|
+
}
|
|
334
|
+
if (days > 0) {
|
|
335
|
+
final.unshift(days.toString());
|
|
336
|
+
}
|
|
337
|
+
return final.join(":");
|
|
313
338
|
}
|
|
314
339
|
}
|
|
315
340
|
|
|
316
341
|
/**
|
|
317
|
-
* Generates the strain chart of a
|
|
342
|
+
* Generates the strain chart of a beatmap and returns the chart as a buffer.
|
|
318
343
|
*
|
|
319
|
-
* @param
|
|
320
|
-
* @param
|
|
321
|
-
* @param
|
|
344
|
+
* @param beatmap The beatmap to generate the strain graph for.
|
|
345
|
+
* @param strainPeaks The strain peaks of the beatmap.
|
|
346
|
+
* @param clockRate The clock rate of the beatmap.
|
|
347
|
+
* @param options The options for the canvas.
|
|
322
348
|
*/
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
for (let i = 0; i < strainInformations.length; ++i) {
|
|
336
|
-
const aimStrain = calculator.strainPeaks.aimWithSliders[i] ?? 0;
|
|
337
|
-
const speedStrain = calculator.strainPeaks.speed[i] ?? 0;
|
|
338
|
-
const flashlightStrain = calculator.strainPeaks.flashlight[i] ?? 0;
|
|
339
|
-
strainInformations[i] = {
|
|
340
|
-
time: (currentSectionEnd + sectionLength * i) / 1000,
|
|
341
|
-
strain: calculator.mods.some((m) => m instanceof osuBase.ModFlashlight)
|
|
342
|
-
? (aimStrain + speedStrain + flashlightStrain) / 3
|
|
343
|
-
: (aimStrain + speedStrain) / 2,
|
|
349
|
+
function index (beatmap, strainPeaks, clockRate, options) {
|
|
350
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
351
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
352
|
+
const sectionLength = 400;
|
|
353
|
+
const currentSectionEnd = Math.ceil(beatmap.hitObjects.objects[0].startTime / sectionLength) *
|
|
354
|
+
sectionLength;
|
|
355
|
+
const strainInformations = new Array(Math.max(strainPeaks.aimWithSliders.length, strainPeaks.speed.length, strainPeaks.flashlight.length) + 1);
|
|
356
|
+
// Intentionally insert a 0 strain at 400ms less than the beginning
|
|
357
|
+
// of the first object to smoothen the end curve.
|
|
358
|
+
strainInformations[0] = {
|
|
359
|
+
strain: 0,
|
|
360
|
+
time: (currentSectionEnd - sectionLength) / 1000,
|
|
344
361
|
};
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
362
|
+
for (let i = 1; i < strainInformations.length; ++i) {
|
|
363
|
+
const aimStrain = (_a = strainPeaks.aimWithSliders[i]) !== null && _a !== void 0 ? _a : 0;
|
|
364
|
+
const speedStrain = (_b = strainPeaks.speed[i]) !== null && _b !== void 0 ? _b : 0;
|
|
365
|
+
const flashlightStrain = (_c = strainPeaks.flashlight[i]) !== null && _c !== void 0 ? _c : 0;
|
|
366
|
+
strainInformations[i] = {
|
|
367
|
+
time: (currentSectionEnd + sectionLength * (i - 1)) / 1000,
|
|
368
|
+
strain: strainPeaks.flashlight.length > 0
|
|
369
|
+
? (aimStrain + speedStrain + flashlightStrain) / 3
|
|
370
|
+
: (aimStrain + speedStrain) / 2,
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
const maxTime = (_e = (_d = strainInformations.at(-1)) === null || _d === void 0 ? void 0 : _d.time) !== null && _e !== void 0 ? _e : beatmap.hitObjects.objects.at(-1).endTime / 1000 / clockRate;
|
|
374
|
+
const maxStrain = Math.max(osuBase.MathUtils.max(strainInformations.map((v) => v.strain)), 1);
|
|
375
|
+
const maxXUnits = 10;
|
|
376
|
+
const maxYUnits = 10;
|
|
377
|
+
const unitsPerTickX = Math.ceil(maxTime / maxXUnits / 10) * 10;
|
|
378
|
+
const unitsPerTickY = maxStrain / maxYUnits / 20;
|
|
379
|
+
const chart = new Chart({
|
|
380
|
+
graphWidth: (_f = options === null || options === void 0 ? void 0 : options.width) !== null && _f !== void 0 ? _f : 600,
|
|
381
|
+
graphHeight: (_g = options === null || options === void 0 ? void 0 : options.height) !== null && _g !== void 0 ? _g : 150,
|
|
382
|
+
minX: 0,
|
|
383
|
+
minY: 0,
|
|
384
|
+
maxX: Math.ceil(maxTime / unitsPerTickX) * unitsPerTickX,
|
|
385
|
+
maxY: (options === null || options === void 0 ? void 0 : options.drawStrainAxis)
|
|
386
|
+
? Math.ceil(maxStrain / Math.ceil(unitsPerTickY) / 20) *
|
|
387
|
+
Math.ceil(unitsPerTickY) *
|
|
388
|
+
20
|
|
389
|
+
: maxStrain,
|
|
390
|
+
unitsPerTickX,
|
|
391
|
+
unitsPerTickY: (options === null || options === void 0 ? void 0 : options.drawStrainAxis)
|
|
392
|
+
? Math.ceil(unitsPerTickY) * 20
|
|
393
|
+
: unitsPerTickY,
|
|
394
|
+
background: (options === null || options === void 0 ? void 0 : options.beatmapsetID) !== undefined
|
|
395
|
+
? yield canvas.loadImage(`https://assets.ppy.sh/beatmaps/${options.beatmapsetID}/covers/cover.jpg`).catch(() => undefined)
|
|
396
|
+
: undefined,
|
|
397
|
+
xLabel: (options === null || options === void 0 ? void 0 : options.showTimeLabel) ? "Time" : "",
|
|
398
|
+
yLabel: (options === null || options === void 0 ? void 0 : options.drawStrainAxis)
|
|
399
|
+
? (options === null || options === void 0 ? void 0 : options.showStrainLabel)
|
|
400
|
+
? "Strain"
|
|
401
|
+
: ""
|
|
402
|
+
: undefined,
|
|
403
|
+
pointRadius: 0,
|
|
404
|
+
xValueType: "time",
|
|
405
|
+
});
|
|
406
|
+
chart.drawArea(strainInformations.map((v) => new osuBase.Vector2(v.time, v.strain)), (_h = options === null || options === void 0 ? void 0 : options.color) !== null && _h !== void 0 ? _h : "#000000");
|
|
407
|
+
return chart.getBuffer();
|
|
371
408
|
});
|
|
372
|
-
chart.drawArea(strainInformations.map((v) => new osuBase.Vector2(v.time, v.strain)), color);
|
|
373
|
-
return chart.getBuffer();
|
|
374
409
|
}
|
|
375
410
|
|
|
376
|
-
module.exports =
|
|
411
|
+
module.exports = index;
|
|
377
412
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-strain-graph-generator",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.71",
|
|
4
4
|
"description": "A module for generating strain graph of an osu!standard beatmap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -12,9 +12,12 @@
|
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"types": "typings/index.d.ts",
|
|
14
14
|
"typedocMain": "src/index.ts",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18"
|
|
17
|
+
},
|
|
15
18
|
"files": [
|
|
16
|
-
"dist
|
|
17
|
-
"typings
|
|
19
|
+
"dist/index.js",
|
|
20
|
+
"typings/index.d.ts"
|
|
18
21
|
],
|
|
19
22
|
"repository": {
|
|
20
23
|
"type": "git",
|
|
@@ -23,20 +26,20 @@
|
|
|
23
26
|
"scripts": {
|
|
24
27
|
"build": "rollup -c ../../rollup.config.mjs",
|
|
25
28
|
"lint": "eslint --ext ts",
|
|
26
|
-
"
|
|
29
|
+
"prepublishOnly": "npm run build",
|
|
27
30
|
"test": "echo \"No tests for this module\""
|
|
28
31
|
},
|
|
29
32
|
"bugs": {
|
|
30
33
|
"url": "https://github.com/Rian8337/osu-droid-module/issues"
|
|
31
34
|
},
|
|
32
35
|
"dependencies": {
|
|
33
|
-
"@rian8337/osu-base": "^4.0.0-beta.
|
|
34
|
-
"@rian8337/osu-difficulty-calculator": "^4.0.0-beta.
|
|
35
|
-
"@rian8337/osu-rebalance-difficulty-calculator": "^4.0.0-beta.
|
|
36
|
-
"canvas": "^
|
|
36
|
+
"@rian8337/osu-base": "^4.0.0-beta.71",
|
|
37
|
+
"@rian8337/osu-difficulty-calculator": "^4.0.0-beta.71",
|
|
38
|
+
"@rian8337/osu-rebalance-difficulty-calculator": "^4.0.0-beta.71",
|
|
39
|
+
"canvas": "^3.1.0"
|
|
37
40
|
},
|
|
38
41
|
"publishConfig": {
|
|
39
42
|
"access": "public"
|
|
40
43
|
},
|
|
41
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "5f5134e83a205e4425aedd8ea82affe505ec7568"
|
|
42
45
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -1,13 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Beatmap } from '@rian8337/osu-base';
|
|
2
|
+
import { StrainPeaks } from '@rian8337/osu-difficulty-calculator';
|
|
3
|
+
import { StrainPeaks as StrainPeaks$1 } from '@rian8337/osu-rebalance-difficulty-calculator';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Options for initializing the canvas.
|
|
7
|
+
*/
|
|
8
|
+
interface CanvasOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The beatmapset ID to get background image from. If omitted, the background will be plain white.
|
|
11
|
+
*/
|
|
12
|
+
readonly beatmapsetID?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The width of the canvas. Defaults to 600.
|
|
15
|
+
*/
|
|
16
|
+
readonly width?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The height of the canvas. Defaults to 150.
|
|
19
|
+
*/
|
|
20
|
+
readonly height?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The color of the graph. Defaults to black.
|
|
23
|
+
*/
|
|
24
|
+
readonly color?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to show the time label. Defaults to `false`.
|
|
27
|
+
*/
|
|
28
|
+
readonly showTimeLabel?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to show the strain axis. Defaults to `false`.
|
|
31
|
+
*/
|
|
32
|
+
readonly drawStrainAxis?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to show the strain label. Only active when `drawStrainAxis` is set to `true`. Defaults to `false`.
|
|
35
|
+
*/
|
|
36
|
+
readonly showStrainLabel?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generates the strain chart of a beatmap and returns the chart as a buffer.
|
|
6
40
|
*
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
41
|
+
* @param beatmap The beatmap to generate the strain graph for.
|
|
42
|
+
* @param strainPeaks The strain peaks of the beatmap.
|
|
43
|
+
* @param clockRate The clock rate of the beatmap.
|
|
44
|
+
* @param options The options for the canvas.
|
|
10
45
|
*/
|
|
11
|
-
declare function
|
|
46
|
+
declare function export_default(beatmap: Beatmap, strainPeaks: StrainPeaks | StrainPeaks$1, clockRate: number, options?: CanvasOptions): Promise<Buffer>;
|
|
12
47
|
|
|
13
|
-
export {
|
|
48
|
+
export { type CanvasOptions, export_default as default };
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/Chart.ts","../src/index.ts"],"sourcesContent":[null,null],"names":["createCanvas","ModFlashlight","loadImage","Vector2"],"mappings":";;;;;AA6EA;;;;AAIG;MACU,KAAK,CAAA;AACd;;AAEG;AACM,IAAA,MAAM,CAAS;AAExB;;AAEG;AACM,IAAA,OAAO,CAA2B;AAElC,IAAA,UAAU,CAAS;AACnB,IAAA,WAAW,CAAS;AACpB,IAAA,IAAI,CAAS;AACb,IAAA,IAAI,CAAS;AACb,IAAA,IAAI,CAAS;AACb,IAAA,IAAI,CAAS;AACb,IAAA,aAAa,CAAS;AACtB,IAAA,aAAa,CAAS;AACtB,IAAA,UAAU,CAAS;AACnB,IAAA,MAAM,CAAU;AAChB,IAAA,MAAM,CAAU;AAChB,IAAA,UAAU,CAAY;AACtB,IAAA,UAAU,CAAY;AACtB,IAAA,WAAW,CAAS;IAEZ,OAAO,GAAW,EAAE,CAAC;IACrB,QAAQ,GAAW,EAAE,CAAC;IACtB,SAAS,GAAW,MAAM,CAAC;IAC3B,IAAI,GAAW,cAAc,CAAC;IAC9B,aAAa,GAAW,mBAAmB,CAAC;IAC5C,UAAU,GAAW,EAAE,CAAC;IACxB,eAAe,GAAW,EAAE,CAAC;AAE7B,IAAA,MAAM,CAAS;AACf,IAAA,MAAM,CAAS;AACf,IAAA,SAAS,CAAS;AAClB,IAAA,SAAS,CAAS;AAClB,IAAA,CAAC,CAAS;AACV,IAAA,CAAC,CAAS;AACV,IAAA,KAAK,CAAS;AACd,IAAA,MAAM,CAAS;AACf,IAAA,MAAM,CAAS;AACf,IAAA,MAAM,CAAS;AAEhC;;AAEG;AACH,IAAA,WAAA,CAAY,MAAwB,EAAA;AAChC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACpC,Q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