sonolus-bandori-engine 1.2.1 → 1.4.0-alpha.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 +14 -30
- package/dist/EngineConfiguration +0 -0
- package/dist/EnginePlayData +0 -0
- package/dist/EnginePreviewData +0 -0
- package/dist/EngineTutorialData +0 -0
- package/dist/EngineWatchData +0 -0
- package/dist/bestdori/convert.cjs +32 -21
- package/dist/index.cjs +11 -10
- package/dist/index.d.cts +9 -9
- package/package.json +14 -13
- package/dist/Resource.cjs +0 -20
- package/dist/Resource.d.cts +0 -9
package/README.md
CHANGED
|
@@ -49,49 +49,33 @@ npm install sonolus-bandori-engine
|
|
|
49
49
|
|
|
50
50
|
Package version.
|
|
51
51
|
|
|
52
|
-
### `
|
|
52
|
+
### `databaseEngineItem`
|
|
53
53
|
|
|
54
|
-
Partial engine
|
|
54
|
+
Partial database engine item compatible with [sonolus-express](https://github.com/NonSpicyBurrito/sonolus-express).
|
|
55
55
|
|
|
56
|
-
### `
|
|
56
|
+
### `engineConfigurationPath`
|
|
57
57
|
|
|
58
|
-
Engine Configuration.
|
|
58
|
+
Path to Engine Configuration file.
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
- `engineConfiguration.buffer`: buffer of file.
|
|
62
|
-
- `engineConfiguration.hash`: hash of file.
|
|
60
|
+
### `enginePlayDataPath`
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
Path to Engine Play Data file.
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
### `engineWatchDataPath`
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
- `enginePlayData.buffer`: buffer of file.
|
|
70
|
-
- `enginePlayData.hash`: hash of file.
|
|
66
|
+
Path to Engine Watch Data file.
|
|
71
67
|
|
|
72
|
-
### `
|
|
68
|
+
### `enginePreviewDataPath`
|
|
73
69
|
|
|
74
|
-
Engine Preview Data.
|
|
70
|
+
Path to Engine Preview Data file.
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
- `enginePreviewData.buffer`: buffer of file.
|
|
78
|
-
- `enginePreviewData.hash`: hash of file.
|
|
72
|
+
### `engineTutorialDataPath`
|
|
79
73
|
|
|
80
|
-
|
|
74
|
+
Path to Engine Tutorial Data file.
|
|
81
75
|
|
|
82
|
-
|
|
76
|
+
### `engineThumbnailPath`
|
|
83
77
|
|
|
84
|
-
|
|
85
|
-
- `engineTutorialData.buffer`: buffer of file.
|
|
86
|
-
- `engineTutorialData.hash`: hash of file.
|
|
87
|
-
|
|
88
|
-
### `engineThumbnail`
|
|
89
|
-
|
|
90
|
-
Engine Thumbnail.
|
|
91
|
-
|
|
92
|
-
- `engineThumbnail.path`: path to file.
|
|
93
|
-
- `engineThumbnail.buffer`: buffer of file.
|
|
94
|
-
- `engineThumbnail.hash`: hash of file.
|
|
78
|
+
Path to Engine Thumbnail file.
|
|
95
79
|
|
|
96
80
|
### `bestdoriToLevelData(chart, offset?)`
|
|
97
81
|
|
package/dist/EngineConfiguration
CHANGED
|
Binary file
|
package/dist/EnginePlayData
CHANGED
|
Binary file
|
package/dist/EnginePreviewData
CHANGED
|
Binary file
|
package/dist/EngineTutorialData
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -16,7 +16,7 @@ function bestdoriToLevelData(chart, offset = 0) {
|
|
|
16
16
|
intermediateToRef.set(intermediate, ref);
|
|
17
17
|
const entity = intermediateToEntity.get(intermediate);
|
|
18
18
|
if (entity)
|
|
19
|
-
entity.
|
|
19
|
+
entity.name = ref;
|
|
20
20
|
return ref;
|
|
21
21
|
};
|
|
22
22
|
const append = (intermediate) => {
|
|
@@ -38,7 +38,7 @@ function bestdoriToLevelData(chart, offset = 0) {
|
|
|
38
38
|
}
|
|
39
39
|
const ref = intermediateToRef.get(intermediate);
|
|
40
40
|
if (ref)
|
|
41
|
-
entity.
|
|
41
|
+
entity.name = ref;
|
|
42
42
|
intermediateToEntity.set(intermediate, entity);
|
|
43
43
|
entities.push(entity);
|
|
44
44
|
for (const [name, value] of Object.entries(intermediate.data)) {
|
|
@@ -61,11 +61,6 @@ function bestdoriToLevelData(chart, offset = 0) {
|
|
|
61
61
|
data: {},
|
|
62
62
|
sim: false,
|
|
63
63
|
});
|
|
64
|
-
append({
|
|
65
|
-
archetype: 'InputManager',
|
|
66
|
-
data: {},
|
|
67
|
-
sim: false,
|
|
68
|
-
});
|
|
69
64
|
append({
|
|
70
65
|
archetype: 'Stage',
|
|
71
66
|
data: {},
|
|
@@ -126,9 +121,11 @@ const directional = (object, append) => {
|
|
|
126
121
|
});
|
|
127
122
|
};
|
|
128
123
|
const longAndSlide = (object, append) => {
|
|
124
|
+
let first;
|
|
129
125
|
let start;
|
|
130
126
|
let head;
|
|
131
127
|
const connectors = [];
|
|
128
|
+
const appends = [];
|
|
132
129
|
const connectorArchetype = object.connections
|
|
133
130
|
.slice(1, -1)
|
|
134
131
|
.some((connection) => connection.hidden)
|
|
@@ -136,17 +133,22 @@ const longAndSlide = (object, append) => {
|
|
|
136
133
|
: 'StraightSlideConnector';
|
|
137
134
|
for (const [i, connection] of object.connections.entries()) {
|
|
138
135
|
if (i === 0) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
first =
|
|
137
|
+
start =
|
|
138
|
+
head =
|
|
139
|
+
{
|
|
140
|
+
archetype: 'SlideStartNote',
|
|
141
|
+
data: {
|
|
142
|
+
[sonolus_core_1.EngineArchetypeDataName.Beat]: connection.beat,
|
|
143
|
+
lane: connection.lane - 3,
|
|
144
|
+
},
|
|
145
|
+
sim: true,
|
|
146
|
+
};
|
|
147
|
+
appends.push(first);
|
|
148
148
|
continue;
|
|
149
149
|
}
|
|
150
|
+
if (!first)
|
|
151
|
+
throw new Error('Unexpected missing first');
|
|
150
152
|
if (!start)
|
|
151
153
|
throw new Error('Unexpected missing start');
|
|
152
154
|
if (!head)
|
|
@@ -157,6 +159,7 @@ const longAndSlide = (object, append) => {
|
|
|
157
159
|
data: {
|
|
158
160
|
[sonolus_core_1.EngineArchetypeDataName.Beat]: connection.beat,
|
|
159
161
|
lane: connection.lane - 3,
|
|
162
|
+
first,
|
|
160
163
|
prev: start,
|
|
161
164
|
},
|
|
162
165
|
sim: true,
|
|
@@ -165,10 +168,12 @@ const longAndSlide = (object, append) => {
|
|
|
165
168
|
tail.data.long =
|
|
166
169
|
object.connections.length === 2 && head.data.lane === tail.data.lane ? 1 : 0;
|
|
167
170
|
}
|
|
168
|
-
|
|
171
|
+
appends.push(tail);
|
|
172
|
+
first.data.last = tail;
|
|
169
173
|
connectors.push({
|
|
170
174
|
archetype: connectorArchetype,
|
|
171
175
|
data: {
|
|
176
|
+
first,
|
|
172
177
|
start,
|
|
173
178
|
head,
|
|
174
179
|
tail,
|
|
@@ -177,8 +182,8 @@ const longAndSlide = (object, append) => {
|
|
|
177
182
|
});
|
|
178
183
|
for (const connector of connectors) {
|
|
179
184
|
connector.data.end = tail;
|
|
180
|
-
append(connector);
|
|
181
185
|
}
|
|
186
|
+
appends.push(...connectors);
|
|
182
187
|
connectors.length = 0;
|
|
183
188
|
continue;
|
|
184
189
|
}
|
|
@@ -191,10 +196,11 @@ const longAndSlide = (object, append) => {
|
|
|
191
196
|
},
|
|
192
197
|
sim: false,
|
|
193
198
|
};
|
|
194
|
-
|
|
199
|
+
appends.push(tail);
|
|
195
200
|
connectors.push({
|
|
196
201
|
archetype: connectorArchetype,
|
|
197
202
|
data: {
|
|
203
|
+
first,
|
|
198
204
|
start,
|
|
199
205
|
head,
|
|
200
206
|
tail,
|
|
@@ -209,14 +215,16 @@ const longAndSlide = (object, append) => {
|
|
|
209
215
|
data: {
|
|
210
216
|
[sonolus_core_1.EngineArchetypeDataName.Beat]: connection.beat,
|
|
211
217
|
lane: connection.lane - 3,
|
|
218
|
+
first,
|
|
212
219
|
prev: start,
|
|
213
220
|
},
|
|
214
221
|
sim: false,
|
|
215
222
|
};
|
|
216
|
-
|
|
223
|
+
appends.push(tail);
|
|
217
224
|
connectors.push({
|
|
218
225
|
archetype: connectorArchetype,
|
|
219
226
|
data: {
|
|
227
|
+
first,
|
|
220
228
|
start,
|
|
221
229
|
head,
|
|
222
230
|
tail,
|
|
@@ -225,11 +233,14 @@ const longAndSlide = (object, append) => {
|
|
|
225
233
|
});
|
|
226
234
|
for (const connector of connectors) {
|
|
227
235
|
connector.data.end = tail;
|
|
228
|
-
append(connector);
|
|
229
236
|
}
|
|
237
|
+
appends.push(...connectors);
|
|
230
238
|
connectors.length = 0;
|
|
231
239
|
start = head = tail;
|
|
232
240
|
}
|
|
241
|
+
for (const intermediate of appends) {
|
|
242
|
+
append(intermediate);
|
|
243
|
+
}
|
|
233
244
|
};
|
|
234
245
|
const system = () => {
|
|
235
246
|
// noop
|
package/dist/index.cjs
CHANGED
|
@@ -14,15 +14,15 @@ 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.
|
|
18
|
-
const
|
|
17
|
+
exports.engineThumbnailPath = exports.engineTutorialDataPath = exports.enginePreviewDataPath = exports.engineWatchDataPath = exports.enginePlayDataPath = exports.engineConfigurationPath = exports.databaseEngineItem = exports.version = exports.bestdoriToLevelData = void 0;
|
|
18
|
+
const node_path_1 = require("node:path");
|
|
19
19
|
var convert_cjs_1 = require("./bestdori/convert.cjs");
|
|
20
20
|
Object.defineProperty(exports, "bestdoriToLevelData", { enumerable: true, get: function () { return convert_cjs_1.bestdoriToLevelData; } });
|
|
21
21
|
__exportStar(require("./bestdori/index.cjs"), exports);
|
|
22
|
-
exports.version = '1.
|
|
23
|
-
exports.
|
|
22
|
+
exports.version = '1.4.0-alpha.0';
|
|
23
|
+
exports.databaseEngineItem = {
|
|
24
24
|
name: 'bandori',
|
|
25
|
-
version:
|
|
25
|
+
version: 12,
|
|
26
26
|
title: {
|
|
27
27
|
en: 'BanG Dream!',
|
|
28
28
|
ja: 'バンドリ!',
|
|
@@ -52,8 +52,9 @@ exports.engineInfo = {
|
|
|
52
52
|
].join('\n'),
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
55
|
+
exports.engineConfigurationPath = (0, node_path_1.resolve)(__dirname, 'EngineConfiguration');
|
|
56
|
+
exports.enginePlayDataPath = (0, node_path_1.resolve)(__dirname, 'EnginePlayData');
|
|
57
|
+
exports.engineWatchDataPath = (0, node_path_1.resolve)(__dirname, 'EngineWatchData');
|
|
58
|
+
exports.enginePreviewDataPath = (0, node_path_1.resolve)(__dirname, 'EnginePreviewData');
|
|
59
|
+
exports.engineTutorialDataPath = (0, node_path_1.resolve)(__dirname, 'EngineTutorialData');
|
|
60
|
+
exports.engineThumbnailPath = (0, node_path_1.resolve)(__dirname, 'thumbnail.png');
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Resource } from './Resource.cjs';
|
|
2
1
|
export { bestdoriToLevelData } from './bestdori/convert.cjs';
|
|
3
2
|
export * from './bestdori/index.cjs';
|
|
4
|
-
export declare const version = "1.
|
|
5
|
-
export declare const
|
|
3
|
+
export declare const version = "1.4.0-alpha.0";
|
|
4
|
+
export declare const databaseEngineItem: {
|
|
6
5
|
readonly name: "bandori";
|
|
7
|
-
readonly version:
|
|
6
|
+
readonly version: 12;
|
|
8
7
|
readonly title: {
|
|
9
8
|
readonly en: "BanG Dream!";
|
|
10
9
|
readonly ja: "バンドリ!";
|
|
@@ -26,8 +25,9 @@ export declare const engineInfo: {
|
|
|
26
25
|
readonly en: string;
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
28
|
+
export declare const engineConfigurationPath: string;
|
|
29
|
+
export declare const enginePlayDataPath: string;
|
|
30
|
+
export declare const engineWatchDataPath: string;
|
|
31
|
+
export declare const enginePreviewDataPath: string;
|
|
32
|
+
export declare const engineTutorialDataPath: string;
|
|
33
|
+
export declare const engineThumbnailPath: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonolus-bandori-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-alpha.0",
|
|
4
4
|
"description": "A recreation of BanG Dream! Girls Band Party engine in Sonolus",
|
|
5
5
|
"author": "NonSpicyBurrito",
|
|
6
6
|
"repository": "github:NonSpicyBurrito/sonolus-bandori-engine",
|
|
@@ -14,23 +14,24 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"dev:play": "sonolus-cli --dev ./play",
|
|
17
|
+
"dev:watch": "sonolus-cli --dev ./watch",
|
|
17
18
|
"dev:preview": "sonolus-cli --dev ./preview",
|
|
18
19
|
"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"
|
|
20
|
+
"prebuild": "tsc -p ./lib --noEmit && tsc -p ./shared --noEmit && tsc -p ./play --noEmit && tsc -p ./watch --noEmit && tsc -p ./preview --noEmit && tsc -p ./tutorial --noEmit && eslint . && prettier . --check",
|
|
21
|
+
"build": "tsc -p ./lib && sonolus-cli --build ./play && sonolus-cli --build ./watch && sonolus-cli --build ./preview && sonolus-cli --build ./tutorial && node ./lib/build.mjs"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"sonolus-core": "
|
|
24
|
+
"sonolus-core": "7.5.0-alpha.4"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@types/node": "^16.18.
|
|
27
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
28
|
-
"@typescript-eslint/parser": "^6.
|
|
29
|
-
"eslint": "^8.
|
|
30
|
-
"eslint-config-prettier": "^9.
|
|
31
|
-
"prettier": "^3.
|
|
32
|
-
"prettier-plugin-organize-imports": "^3.2.
|
|
33
|
-
"sonolus.js": "
|
|
34
|
-
"typescript": "~5.
|
|
27
|
+
"@types/node": "^16.18.68",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
29
|
+
"@typescript-eslint/parser": "^6.14.0",
|
|
30
|
+
"eslint": "^8.55.0",
|
|
31
|
+
"eslint-config-prettier": "^9.1.0",
|
|
32
|
+
"prettier": "^3.1.1",
|
|
33
|
+
"prettier-plugin-organize-imports": "^3.2.4",
|
|
34
|
+
"sonolus.js": "9.4.0-alpha.3",
|
|
35
|
+
"typescript": "~5.3.3"
|
|
35
36
|
}
|
|
36
37
|
}
|
package/dist/Resource.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Resource = void 0;
|
|
4
|
-
const node_crypto_1 = require("node:crypto");
|
|
5
|
-
const node_fs_1 = require("node:fs");
|
|
6
|
-
const node_path_1 = require("node:path");
|
|
7
|
-
class Resource {
|
|
8
|
-
constructor(path) {
|
|
9
|
-
this.path = (0, node_path_1.resolve)(__dirname, path);
|
|
10
|
-
}
|
|
11
|
-
get hash() {
|
|
12
|
-
this._hash ??= (0, node_crypto_1.createHash)('sha1').update(this.buffer).digest('hex');
|
|
13
|
-
return this._hash;
|
|
14
|
-
}
|
|
15
|
-
get buffer() {
|
|
16
|
-
this._buffer ??= (0, node_fs_1.readFileSync)(this.path);
|
|
17
|
-
return this._buffer;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.Resource = Resource;
|