@rian8337/osu-strain-graph-generator 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +45 -5
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,11 +1,51 @@
1
- # `osu-strain-graph-generator`
1
+ # About
2
2
 
3
- > TODO: description
3
+ The strain graph generator portion of my osu! module.
4
4
 
5
- ## Usage
5
+ # Features
6
6
 
7
+ This module provides a strain graph generator for osu!standard gamemode.
8
+
9
+ # Specific Requirements
10
+
11
+ This module has no specific requirements, however installed modules in installation may have specific requirements. It's advised to check them.
12
+
13
+ # Installation
14
+
15
+ ```
16
+ npm i @rian8337/osu-base @rian8337/osu-difficulty-calculator @rian8337/osu-rebalance-difficulty-calculator
17
+ ```
18
+
19
+ or
20
+
21
+ ```
22
+ yarn add @rian8337/osu-base @rian8337/osu-difficulty-calculator @rian8337/osu-rebalance-difficulty-calculator
7
23
  ```
8
- const osuStrainGraphGenerator = require('osu-strain-graph-generator');
9
24
 
10
- // TODO: DEMONSTRATE API
25
+ You can exclude a difficulty module that you don't plan to use.
26
+
27
+ # Usage
28
+
29
+ The usage below works for rebalance difficulty calculator as well.
30
+
31
+ ```js
32
+ import { MapInfo } from "@rian8337/osu-base";
33
+ import { OsuStarRating } from "@rian8337/osu-difficulty-calculator";
34
+ import { default as getStrainChart } from "@rian8337/osu-strain-graph-generator";
35
+
36
+ (async () => {
37
+ const beatmapInfo = await MapInfo.getInformation({ beatmapID: 901854 });
38
+
39
+ if (!beatmapInfo.title) {
40
+ return console.log("Beatmap not found");
41
+ }
42
+
43
+ const rating = new OsuStarRating().calculate({
44
+ map: beatmapInfo.map,
45
+ });
46
+
47
+ const chart = await getStrainChart(rating);
48
+
49
+ console.log(chart);
50
+ })();
11
51
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-strain-graph-generator",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A module for generating strain graph of an osu!standard beatmap.",
5
5
  "keywords": [
6
6
  "osu",
@@ -28,13 +28,13 @@
28
28
  "url": "https://github.com/Rian8337/osu-droid-module/issues"
29
29
  },
30
30
  "dependencies": {
31
- "@rian8337/osu-base": "^1.0.0",
32
- "@rian8337/osu-difficulty-calculator": "^1.0.0",
33
- "@rian8337/osu-rebalance-difficulty-calculator": "^1.0.0",
31
+ "@rian8337/osu-base": "^1.0.1",
32
+ "@rian8337/osu-difficulty-calculator": "^1.0.1",
33
+ "@rian8337/osu-rebalance-difficulty-calculator": "^1.0.1",
34
34
  "canvas": "^2.9.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "e4fdb9c1ed6f90e70651c1aedfdb964b61cb240d"
39
+ "gitHead": "8406e60764d46fc30483b95f56a097f2c0245417"
40
40
  }