sonolus-llsif-engine 1.0.2 → 1.2.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/README.md +21 -5
- package/dist/EngineConfiguration +0 -0
- package/dist/EnginePlayData +0 -0
- package/dist/EnginePreviewData +0 -0
- package/dist/EngineTutorialData +0 -0
- package/dist/Resource.d.cts +2 -2
- package/dist/index.cjs +6 -4
- package/dist/index.d.cts +5 -3
- package/dist/nss/convert.cjs +7 -5
- package/dist/nss/index.cjs +9 -8
- package/dist/nss/index.d.cts +8 -9
- package/dist/sifc/convert.cjs +12 -10
- package/package.json +18 -15
- package/dist/EngineData +0 -0
package/README.md
CHANGED
|
@@ -39,13 +39,29 @@ Engine Configuration.
|
|
|
39
39
|
- `engineConfiguration.buffer`: buffer of file.
|
|
40
40
|
- `engineConfiguration.hash`: hash of file.
|
|
41
41
|
|
|
42
|
-
### `
|
|
42
|
+
### `enginePlayData`
|
|
43
43
|
|
|
44
|
-
Engine Data.
|
|
44
|
+
Engine Play Data.
|
|
45
45
|
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
48
|
-
- `
|
|
46
|
+
- `enginePlayData.path`: path to file.
|
|
47
|
+
- `enginePlayData.buffer`: buffer of file.
|
|
48
|
+
- `enginePlayData.hash`: hash of file.
|
|
49
|
+
|
|
50
|
+
### `enginePreviewData`
|
|
51
|
+
|
|
52
|
+
Engine Preview Data.
|
|
53
|
+
|
|
54
|
+
- `enginePreviewData.path`: path to file.
|
|
55
|
+
- `enginePreviewData.buffer`: buffer of file.
|
|
56
|
+
- `enginePreviewData.hash`: hash of file.
|
|
57
|
+
|
|
58
|
+
### `engineTutorialData`
|
|
59
|
+
|
|
60
|
+
Engine Tutorial Data.
|
|
61
|
+
|
|
62
|
+
- `engineTutorialData.path`: path to file.
|
|
63
|
+
- `engineTutorialData.buffer`: buffer of file.
|
|
64
|
+
- `engineTutorialData.hash`: hash of file.
|
|
49
65
|
|
|
50
66
|
### `engineThumbnail`
|
|
51
67
|
|
package/dist/EngineConfiguration
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/Resource.d.cts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.engineThumbnail = exports.
|
|
17
|
+
exports.engineThumbnail = exports.engineTutorialData = exports.enginePreviewData = exports.enginePlayData = exports.engineConfiguration = exports.engineInfo = exports.version = exports.sifcToLevelData = exports.nssToSIFC = void 0;
|
|
18
18
|
const Resource_cjs_1 = require("./Resource.cjs");
|
|
19
19
|
var convert_cjs_1 = require("./nss/convert.cjs");
|
|
20
20
|
Object.defineProperty(exports, "nssToSIFC", { enumerable: true, get: function () { return convert_cjs_1.nssToSIFC; } });
|
|
@@ -22,10 +22,10 @@ __exportStar(require("./nss/index.cjs"), exports);
|
|
|
22
22
|
var convert_cjs_2 = require("./sifc/convert.cjs");
|
|
23
23
|
Object.defineProperty(exports, "sifcToLevelData", { enumerable: true, get: function () { return convert_cjs_2.sifcToLevelData; } });
|
|
24
24
|
__exportStar(require("./sifc/index.cjs"), exports);
|
|
25
|
-
exports.version = '1.0
|
|
25
|
+
exports.version = '1.2.0';
|
|
26
26
|
exports.engineInfo = {
|
|
27
27
|
name: 'llsif',
|
|
28
|
-
version:
|
|
28
|
+
version: 10,
|
|
29
29
|
title: {
|
|
30
30
|
en: 'Love Live!',
|
|
31
31
|
ja: 'ラブライブ!',
|
|
@@ -56,5 +56,7 @@ exports.engineInfo = {
|
|
|
56
56
|
},
|
|
57
57
|
};
|
|
58
58
|
exports.engineConfiguration = new Resource_cjs_1.Resource('EngineConfiguration');
|
|
59
|
-
exports.
|
|
59
|
+
exports.enginePlayData = new Resource_cjs_1.Resource('EnginePlayData');
|
|
60
|
+
exports.enginePreviewData = new Resource_cjs_1.Resource('EnginePreviewData');
|
|
61
|
+
exports.engineTutorialData = new Resource_cjs_1.Resource('EngineTutorialData');
|
|
60
62
|
exports.engineThumbnail = new Resource_cjs_1.Resource('thumbnail.png');
|
package/dist/index.d.cts
CHANGED
|
@@ -3,10 +3,10 @@ export { nssToSIFC } from './nss/convert.cjs';
|
|
|
3
3
|
export * from './nss/index.cjs';
|
|
4
4
|
export { sifcToLevelData } from './sifc/convert.cjs';
|
|
5
5
|
export * from './sifc/index.cjs';
|
|
6
|
-
export declare const version = "1.0
|
|
6
|
+
export declare const version = "1.2.0";
|
|
7
7
|
export declare const engineInfo: {
|
|
8
8
|
readonly name: "llsif";
|
|
9
|
-
readonly version:
|
|
9
|
+
readonly version: 10;
|
|
10
10
|
readonly title: {
|
|
11
11
|
readonly en: "Love Live!";
|
|
12
12
|
readonly ja: "ラブライブ!";
|
|
@@ -29,5 +29,7 @@ export declare const engineInfo: {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
export declare const engineConfiguration: Resource;
|
|
32
|
-
export declare const
|
|
32
|
+
export declare const enginePlayData: Resource;
|
|
33
|
+
export declare const enginePreviewData: Resource;
|
|
34
|
+
export declare const engineTutorialData: Resource;
|
|
33
35
|
export declare const engineThumbnail: Resource;
|
package/dist/nss/convert.cjs
CHANGED
|
@@ -53,15 +53,17 @@ const nssToSIFC = (nss) => {
|
|
|
53
53
|
const lane = 5 - note.position;
|
|
54
54
|
const next = notes[i + 1];
|
|
55
55
|
const prev = notes[i - 1];
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
56
57
|
const direction = next
|
|
57
58
|
? next.position > note.position
|
|
58
59
|
? 'Left'
|
|
59
60
|
: 'Right'
|
|
60
|
-
:
|
|
61
|
-
|
|
62
|
-
?
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
: // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
62
|
+
prev
|
|
63
|
+
? prev.position > note.position
|
|
64
|
+
? 'Right'
|
|
65
|
+
: 'Left'
|
|
66
|
+
: 'Left';
|
|
65
67
|
if (note.effect === index_cjs_1.NSSNoteEffect.Swing) {
|
|
66
68
|
objects.push({
|
|
67
69
|
type: 'swing',
|
package/dist/nss/index.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NSSNoteEffect = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
var NSSNoteEffect;
|
|
5
|
+
(function (NSSNoteEffect) {
|
|
6
|
+
NSSNoteEffect[NSSNoteEffect["Tap1"] = 1] = "Tap1";
|
|
7
|
+
NSSNoteEffect[NSSNoteEffect["Tap2"] = 2] = "Tap2";
|
|
8
|
+
NSSNoteEffect[NSSNoteEffect["Tap4"] = 4] = "Tap4";
|
|
9
|
+
NSSNoteEffect[NSSNoteEffect["TapHold"] = 3] = "TapHold";
|
|
10
|
+
NSSNoteEffect[NSSNoteEffect["Swing"] = 11] = "Swing";
|
|
11
|
+
NSSNoteEffect[NSSNoteEffect["SwingHold"] = 13] = "SwingHold";
|
|
12
|
+
})(NSSNoteEffect || (exports.NSSNoteEffect = NSSNoteEffect = {}));
|
package/dist/nss/index.d.cts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export type NSS = NSSNote[];
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export type NSSNoteEffect = (typeof NSSNoteEffect)[keyof typeof NSSNoteEffect];
|
|
2
|
+
export declare enum NSSNoteEffect {
|
|
3
|
+
Tap1 = 1,
|
|
4
|
+
Tap2 = 2,
|
|
5
|
+
Tap4 = 4,
|
|
6
|
+
TapHold = 3,
|
|
7
|
+
Swing = 11,
|
|
8
|
+
SwingHold = 13
|
|
9
|
+
}
|
|
11
10
|
export type NSSNote = {
|
|
12
11
|
timing_sec: number;
|
|
13
12
|
position: number;
|
package/dist/sifc/convert.cjs
CHANGED
|
@@ -27,7 +27,7 @@ function sifcToLevelData(chart, offset = 0) {
|
|
|
27
27
|
if (intermediate.sim) {
|
|
28
28
|
const beat = intermediate.data[sonolus_core_1.EngineArchetypeDataName.Beat];
|
|
29
29
|
if (typeof beat !== 'number')
|
|
30
|
-
throw 'Unexpected beat';
|
|
30
|
+
throw new Error('Unexpected beat');
|
|
31
31
|
const intermediates = beatToIntermediates.get(beat);
|
|
32
32
|
if (intermediates) {
|
|
33
33
|
intermediates.push(intermediate);
|
|
@@ -82,7 +82,7 @@ function sifcToLevelData(chart, offset = 0) {
|
|
|
82
82
|
for (const intermediate of intermediates) {
|
|
83
83
|
const entity = intermediateToEntity.get(intermediate);
|
|
84
84
|
if (!entity)
|
|
85
|
-
throw 'Unexpected missing entity';
|
|
85
|
+
throw new Error('Unexpected missing entity');
|
|
86
86
|
entity.data.push({
|
|
87
87
|
name: 'sim',
|
|
88
88
|
value: 1,
|
|
@@ -95,14 +95,16 @@ function sifcToLevelData(chart, offset = 0) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
exports.sifcToLevelData = sifcToLevelData;
|
|
98
|
-
const bpm = (object, append) =>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
const bpm = (object, append) => {
|
|
99
|
+
append({
|
|
100
|
+
archetype: sonolus_core_1.EngineArchetypeName.BpmChange,
|
|
101
|
+
data: {
|
|
102
|
+
[sonolus_core_1.EngineArchetypeDataName.Beat]: object.beat,
|
|
103
|
+
[sonolus_core_1.EngineArchetypeDataName.Bpm]: object.bpm,
|
|
104
|
+
},
|
|
105
|
+
sim: false,
|
|
106
|
+
});
|
|
107
|
+
};
|
|
106
108
|
const tap = (object, append) => {
|
|
107
109
|
const note = {
|
|
108
110
|
archetype: 'TapNote',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonolus-llsif-engine",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.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",
|
|
@@ -13,21 +13,24 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"dev": "sonolus-cli --dev",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
16
|
+
"dev:play": "sonolus-cli --dev ./play",
|
|
17
|
+
"dev:preview": "sonolus-cli --dev ./preview",
|
|
18
|
+
"dev:tutorial": "sonolus-cli --dev ./tutorial",
|
|
19
|
+
"prebuild": "tsc -p ./lib --noEmit && tsc -p ./shared --noEmit && tsc -p ./play --noEmit && tsc -p ./preview --noEmit && tsc -p ./tutorial --noEmit && eslint . && prettier . --check",
|
|
20
|
+
"build": "tsc -p ./lib && sonolus-cli --build ./play && sonolus-cli --build ./preview && sonolus-cli --build ./tutorial && node ./lib/build.mjs"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"sonolus-core": "~7.3.0"
|
|
19
24
|
},
|
|
20
25
|
"devDependencies": {
|
|
21
|
-
"@types/node": "^16.18.
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
23
|
-
"@typescript-eslint/parser": "^5.
|
|
24
|
-
"eslint": "^8.
|
|
25
|
-
"eslint-config-prettier": "^
|
|
26
|
-
"
|
|
27
|
-
"prettier": "^2.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"sonolus.js": "~9.0.0",
|
|
31
|
-
"typescript": "~5.1.3"
|
|
26
|
+
"@types/node": "^16.18.48",
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
|
28
|
+
"@typescript-eslint/parser": "^6.5.0",
|
|
29
|
+
"eslint": "^8.48.0",
|
|
30
|
+
"eslint-config-prettier": "^9.0.0",
|
|
31
|
+
"prettier": "^3.0.3",
|
|
32
|
+
"prettier-plugin-organize-imports": "^3.2.3",
|
|
33
|
+
"sonolus.js": "~9.2.0",
|
|
34
|
+
"typescript": "~5.2.2"
|
|
32
35
|
}
|
|
33
36
|
}
|
package/dist/EngineData
DELETED
|
Binary file
|