sonolus-llsif-engine 1.5.2 → 1.6.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/dist/EnginePlayData +0 -0
- package/dist/{index.d.cts → index.d.ts} +5 -5
- package/dist/index.js +37 -0
- package/dist/nss/convert.d.ts +3 -0
- package/dist/nss/{convert.cjs → convert.js} +9 -13
- package/dist/nss/{index.cjs → index.js} +2 -5
- package/dist/sifc/{convert.d.cts → convert.d.ts} +1 -1
- package/dist/sifc/{convert.cjs → convert.js} +9 -12
- package/dist/sifc/index.js +1 -0
- package/package.json +18 -17
- package/dist/index.cjs +0 -56
- package/dist/nss/convert.d.cts +0 -3
- package/dist/sifc/index.cjs +0 -2
- /package/dist/nss/{index.d.cts → index.d.ts} +0 -0
- /package/dist/sifc/{index.d.cts → index.d.ts} +0 -0
package/dist/EnginePlayData
CHANGED
|
Binary file
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { nssToSIFC } from './nss/convert.
|
|
2
|
-
export * from './nss/index.
|
|
3
|
-
export { sifcToLevelData } from './sifc/convert.
|
|
4
|
-
export * from './sifc/index.
|
|
5
|
-
export declare const version = "1.
|
|
1
|
+
export { nssToSIFC } from './nss/convert.js';
|
|
2
|
+
export * from './nss/index.js';
|
|
3
|
+
export { sifcToLevelData } from './sifc/convert.js';
|
|
4
|
+
export * from './sifc/index.js';
|
|
5
|
+
export declare const version = "1.6.0";
|
|
6
6
|
export declare const databaseEngineItem: {
|
|
7
7
|
readonly name: "llsif";
|
|
8
8
|
readonly version: 13;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export { nssToSIFC } from './nss/convert.js';
|
|
2
|
+
export * from './nss/index.js';
|
|
3
|
+
export { sifcToLevelData } from './sifc/convert.js';
|
|
4
|
+
export * from './sifc/index.js';
|
|
5
|
+
export const version = '1.6.0';
|
|
6
|
+
export const databaseEngineItem = {
|
|
7
|
+
name: 'llsif',
|
|
8
|
+
version: 13,
|
|
9
|
+
title: {
|
|
10
|
+
en: 'Love Live!',
|
|
11
|
+
ja: 'ラブライブ!',
|
|
12
|
+
ko: '러브라이브',
|
|
13
|
+
zhs: 'Love Live!',
|
|
14
|
+
zht: 'Love Live!',
|
|
15
|
+
},
|
|
16
|
+
subtitle: {
|
|
17
|
+
en: 'Love Live! School idol festival',
|
|
18
|
+
ja: 'ラブライブ!スクールアイドルフェスティバル',
|
|
19
|
+
ko: '러브라이브 스쿨 아이돌 페스티벌',
|
|
20
|
+
zhs: 'Love Live! 学园偶像祭',
|
|
21
|
+
zht: 'Love Live! 學園偶像祭',
|
|
22
|
+
},
|
|
23
|
+
author: {
|
|
24
|
+
en: 'Burrito#1000',
|
|
25
|
+
},
|
|
26
|
+
description: {
|
|
27
|
+
en: [
|
|
28
|
+
'A recreation of Love Live! School idol festival engine in Sonolus.',
|
|
29
|
+
'',
|
|
30
|
+
'Version:',
|
|
31
|
+
version,
|
|
32
|
+
'',
|
|
33
|
+
'GitHub Repository:',
|
|
34
|
+
'https://github.com/NonSpicyBurrito/sonolus-llsif-engine',
|
|
35
|
+
].join('\n'),
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.nssToSIFC = void 0;
|
|
4
|
-
const index_cjs_1 = require("./index.cjs");
|
|
5
|
-
const nssToSIFC = (nss) => {
|
|
1
|
+
import { NSSNoteEffect } from './index.js';
|
|
2
|
+
export const nssToSIFC = (nss) => {
|
|
6
3
|
const objects = [
|
|
7
4
|
{
|
|
8
5
|
type: 'bpm',
|
|
@@ -15,16 +12,16 @@ const nssToSIFC = (nss) => {
|
|
|
15
12
|
const beat = note.timing_sec;
|
|
16
13
|
const lane = 5 - note.position;
|
|
17
14
|
switch (note.effect) {
|
|
18
|
-
case
|
|
19
|
-
case
|
|
20
|
-
case
|
|
15
|
+
case NSSNoteEffect.Tap1:
|
|
16
|
+
case NSSNoteEffect.Tap2:
|
|
17
|
+
case NSSNoteEffect.Tap4:
|
|
21
18
|
objects.push({
|
|
22
19
|
type: 'tap',
|
|
23
20
|
beat,
|
|
24
21
|
lane,
|
|
25
22
|
});
|
|
26
23
|
break;
|
|
27
|
-
case
|
|
24
|
+
case NSSNoteEffect.TapHold:
|
|
28
25
|
objects.push({
|
|
29
26
|
type: 'tap',
|
|
30
27
|
beat,
|
|
@@ -34,8 +31,8 @@ const nssToSIFC = (nss) => {
|
|
|
34
31
|
},
|
|
35
32
|
});
|
|
36
33
|
break;
|
|
37
|
-
case
|
|
38
|
-
case
|
|
34
|
+
case NSSNoteEffect.Swing:
|
|
35
|
+
case NSSNoteEffect.SwingHold: {
|
|
39
36
|
const notes = swings.get(note.notes_level);
|
|
40
37
|
if (notes) {
|
|
41
38
|
notes.push(note);
|
|
@@ -64,7 +61,7 @@ const nssToSIFC = (nss) => {
|
|
|
64
61
|
? 'Right'
|
|
65
62
|
: 'Left'
|
|
66
63
|
: 'Left';
|
|
67
|
-
if (note.effect ===
|
|
64
|
+
if (note.effect === NSSNoteEffect.Swing) {
|
|
68
65
|
objects.push({
|
|
69
66
|
type: 'swing',
|
|
70
67
|
beat,
|
|
@@ -90,4 +87,3 @@ const nssToSIFC = (nss) => {
|
|
|
90
87
|
objects,
|
|
91
88
|
};
|
|
92
89
|
};
|
|
93
|
-
exports.nssToSIFC = nssToSIFC;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NSSNoteEffect = void 0;
|
|
4
|
-
var NSSNoteEffect;
|
|
1
|
+
export var NSSNoteEffect;
|
|
5
2
|
(function (NSSNoteEffect) {
|
|
6
3
|
NSSNoteEffect[NSSNoteEffect["Tap1"] = 1] = "Tap1";
|
|
7
4
|
NSSNoteEffect[NSSNoteEffect["Tap2"] = 2] = "Tap2";
|
|
@@ -9,4 +6,4 @@ var NSSNoteEffect;
|
|
|
9
6
|
NSSNoteEffect[NSSNoteEffect["TapHold"] = 3] = "TapHold";
|
|
10
7
|
NSSNoteEffect[NSSNoteEffect["Swing"] = 11] = "Swing";
|
|
11
8
|
NSSNoteEffect[NSSNoteEffect["SwingHold"] = 13] = "SwingHold";
|
|
12
|
-
})(NSSNoteEffect || (
|
|
9
|
+
})(NSSNoteEffect || (NSSNoteEffect = {}));
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.sifcToLevelData = sifcToLevelData;
|
|
4
|
-
const core_1 = require("@sonolus/core");
|
|
5
|
-
function sifcToLevelData(chart, offset = 0) {
|
|
1
|
+
import { EngineArchetypeDataName, EngineArchetypeName, } from '@sonolus/core';
|
|
2
|
+
export function sifcToLevelData(chart, offset = 0) {
|
|
6
3
|
const entities = [];
|
|
7
4
|
const beatToIntermediates = new Map();
|
|
8
5
|
const intermediateToRef = new Map();
|
|
@@ -25,7 +22,7 @@ function sifcToLevelData(chart, offset = 0) {
|
|
|
25
22
|
data: [],
|
|
26
23
|
};
|
|
27
24
|
if (intermediate.sim) {
|
|
28
|
-
const beat = intermediate.data[
|
|
25
|
+
const beat = intermediate.data[EngineArchetypeDataName.Beat];
|
|
29
26
|
if (typeof beat !== 'number')
|
|
30
27
|
throw new Error('Unexpected beat');
|
|
31
28
|
const intermediates = beatToIntermediates.get(beat);
|
|
@@ -91,10 +88,10 @@ function sifcToLevelData(chart, offset = 0) {
|
|
|
91
88
|
}
|
|
92
89
|
const bpm = (object, append) => {
|
|
93
90
|
append({
|
|
94
|
-
archetype:
|
|
91
|
+
archetype: EngineArchetypeName.BpmChange,
|
|
95
92
|
data: {
|
|
96
|
-
[
|
|
97
|
-
[
|
|
93
|
+
[EngineArchetypeDataName.Beat]: object.beat,
|
|
94
|
+
[EngineArchetypeDataName.Bpm]: object.bpm,
|
|
98
95
|
},
|
|
99
96
|
sim: false,
|
|
100
97
|
});
|
|
@@ -103,7 +100,7 @@ const tap = (object, append) => {
|
|
|
103
100
|
const note = {
|
|
104
101
|
archetype: 'TapNote',
|
|
105
102
|
data: {
|
|
106
|
-
[
|
|
103
|
+
[EngineArchetypeDataName.Beat]: object.beat,
|
|
107
104
|
lane: object.lane,
|
|
108
105
|
},
|
|
109
106
|
sim: true,
|
|
@@ -119,7 +116,7 @@ const swing = (object, append) => {
|
|
|
119
116
|
const note = {
|
|
120
117
|
archetype: 'SwingNote',
|
|
121
118
|
data: {
|
|
122
|
-
[
|
|
119
|
+
[EngineArchetypeDataName.Beat]: object.beat,
|
|
123
120
|
lane: object.lane,
|
|
124
121
|
direction: object.direction === 'Left' ? -1 : 1,
|
|
125
122
|
},
|
|
@@ -137,7 +134,7 @@ const hold = (head, beat, append) => {
|
|
|
137
134
|
const tail = {
|
|
138
135
|
archetype: 'HoldNote',
|
|
139
136
|
data: {
|
|
140
|
-
[
|
|
137
|
+
[EngineArchetypeDataName.Beat]: beat,
|
|
141
138
|
prev: head,
|
|
142
139
|
},
|
|
143
140
|
sim: false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonolus-llsif-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.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",
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
+
"type": "module",
|
|
14
15
|
"exports": {
|
|
15
|
-
".": "./dist/index.
|
|
16
|
+
".": "./dist/index.js",
|
|
16
17
|
"./EngineConfiguration": "./dist/EngineConfiguration",
|
|
17
18
|
"./EnginePlayData": "./dist/EnginePlayData",
|
|
18
19
|
"./EngineWatchData": "./dist/EngineWatchData",
|
|
@@ -21,27 +22,27 @@
|
|
|
21
22
|
"./EngineThumbnail": "./dist/thumbnail.png"
|
|
22
23
|
},
|
|
23
24
|
"scripts": {
|
|
24
|
-
"dev
|
|
25
|
-
"dev
|
|
26
|
-
"dev
|
|
27
|
-
"dev
|
|
25
|
+
"dev-play": "sonolus-cli --dev ./play",
|
|
26
|
+
"dev-watch": "sonolus-cli --dev ./watch",
|
|
27
|
+
"dev-preview": "sonolus-cli --dev ./preview",
|
|
28
|
+
"dev-tutorial": "sonolus-cli --dev ./tutorial",
|
|
28
29
|
"check-type": "tsc -p ./lib --noEmit && tsc -p ./shared --noEmit && tsc -p ./play --noEmit && tsc -p ./watch --noEmit && tsc -p ./preview --noEmit && tsc -p ./tutorial --noEmit",
|
|
29
30
|
"check-lint": "eslint .",
|
|
30
31
|
"check-format": "prettier . --check",
|
|
31
|
-
"build": "tsc -p ./lib && sonolus-cli --build ./play && sonolus-cli --build ./watch && sonolus-cli --build ./preview && sonolus-cli --build ./tutorial && node ./lib/build.
|
|
32
|
+
"build": "tsc -p ./lib && sonolus-cli --build ./play && sonolus-cli --build ./watch && sonolus-cli --build ./preview && sonolus-cli --build ./tutorial && node ./lib/build.js"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@sonolus/core": "~7.
|
|
35
|
+
"@sonolus/core": "~7.14.0"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@eslint/js": "^9.
|
|
38
|
-
"@sonolus/sonolus.js": "~9.
|
|
39
|
-
"@types/node": "^
|
|
40
|
-
"eslint": "^9.
|
|
41
|
-
"eslint-config-prettier": "^10.1.
|
|
42
|
-
"prettier": "^3.
|
|
43
|
-
"prettier-plugin-organize-imports": "^4.
|
|
44
|
-
"typescript": "~5.8.
|
|
45
|
-
"typescript-eslint": "^8.
|
|
38
|
+
"@eslint/js": "^9.31.0",
|
|
39
|
+
"@sonolus/sonolus.js": "~9.6.0",
|
|
40
|
+
"@types/node": "^22.16.5",
|
|
41
|
+
"eslint": "^9.31.0",
|
|
42
|
+
"eslint-config-prettier": "^10.1.8",
|
|
43
|
+
"prettier": "^3.6.2",
|
|
44
|
+
"prettier-plugin-organize-imports": "^4.2.0",
|
|
45
|
+
"typescript": "~5.8.3",
|
|
46
|
+
"typescript-eslint": "^8.38.0"
|
|
46
47
|
}
|
|
47
48
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.databaseEngineItem = exports.version = exports.sifcToLevelData = exports.nssToSIFC = void 0;
|
|
18
|
-
var convert_cjs_1 = require("./nss/convert.cjs");
|
|
19
|
-
Object.defineProperty(exports, "nssToSIFC", { enumerable: true, get: function () { return convert_cjs_1.nssToSIFC; } });
|
|
20
|
-
__exportStar(require("./nss/index.cjs"), exports);
|
|
21
|
-
var convert_cjs_2 = require("./sifc/convert.cjs");
|
|
22
|
-
Object.defineProperty(exports, "sifcToLevelData", { enumerable: true, get: function () { return convert_cjs_2.sifcToLevelData; } });
|
|
23
|
-
__exportStar(require("./sifc/index.cjs"), exports);
|
|
24
|
-
exports.version = '1.5.2';
|
|
25
|
-
exports.databaseEngineItem = {
|
|
26
|
-
name: 'llsif',
|
|
27
|
-
version: 13,
|
|
28
|
-
title: {
|
|
29
|
-
en: 'Love Live!',
|
|
30
|
-
ja: 'ラブライブ!',
|
|
31
|
-
ko: '러브라이브',
|
|
32
|
-
zhs: 'Love Live!',
|
|
33
|
-
zht: 'Love Live!',
|
|
34
|
-
},
|
|
35
|
-
subtitle: {
|
|
36
|
-
en: 'Love Live! School idol festival',
|
|
37
|
-
ja: 'ラブライブ!スクールアイドルフェスティバル',
|
|
38
|
-
ko: '러브라이브 스쿨 아이돌 페스티벌',
|
|
39
|
-
zhs: 'Love Live! 学园偶像祭',
|
|
40
|
-
zht: 'Love Live! 學園偶像祭',
|
|
41
|
-
},
|
|
42
|
-
author: {
|
|
43
|
-
en: 'Burrito#1000',
|
|
44
|
-
},
|
|
45
|
-
description: {
|
|
46
|
-
en: [
|
|
47
|
-
'A recreation of Love Live! School idol festival engine in Sonolus.',
|
|
48
|
-
'',
|
|
49
|
-
'Version:',
|
|
50
|
-
exports.version,
|
|
51
|
-
'',
|
|
52
|
-
'GitHub Repository:',
|
|
53
|
-
'https://github.com/NonSpicyBurrito/sonolus-llsif-engine',
|
|
54
|
-
].join('\n'),
|
|
55
|
-
},
|
|
56
|
-
};
|
package/dist/nss/convert.d.cts
DELETED
package/dist/sifc/index.cjs
DELETED
|
File without changes
|
|
File without changes
|