sonolus-voez-engine 1.2.2 → 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/index.cjs +11 -10
- package/dist/index.d.cts +9 -9
- package/dist/vc/convert.cjs +6 -10
- package/package.json +14 -13
- package/dist/Resource.cjs +0 -20
- package/dist/Resource.d.cts +0 -9
package/README.md
CHANGED
|
@@ -43,49 +43,33 @@ npm install sonolus-voez-engine
|
|
|
43
43
|
|
|
44
44
|
Package version.
|
|
45
45
|
|
|
46
|
-
### `
|
|
46
|
+
### `databaseEngineItem`
|
|
47
47
|
|
|
48
|
-
Partial engine
|
|
48
|
+
Partial database engine item compatible with [sonolus-express](https://github.com/NonSpicyBurrito/sonolus-express).
|
|
49
49
|
|
|
50
|
-
### `
|
|
50
|
+
### `engineConfigurationPath`
|
|
51
51
|
|
|
52
|
-
Engine Configuration.
|
|
52
|
+
Path to Engine Configuration file.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
- `engineConfiguration.buffer`: buffer of file.
|
|
56
|
-
- `engineConfiguration.hash`: hash of file.
|
|
54
|
+
### `enginePlayDataPath`
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
Path to Engine Play Data file.
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
### `engineWatchDataPath`
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
- `enginePlayData.buffer`: buffer of file.
|
|
64
|
-
- `enginePlayData.hash`: hash of file.
|
|
60
|
+
Path to Engine Watch Data file.
|
|
65
61
|
|
|
66
|
-
### `
|
|
62
|
+
### `enginePreviewDataPath`
|
|
67
63
|
|
|
68
|
-
Engine Preview Data.
|
|
64
|
+
Path to Engine Preview Data file.
|
|
69
65
|
|
|
70
|
-
|
|
71
|
-
- `enginePreviewData.buffer`: buffer of file.
|
|
72
|
-
- `enginePreviewData.hash`: hash of file.
|
|
66
|
+
### `engineTutorialDataPath`
|
|
73
67
|
|
|
74
|
-
|
|
68
|
+
Path to Engine Tutorial Data file.
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
### `engineThumbnailPath`
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
- `engineTutorialData.buffer`: buffer of file.
|
|
80
|
-
- `engineTutorialData.hash`: hash of file.
|
|
81
|
-
|
|
82
|
-
### `engineThumbnail`
|
|
83
|
-
|
|
84
|
-
Engine Thumbnail.
|
|
85
|
-
|
|
86
|
-
- `engineThumbnail.path`: path to file.
|
|
87
|
-
- `engineThumbnail.buffer`: buffer of file.
|
|
88
|
-
- `engineThumbnail.hash`: hash of file.
|
|
72
|
+
Path to Engine Thumbnail file.
|
|
89
73
|
|
|
90
74
|
### `vsToVC(vs)`
|
|
91
75
|
|
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
|
package/dist/index.cjs
CHANGED
|
@@ -14,18 +14,18 @@ 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.vsToVC = exports.vcToLevelData = void 0;
|
|
18
|
+
const node_path_1 = require("node:path");
|
|
19
19
|
var convert_cjs_1 = require("./vc/convert.cjs");
|
|
20
20
|
Object.defineProperty(exports, "vcToLevelData", { enumerable: true, get: function () { return convert_cjs_1.vcToLevelData; } });
|
|
21
21
|
__exportStar(require("./vc/index.cjs"), exports);
|
|
22
22
|
var convert_cjs_2 = require("./vs/convert.cjs");
|
|
23
23
|
Object.defineProperty(exports, "vsToVC", { enumerable: true, get: function () { return convert_cjs_2.vsToVC; } });
|
|
24
24
|
__exportStar(require("./vs/index.cjs"), exports);
|
|
25
|
-
exports.version = '1.
|
|
26
|
-
exports.
|
|
25
|
+
exports.version = '1.4.0-alpha.0';
|
|
26
|
+
exports.databaseEngineItem = {
|
|
27
27
|
name: 'voez',
|
|
28
|
-
version:
|
|
28
|
+
version: 12,
|
|
29
29
|
title: {
|
|
30
30
|
en: 'VOEZ',
|
|
31
31
|
},
|
|
@@ -47,8 +47,9 @@ exports.engineInfo = {
|
|
|
47
47
|
].join('\n'),
|
|
48
48
|
},
|
|
49
49
|
};
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
50
|
+
exports.engineConfigurationPath = (0, node_path_1.resolve)(__dirname, 'EngineConfiguration');
|
|
51
|
+
exports.enginePlayDataPath = (0, node_path_1.resolve)(__dirname, 'EnginePlayData');
|
|
52
|
+
exports.engineWatchDataPath = (0, node_path_1.resolve)(__dirname, 'EngineWatchData');
|
|
53
|
+
exports.enginePreviewDataPath = (0, node_path_1.resolve)(__dirname, 'EnginePreviewData');
|
|
54
|
+
exports.engineTutorialDataPath = (0, node_path_1.resolve)(__dirname, 'EngineTutorialData');
|
|
55
|
+
exports.engineThumbnailPath = (0, node_path_1.resolve)(__dirname, 'thumbnail.png');
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Resource } from './Resource.cjs';
|
|
2
1
|
export { vcToLevelData } from './vc/convert.cjs';
|
|
3
2
|
export * from './vc/index.cjs';
|
|
4
3
|
export { vsToVC } from './vs/convert.cjs';
|
|
5
4
|
export * from './vs/index.cjs';
|
|
6
|
-
export declare const version = "1.
|
|
7
|
-
export declare const
|
|
5
|
+
export declare const version = "1.4.0-alpha.0";
|
|
6
|
+
export declare const databaseEngineItem: {
|
|
8
7
|
readonly name: "voez";
|
|
9
|
-
readonly version:
|
|
8
|
+
readonly version: 12;
|
|
10
9
|
readonly title: {
|
|
11
10
|
readonly en: "VOEZ";
|
|
12
11
|
};
|
|
@@ -20,8 +19,9 @@ export declare const engineInfo: {
|
|
|
20
19
|
readonly en: string;
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
22
|
+
export declare const engineConfigurationPath: string;
|
|
23
|
+
export declare const enginePlayDataPath: string;
|
|
24
|
+
export declare const engineWatchDataPath: string;
|
|
25
|
+
export declare const enginePreviewDataPath: string;
|
|
26
|
+
export declare const engineTutorialDataPath: string;
|
|
27
|
+
export declare const engineThumbnailPath: string;
|
package/dist/vc/convert.cjs
CHANGED
|
@@ -46,10 +46,6 @@ const vcToLevelData = (vc, offset = 0) => {
|
|
|
46
46
|
archetype: 'Initialization',
|
|
47
47
|
data: [],
|
|
48
48
|
},
|
|
49
|
-
{
|
|
50
|
-
archetype: 'InputManager',
|
|
51
|
-
data: [],
|
|
52
|
-
},
|
|
53
49
|
{
|
|
54
50
|
archetype: 'Stage',
|
|
55
51
|
data: [],
|
|
@@ -82,7 +78,7 @@ const vcToLevelData = (vc, offset = 0) => {
|
|
|
82
78
|
};
|
|
83
79
|
const addCommands = (commands, archetype, dataName) => {
|
|
84
80
|
const entities = commands.map((command) => ({
|
|
85
|
-
|
|
81
|
+
name: next(),
|
|
86
82
|
archetype,
|
|
87
83
|
data: {
|
|
88
84
|
trackRef: ref,
|
|
@@ -94,7 +90,7 @@ const vcToLevelData = (vc, offset = 0) => {
|
|
|
94
90
|
},
|
|
95
91
|
}));
|
|
96
92
|
if (entities.length) {
|
|
97
|
-
data[dataName] = entities[0].
|
|
93
|
+
data[dataName] = entities[0].name;
|
|
98
94
|
}
|
|
99
95
|
for (const [index, entity] of entities.entries()) {
|
|
100
96
|
if (index === entities.length - 1) {
|
|
@@ -105,7 +101,7 @@ const vcToLevelData = (vc, offset = 0) => {
|
|
|
105
101
|
...entity,
|
|
106
102
|
data: {
|
|
107
103
|
...entity.data,
|
|
108
|
-
nextRef: entities[index + 1].
|
|
104
|
+
nextRef: entities[index + 1].name,
|
|
109
105
|
},
|
|
110
106
|
});
|
|
111
107
|
}
|
|
@@ -115,7 +111,7 @@ const vcToLevelData = (vc, offset = 0) => {
|
|
|
115
111
|
addCommands(track.scaleCommands, 'TrackScaleCommand', 'scaleRef');
|
|
116
112
|
addCommands(track.colorCommands, 'TrackColorCommand', 'colorRef');
|
|
117
113
|
add({
|
|
118
|
-
ref,
|
|
114
|
+
name: ref,
|
|
119
115
|
archetype: 'Track',
|
|
120
116
|
data,
|
|
121
117
|
});
|
|
@@ -153,7 +149,7 @@ const vcToLevelData = (vc, offset = 0) => {
|
|
|
153
149
|
const headRef = next();
|
|
154
150
|
const tailRef = next();
|
|
155
151
|
add({
|
|
156
|
-
|
|
152
|
+
name: headRef,
|
|
157
153
|
archetype: 'HoldStartNote',
|
|
158
154
|
data: {
|
|
159
155
|
trackRef: ref,
|
|
@@ -161,7 +157,7 @@ const vcToLevelData = (vc, offset = 0) => {
|
|
|
161
157
|
},
|
|
162
158
|
});
|
|
163
159
|
add({
|
|
164
|
-
|
|
160
|
+
name: tailRef,
|
|
165
161
|
archetype: 'HoldEndNote',
|
|
166
162
|
data: {
|
|
167
163
|
trackRef: ref,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonolus-voez-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-alpha.0",
|
|
4
4
|
"description": "A recreation of VOEZ engine in Sonolus",
|
|
5
5
|
"author": "NonSpicyBurrito",
|
|
6
6
|
"repository": "github:NonSpicyBurrito/sonolus-voez-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.4",
|
|
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;
|