sonolus-llsif-engine 1.0.0-beta.0 → 1.0.0
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/LICENSE.txt +21 -0
- package/README.md +69 -0
- package/dist/EngineData +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/nss/convert.cjs +5 -6
- package/dist/sifc/convert.cjs +5 -5
- package/dist/sifc/convert.d.cts +1 -1
- package/dist/sifc/index.d.cts +3 -4
- package/package.json +8 -8
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 NonSpicyBurrito
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Sonolus LLSIF Engine
|
|
2
|
+
|
|
3
|
+
A recreation of Love Live! School idol festival engine in [Sonolus](https://sonolus.com).
|
|
4
|
+
|
|
5
|
+
## Links
|
|
6
|
+
|
|
7
|
+
- [Sonolus Website](https://sonolus.com)
|
|
8
|
+
- [Sonolus Wiki](https://github.com/NonSpicyBurrito/sonolus-wiki)
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
npm install sonolus-llsif-engine
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Custom Resources
|
|
17
|
+
|
|
18
|
+
### Skin Sprites
|
|
19
|
+
|
|
20
|
+
| Name |
|
|
21
|
+
| ------------------------- |
|
|
22
|
+
| `LLSIF Connection Active` |
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
### `version`
|
|
27
|
+
|
|
28
|
+
Package version.
|
|
29
|
+
|
|
30
|
+
### `engineInfo`
|
|
31
|
+
|
|
32
|
+
Partial engine information compatible with [sonolus-express](https://github.com/NonSpicyBurrito/sonolus-express).
|
|
33
|
+
|
|
34
|
+
### `engineConfiguration`
|
|
35
|
+
|
|
36
|
+
Engine Configuration.
|
|
37
|
+
|
|
38
|
+
- `engineConfiguration.path`: path to file.
|
|
39
|
+
- `engineConfiguration.buffer`: buffer of file.
|
|
40
|
+
- `engineConfiguration.hash`: hash of file.
|
|
41
|
+
|
|
42
|
+
### `engineData`
|
|
43
|
+
|
|
44
|
+
Engine Data.
|
|
45
|
+
|
|
46
|
+
- `engineData.path`: path to file.
|
|
47
|
+
- `engineData.buffer`: buffer of file.
|
|
48
|
+
- `engineData.hash`: hash of file.
|
|
49
|
+
|
|
50
|
+
### `engineThumbnail`
|
|
51
|
+
|
|
52
|
+
Engine Thumbnail.
|
|
53
|
+
|
|
54
|
+
- `engineThumbnail.path`: path to file.
|
|
55
|
+
- `engineThumbnail.buffer`: buffer of file.
|
|
56
|
+
- `engineThumbnail.hash`: hash of file.
|
|
57
|
+
|
|
58
|
+
### `nssToSIFC(nss)`
|
|
59
|
+
|
|
60
|
+
Converts NSS (note setting asset) to SIFC (SIF Chart).
|
|
61
|
+
|
|
62
|
+
- `nss`: note setting asset.
|
|
63
|
+
|
|
64
|
+
### `sifcToLevelData(chart, offset?)`
|
|
65
|
+
|
|
66
|
+
Converts SIFC (SIF Chart) to Level Data.
|
|
67
|
+
|
|
68
|
+
- `chart`: SIF Chart.
|
|
69
|
+
- `offset`: offset (default: `0`).
|
package/dist/EngineData
CHANGED
|
Binary file
|
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ var convert_cjs_1 = require("./nss/convert.cjs");
|
|
|
6
6
|
Object.defineProperty(exports, "nssToSIFC", { enumerable: true, get: function () { return convert_cjs_1.nssToSIFC; } });
|
|
7
7
|
var convert_cjs_2 = require("./sifc/convert.cjs");
|
|
8
8
|
Object.defineProperty(exports, "sifcToLevelData", { enumerable: true, get: function () { return convert_cjs_2.sifcToLevelData; } });
|
|
9
|
-
exports.version = '1.0.0
|
|
9
|
+
exports.version = '1.0.0';
|
|
10
10
|
exports.engineInfo = {
|
|
11
11
|
name: 'llsif',
|
|
12
12
|
version: 8,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Resource } from './Resource.cjs';
|
|
2
2
|
export { nssToSIFC } from './nss/convert.cjs';
|
|
3
3
|
export { sifcToLevelData } from './sifc/convert.cjs';
|
|
4
|
-
export declare const version = "1.0.0
|
|
4
|
+
export declare const version = "1.0.0";
|
|
5
5
|
export declare const engineInfo: {
|
|
6
6
|
readonly name: "llsif";
|
|
7
7
|
readonly version: 8;
|
package/dist/nss/convert.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const index_cjs_1 = require("./index.cjs");
|
|
|
5
5
|
const nssToSIFC = (nss) => {
|
|
6
6
|
const objects = [
|
|
7
7
|
{
|
|
8
|
-
type: '
|
|
8
|
+
type: 'bpm',
|
|
9
9
|
beat: 0,
|
|
10
10
|
bpm: 60,
|
|
11
11
|
},
|
|
@@ -19,14 +19,14 @@ const nssToSIFC = (nss) => {
|
|
|
19
19
|
case index_cjs_1.NoteEffect.Tap2:
|
|
20
20
|
case index_cjs_1.NoteEffect.Tap4:
|
|
21
21
|
objects.push({
|
|
22
|
-
type: '
|
|
22
|
+
type: 'tap',
|
|
23
23
|
beat,
|
|
24
24
|
lane,
|
|
25
25
|
});
|
|
26
26
|
break;
|
|
27
27
|
case index_cjs_1.NoteEffect.TapHold:
|
|
28
28
|
objects.push({
|
|
29
|
-
type: '
|
|
29
|
+
type: 'tap',
|
|
30
30
|
beat,
|
|
31
31
|
lane,
|
|
32
32
|
hold: {
|
|
@@ -64,7 +64,7 @@ const nssToSIFC = (nss) => {
|
|
|
64
64
|
: 'Left';
|
|
65
65
|
if (note.effect === index_cjs_1.NoteEffect.Swing) {
|
|
66
66
|
objects.push({
|
|
67
|
-
type: '
|
|
67
|
+
type: 'swing',
|
|
68
68
|
beat,
|
|
69
69
|
lane,
|
|
70
70
|
direction,
|
|
@@ -72,7 +72,7 @@ const nssToSIFC = (nss) => {
|
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
74
|
objects.push({
|
|
75
|
-
type: '
|
|
75
|
+
type: 'swing',
|
|
76
76
|
beat,
|
|
77
77
|
lane,
|
|
78
78
|
direction,
|
|
@@ -85,7 +85,6 @@ const nssToSIFC = (nss) => {
|
|
|
85
85
|
}
|
|
86
86
|
return {
|
|
87
87
|
attribute: nss[0].notes_attribute - 1,
|
|
88
|
-
offset: 0,
|
|
89
88
|
objects,
|
|
90
89
|
};
|
|
91
90
|
};
|
package/dist/sifc/convert.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sifcToLevelData = void 0;
|
|
4
4
|
const sonolus_core_1 = require("sonolus-core");
|
|
5
|
-
function sifcToLevelData(chart) {
|
|
5
|
+
function sifcToLevelData(chart, offset = 0) {
|
|
6
6
|
const entities = [];
|
|
7
7
|
const beatToIntermediates = new Map();
|
|
8
8
|
const intermediateToRef = new Map();
|
|
@@ -90,7 +90,7 @@ function sifcToLevelData(chart) {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return {
|
|
93
|
-
bgmOffset:
|
|
93
|
+
bgmOffset: offset,
|
|
94
94
|
entities,
|
|
95
95
|
};
|
|
96
96
|
}
|
|
@@ -158,7 +158,7 @@ const hold = (head, beat, append) => {
|
|
|
158
158
|
});
|
|
159
159
|
};
|
|
160
160
|
const handlers = {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
bpm,
|
|
162
|
+
tap,
|
|
163
|
+
swing,
|
|
164
164
|
};
|
package/dist/sifc/convert.d.cts
CHANGED
package/dist/sifc/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type SIFChart = {
|
|
2
|
-
offset: number;
|
|
3
2
|
attribute: number;
|
|
4
3
|
objects: ChartObject[];
|
|
5
4
|
};
|
|
@@ -8,7 +7,7 @@ type ObjectBase = {
|
|
|
8
7
|
beat: number;
|
|
9
8
|
};
|
|
10
9
|
export type BPMObject = ObjectBase & {
|
|
11
|
-
type: '
|
|
10
|
+
type: 'bpm';
|
|
12
11
|
bpm: number;
|
|
13
12
|
};
|
|
14
13
|
type NoteBase = ObjectBase & {
|
|
@@ -16,10 +15,10 @@ type NoteBase = ObjectBase & {
|
|
|
16
15
|
hold?: ObjectBase;
|
|
17
16
|
};
|
|
18
17
|
export type TapNote = NoteBase & {
|
|
19
|
-
type: '
|
|
18
|
+
type: 'tap';
|
|
20
19
|
};
|
|
21
20
|
export type SwingNote = NoteBase & {
|
|
22
|
-
type: '
|
|
21
|
+
type: 'swing';
|
|
23
22
|
direction: 'Left' | 'Right';
|
|
24
23
|
};
|
|
25
24
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonolus-llsif-engine",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "A recreation of Love Live! School idol festival engine in Sonolus",
|
|
5
5
|
"author": "NonSpicyBurrito",
|
|
6
6
|
"repository": "github:NonSpicyBurrito/sonolus-llsif-engine",
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
"build": "tsc -p ./lib/tsconfig.json && sonolus-cli --build && node ./lib/build.mjs"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/node": "^16.18.
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
23
|
-
"@typescript-eslint/parser": "^5.59.
|
|
24
|
-
"eslint": "^8.
|
|
21
|
+
"@types/node": "^16.18.36",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
|
23
|
+
"@typescript-eslint/parser": "^5.59.11",
|
|
24
|
+
"eslint": "^8.42.0",
|
|
25
25
|
"eslint-config-prettier": "^8.8.0",
|
|
26
26
|
"eslint-plugin-prettier": "^4.2.1",
|
|
27
27
|
"prettier": "^2.8.8",
|
|
28
28
|
"prettier-plugin-organize-imports": "^3.2.2",
|
|
29
|
-
"sonolus-core": "~7.0.0
|
|
30
|
-
"sonolus.js": "~9.0.0
|
|
31
|
-
"typescript": "~5.
|
|
29
|
+
"sonolus-core": "~7.0.0",
|
|
30
|
+
"sonolus.js": "~9.0.0",
|
|
31
|
+
"typescript": "~5.1.3"
|
|
32
32
|
}
|
|
33
33
|
}
|