sonolus-voez-engine 1.3.0 → 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 CHANGED
@@ -43,57 +43,33 @@ npm install sonolus-voez-engine
43
43
 
44
44
  Package version.
45
45
 
46
- ### `engineInfo`
46
+ ### `databaseEngineItem`
47
47
 
48
- Partial engine information compatible with [sonolus-express](https://github.com/NonSpicyBurrito/sonolus-express).
48
+ Partial database engine item compatible with [sonolus-express](https://github.com/NonSpicyBurrito/sonolus-express).
49
49
 
50
- ### `engineConfiguration`
50
+ ### `engineConfigurationPath`
51
51
 
52
- Engine Configuration.
52
+ Path to Engine Configuration file.
53
53
 
54
- - `engineConfiguration.path`: path to file.
55
- - `engineConfiguration.buffer`: buffer of file.
56
- - `engineConfiguration.hash`: hash of file.
54
+ ### `enginePlayDataPath`
57
55
 
58
- ### `enginePlayData`
56
+ Path to Engine Play Data file.
59
57
 
60
- Engine Play Data.
58
+ ### `engineWatchDataPath`
61
59
 
62
- - `enginePlayData.path`: path to file.
63
- - `enginePlayData.buffer`: buffer of file.
64
- - `enginePlayData.hash`: hash of file.
60
+ Path to Engine Watch Data file.
65
61
 
66
- ### `engineWatchData`
62
+ ### `enginePreviewDataPath`
67
63
 
68
- Engine Watch Data.
64
+ Path to Engine Preview Data file.
69
65
 
70
- - `engineWatchData.path`: path to file.
71
- - `engineWatchData.buffer`: buffer of file.
72
- - `engineWatchData.hash`: hash of file.
66
+ ### `engineTutorialDataPath`
73
67
 
74
- ### `enginePreviewData`
68
+ Path to Engine Tutorial Data file.
75
69
 
76
- Engine Preview Data.
70
+ ### `engineThumbnailPath`
77
71
 
78
- - `enginePreviewData.path`: path to file.
79
- - `enginePreviewData.buffer`: buffer of file.
80
- - `enginePreviewData.hash`: hash of file.
81
-
82
- ### `engineTutorialData`
83
-
84
- Engine Tutorial Data.
85
-
86
- - `engineTutorialData.path`: path to file.
87
- - `engineTutorialData.buffer`: buffer of file.
88
- - `engineTutorialData.hash`: hash of file.
89
-
90
- ### `engineThumbnail`
91
-
92
- Engine Thumbnail.
93
-
94
- - `engineThumbnail.path`: path to file.
95
- - `engineThumbnail.buffer`: buffer of file.
96
- - `engineThumbnail.hash`: hash of file.
72
+ Path to Engine Thumbnail file.
97
73
 
98
74
  ### `vsToVC(vs)`
99
75
 
Binary file
Binary file
Binary file
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.engineThumbnail = exports.engineTutorialData = exports.enginePreviewData = exports.engineWatchData = exports.enginePlayData = exports.engineConfiguration = exports.engineInfo = exports.version = exports.vsToVC = exports.vcToLevelData = void 0;
18
- const Resource_cjs_1 = require("./Resource.cjs");
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.3.0';
26
- exports.engineInfo = {
25
+ exports.version = '1.4.0-alpha.0';
26
+ exports.databaseEngineItem = {
27
27
  name: 'voez',
28
- version: 11,
28
+ version: 12,
29
29
  title: {
30
30
  en: 'VOEZ',
31
31
  },
@@ -47,9 +47,9 @@ exports.engineInfo = {
47
47
  ].join('\n'),
48
48
  },
49
49
  };
50
- exports.engineConfiguration = new Resource_cjs_1.Resource('EngineConfiguration');
51
- exports.enginePlayData = new Resource_cjs_1.Resource('EnginePlayData');
52
- exports.engineWatchData = new Resource_cjs_1.Resource('EngineWatchData');
53
- exports.enginePreviewData = new Resource_cjs_1.Resource('EnginePreviewData');
54
- exports.engineTutorialData = new Resource_cjs_1.Resource('EngineTutorialData');
55
- exports.engineThumbnail = new Resource_cjs_1.Resource('thumbnail.png');
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.3.0";
7
- export declare const engineInfo: {
5
+ export declare const version = "1.4.0-alpha.0";
6
+ export declare const databaseEngineItem: {
8
7
  readonly name: "voez";
9
- readonly version: 11;
8
+ readonly version: 12;
10
9
  readonly title: {
11
10
  readonly en: "VOEZ";
12
11
  };
@@ -20,9 +19,9 @@ export declare const engineInfo: {
20
19
  readonly en: string;
21
20
  };
22
21
  };
23
- export declare const engineConfiguration: Resource;
24
- export declare const enginePlayData: Resource;
25
- export declare const engineWatchData: Resource;
26
- export declare const enginePreviewData: Resource;
27
- export declare const engineTutorialData: Resource;
28
- export declare const engineThumbnail: Resource;
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;
@@ -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
- ref: next(),
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].ref;
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].ref,
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
- ref: headRef,
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
- ref: tailRef,
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.0",
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",
@@ -21,17 +21,17 @@
21
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"
22
22
  },
23
23
  "dependencies": {
24
- "sonolus-core": "~7.4.0"
24
+ "sonolus-core": "7.5.0-alpha.4"
25
25
  },
26
26
  "devDependencies": {
27
- "@types/node": "^16.18.65",
28
- "@typescript-eslint/eslint-plugin": "^6.12.0",
29
- "@typescript-eslint/parser": "^6.12.0",
30
- "eslint": "^8.54.0",
31
- "eslint-config-prettier": "^9.0.0",
32
- "prettier": "^3.1.0",
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
33
  "prettier-plugin-organize-imports": "^3.2.4",
34
- "sonolus.js": "~9.3.0",
35
- "typescript": "~5.2.2"
34
+ "sonolus.js": "9.4.0-alpha.4",
35
+ "typescript": "~5.3.3"
36
36
  }
37
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;
@@ -1,9 +0,0 @@
1
- /// <reference types="node" />
2
- export declare class Resource {
3
- readonly path: string;
4
- private _hash;
5
- private _buffer;
6
- constructor(path: string);
7
- get hash(): string;
8
- get buffer(): Buffer;
9
- }