sonolus-d4dj-engine 1.5.0 → 1.5.2
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/EngineTutorialData +0 -0
- package/dist/EngineWatchData +0 -0
- package/dist/b34dj/{convert.d.cts → convert.d.ts} +1 -1
- package/dist/b34dj/{convert.cjs → convert.js} +4 -9
- package/dist/b34dj/{index.cjs → index.js} +4 -7
- package/dist/d4c/{convert.d.cts → convert.d.ts} +1 -1
- package/dist/d4c/{convert.cjs → convert.js} +13 -17
- package/dist/d4c/{index.cjs → index.js} +2 -5
- package/dist/{index.d.cts → index.d.ts} +5 -5
- package/dist/index.js +30 -0
- package/package.json +4 -5
- package/dist/index.cjs +0 -50
- /package/dist/b34dj/{index.d.cts → index.d.ts} +0 -0
- /package/dist/d4c/{index.d.cts → index.d.ts} +0 -0
package/dist/EnginePlayData
CHANGED
|
Binary file
|
package/dist/EngineTutorialData
CHANGED
|
Binary file
|
package/dist/EngineWatchData
CHANGED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LevelData } from '@sonolus/core';
|
|
2
|
-
import { B34DJChart } from './index.
|
|
2
|
+
import { B34DJChart } from './index.js';
|
|
3
3
|
export declare function b34djToLevelData(chart: B34DJChart, offset?: number): LevelData;
|
|
4
4
|
export declare function d4djToLevelData(chart: any, offset?: number): LevelData;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.d4djToLevelData = exports.b34djToLevelData = void 0;
|
|
4
|
-
const index_cjs_1 = require("./index.cjs");
|
|
5
|
-
function b34djToLevelData(chart, offset = 0) {
|
|
1
|
+
import { D4DJNoteType } from './index.js';
|
|
2
|
+
export function b34djToLevelData(chart, offset = 0) {
|
|
6
3
|
let d4chart = [];
|
|
7
4
|
d4chart[0] = chart.MusicName;
|
|
8
5
|
d4chart[1] = [];
|
|
9
6
|
d4chart[2] = chart.BarLineList;
|
|
10
|
-
d4chart[3] = chart.NoteDataList.map((note) => [note.LaneId,
|
|
7
|
+
d4chart[3] = chart.NoteDataList.map((note) => [note.LaneId, D4DJNoteType[note.Type], note.Time, note.NextId, note.Direction, note.EffectType, note.EffectParameter]);
|
|
11
8
|
const timescale = chart.SoflanDataList.map((soflan) => [soflan.Time, soflan.TimeScale, soflan.LeftRight]);
|
|
12
9
|
timescale.forEach((ts) => {
|
|
13
10
|
const i = d4chart[1].findIndex((tsc) => (tsc[0] === ts[0]) && (tsc[1] === ts[1]));
|
|
@@ -18,9 +15,8 @@ function b34djToLevelData(chart, offset = 0) {
|
|
|
18
15
|
});
|
|
19
16
|
return d4djToLevelData(d4chart, offset);
|
|
20
17
|
}
|
|
21
|
-
exports.b34djToLevelData = b34djToLevelData;
|
|
22
18
|
;
|
|
23
|
-
function d4djToLevelData(chart, offset = 0) {
|
|
19
|
+
export function d4djToLevelData(chart, offset = 0) {
|
|
24
20
|
let disc = {
|
|
25
21
|
left: chart[1].filter((soflan) => [1, 3].includes(soflan[2])),
|
|
26
22
|
right: chart[1].filter((soflan) => [2, 3].includes(soflan[2]))
|
|
@@ -311,7 +307,6 @@ function d4djToLevelData(chart, offset = 0) {
|
|
|
311
307
|
data.entities.push(...ts, ...discL, ...discR, ...notes, ...bl);
|
|
312
308
|
return data;
|
|
313
309
|
}
|
|
314
|
-
exports.d4djToLevelData = d4djToLevelData;
|
|
315
310
|
function note(chart) {
|
|
316
311
|
let hold = [];
|
|
317
312
|
let slider = [];
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.D4DJNoteType = exports.B34DJNoteType = void 0;
|
|
4
|
-
var B34DJNoteType;
|
|
1
|
+
export var B34DJNoteType;
|
|
5
2
|
(function (B34DJNoteType) {
|
|
6
3
|
B34DJNoteType["Tap1"] = "Tap1";
|
|
7
4
|
B34DJNoteType["Tap2"] = "Tap2";
|
|
@@ -13,8 +10,8 @@ var B34DJNoteType;
|
|
|
13
10
|
B34DJNoteType["LongMiddle"] = "LongMiddle";
|
|
14
11
|
B34DJNoteType["LongEnd"] = "LongEnd";
|
|
15
12
|
B34DJNoteType["Slide"] = "Slide";
|
|
16
|
-
})(B34DJNoteType || (
|
|
17
|
-
var D4DJNoteType;
|
|
13
|
+
})(B34DJNoteType || (B34DJNoteType = {}));
|
|
14
|
+
export var D4DJNoteType;
|
|
18
15
|
(function (D4DJNoteType) {
|
|
19
16
|
D4DJNoteType[D4DJNoteType["Tap1"] = 0] = "Tap1";
|
|
20
17
|
D4DJNoteType[D4DJNoteType["Tap2"] = 1] = "Tap2";
|
|
@@ -26,4 +23,4 @@ var D4DJNoteType;
|
|
|
26
23
|
D4DJNoteType[D4DJNoteType["LongMiddle"] = 7] = "LongMiddle";
|
|
27
24
|
D4DJNoteType[D4DJNoteType["LongEnd"] = 8] = "LongEnd";
|
|
28
25
|
D4DJNoteType[D4DJNoteType["Slide"] = 9] = "Slide";
|
|
29
|
-
})(D4DJNoteType || (
|
|
26
|
+
})(D4DJNoteType || (D4DJNoteType = {}));
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.d4cToLevelData = void 0;
|
|
4
|
-
const index_cjs_1 = require("./index.cjs");
|
|
5
|
-
function d4cToLevelData(chart, offset = 0) {
|
|
1
|
+
import { D4CNoteType } from './index.js';
|
|
2
|
+
export function d4cToLevelData(chart, offset = 0) {
|
|
6
3
|
// let d4chart: any = []
|
|
7
4
|
// d4chart[0] = chart.MusicName
|
|
8
5
|
// d4chart[1] = []
|
|
@@ -122,28 +119,27 @@ function d4cToLevelData(chart, offset = 0) {
|
|
|
122
119
|
data.entities.push(...bpm, ...ts.flat(), ...notes, ...bl);
|
|
123
120
|
return data;
|
|
124
121
|
}
|
|
125
|
-
exports.d4cToLevelData = d4cToLevelData;
|
|
126
122
|
function note(chart) {
|
|
127
123
|
let hold = [];
|
|
128
124
|
let slider = [];
|
|
129
125
|
let notes = {};
|
|
130
126
|
let nots = chart.NoteDataList.map(({ Beat, Type, LaneId, NextId, Direction, EffectType, EffectParameter, TimeScaleGroupId }, i) => {
|
|
131
127
|
const not = {
|
|
132
|
-
archetype: Type ===
|
|
128
|
+
archetype: Type === D4CNoteType.Tap1
|
|
133
129
|
? "DarkTapNote"
|
|
134
|
-
: Type ===
|
|
130
|
+
: Type === D4CNoteType.Tap2
|
|
135
131
|
? "LightTapNote"
|
|
136
|
-
: Type ===
|
|
132
|
+
: Type === D4CNoteType.Scratch
|
|
137
133
|
? "ScratchNote"
|
|
138
|
-
: Type ===
|
|
134
|
+
: Type === D4CNoteType.StopStart
|
|
139
135
|
? "StopStartNote"
|
|
140
|
-
: Type ===
|
|
136
|
+
: Type === D4CNoteType.StopEnd
|
|
141
137
|
? "StopEndNote"
|
|
142
|
-
: Type ===
|
|
138
|
+
: Type === D4CNoteType.LongStart
|
|
143
139
|
? "HoldStartNote"
|
|
144
|
-
: Type ===
|
|
140
|
+
: Type === D4CNoteType.LongEnd
|
|
145
141
|
? "HoldEndNote"
|
|
146
|
-
: Type ===
|
|
142
|
+
: Type === D4CNoteType.LongMiddle
|
|
147
143
|
? "HoldMiddleNote"
|
|
148
144
|
: Direction !== 0
|
|
149
145
|
? "SliderFlickNote"
|
|
@@ -167,7 +163,7 @@ function note(chart) {
|
|
|
167
163
|
notes[Beat]
|
|
168
164
|
? notes[Beat].push({ name: `note${i}`, lane: LaneId })
|
|
169
165
|
: (notes[Beat] = [{ name: `note${i}`, lane: LaneId }]);
|
|
170
|
-
if (NextId && (Type ===
|
|
166
|
+
if (NextId && (Type === D4CNoteType.LongStart || Type === D4CNoteType.StopStart)) {
|
|
171
167
|
let note = {};
|
|
172
168
|
note.head = not.name;
|
|
173
169
|
note.tail = `note${NextId}`;
|
|
@@ -177,7 +173,7 @@ function note(chart) {
|
|
|
177
173
|
ref: `note${NextId}`,
|
|
178
174
|
});
|
|
179
175
|
}
|
|
180
|
-
if (Type ===
|
|
176
|
+
if (Type === D4CNoteType.Slide) {
|
|
181
177
|
if (NextId && NextId > 0) {
|
|
182
178
|
slider.push({ prev: not.name, next: `note${NextId}` });
|
|
183
179
|
not.data.push({
|
|
@@ -192,7 +188,7 @@ function note(chart) {
|
|
|
192
188
|
ref: sld.prev,
|
|
193
189
|
});
|
|
194
190
|
}
|
|
195
|
-
if (Type ===
|
|
191
|
+
if (Type === D4CNoteType.LongEnd || Type === D4CNoteType.StopEnd) {
|
|
196
192
|
not.data.push({
|
|
197
193
|
name: "head",
|
|
198
194
|
ref: hold.find((note) => note.tail === not.name).head,
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.D4CNoteType = void 0;
|
|
4
|
-
var D4CNoteType;
|
|
1
|
+
export var D4CNoteType;
|
|
5
2
|
(function (D4CNoteType) {
|
|
6
3
|
D4CNoteType["Tap1"] = "Tap1";
|
|
7
4
|
D4CNoteType["Tap2"] = "Tap2";
|
|
@@ -12,4 +9,4 @@ var D4CNoteType;
|
|
|
12
9
|
D4CNoteType["LongMiddle"] = "LongMiddle";
|
|
13
10
|
D4CNoteType["LongEnd"] = "LongEnd";
|
|
14
11
|
D4CNoteType["Slide"] = "Slide";
|
|
15
|
-
})(D4CNoteType || (
|
|
12
|
+
})(D4CNoteType || (D4CNoteType = {}));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { b34djToLevelData, d4djToLevelData } from './b34dj/convert.
|
|
2
|
-
export { d4cToLevelData } from './d4c/convert.
|
|
3
|
-
export * from './b34dj/index.
|
|
4
|
-
export * from './d4c/index.
|
|
5
|
-
export declare const version = "1.5.
|
|
1
|
+
export { b34djToLevelData, d4djToLevelData } from './b34dj/convert.js';
|
|
2
|
+
export { d4cToLevelData } from './d4c/convert.js';
|
|
3
|
+
export * from './b34dj/index.js';
|
|
4
|
+
export * from './d4c/index.js';
|
|
5
|
+
export declare const version = "1.5.2";
|
|
6
6
|
export declare const databaseEngineItem: {
|
|
7
7
|
readonly name: "d4dj";
|
|
8
8
|
readonly version: 13;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { b34djToLevelData, d4djToLevelData } from './b34dj/convert.js';
|
|
2
|
+
export { d4cToLevelData } from './d4c/convert.js';
|
|
3
|
+
export * from './b34dj/index.js';
|
|
4
|
+
export * from './d4c/index.js';
|
|
5
|
+
export const version = '1.5.2';
|
|
6
|
+
export const databaseEngineItem = {
|
|
7
|
+
name: 'd4dj',
|
|
8
|
+
version: 13,
|
|
9
|
+
title: {
|
|
10
|
+
en: 'D4DJ'
|
|
11
|
+
},
|
|
12
|
+
subtitle: {
|
|
13
|
+
en: 'D4DJ Groovy Mix',
|
|
14
|
+
ja: 'D4DJグルミク',
|
|
15
|
+
},
|
|
16
|
+
author: {
|
|
17
|
+
en: 'Gorengan Hunter#329978',
|
|
18
|
+
},
|
|
19
|
+
description: {
|
|
20
|
+
en: [
|
|
21
|
+
'A recreation of D4DJ Groovy Mix engine in Sonolus.',
|
|
22
|
+
'',
|
|
23
|
+
'Version:',
|
|
24
|
+
version,
|
|
25
|
+
'',
|
|
26
|
+
'GitHub Repository:',
|
|
27
|
+
'https://github.com/gorenganhunter/sonolus-d4dj-engine',
|
|
28
|
+
].join('\n'),
|
|
29
|
+
},
|
|
30
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonolus-d4dj-engine",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "A recreation of D4DJ Groovy Mix engine in Sonolus.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Gorengan Hunter",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"exports": {
|
|
17
|
-
".": "./dist/index.
|
|
17
|
+
".": "./dist/index.js",
|
|
18
18
|
"./EngineConfiguration": "./dist/EngineConfiguration",
|
|
19
19
|
"./EnginePlayData": "./dist/EnginePlayData",
|
|
20
20
|
"./EngineWatchData": "./dist/EngineWatchData",
|
|
@@ -33,12 +33,11 @@
|
|
|
33
33
|
"build": "tsc -p ./lib && sonolus-cli --build ./play && sonolus-cli --build ./watch && sonolus-cli --build ./preview && sonolus-cli --build ./tutorial && node ./lib/build.mjs"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@sonolus/core": "^7.
|
|
37
|
-
"@sonolus/express": "^7.3.2"
|
|
36
|
+
"@sonolus/core": "^7.14.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
39
|
"@eslint/js": "^8.57.0",
|
|
41
|
-
"@sonolus/sonolus.js": "^9.
|
|
40
|
+
"@sonolus/sonolus.js": "^9.6.0",
|
|
42
41
|
"eslint": "^8.57.0",
|
|
43
42
|
"eslint-config-prettier": "^9.1.0",
|
|
44
43
|
"prettier": "^3.3.1",
|
package/dist/index.cjs
DELETED
|
@@ -1,50 +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.d4cToLevelData = exports.d4djToLevelData = exports.b34djToLevelData = void 0;
|
|
18
|
-
var convert_cjs_1 = require("./b34dj/convert.cjs");
|
|
19
|
-
Object.defineProperty(exports, "b34djToLevelData", { enumerable: true, get: function () { return convert_cjs_1.b34djToLevelData; } });
|
|
20
|
-
Object.defineProperty(exports, "d4djToLevelData", { enumerable: true, get: function () { return convert_cjs_1.d4djToLevelData; } });
|
|
21
|
-
var convert_cjs_2 = require("./d4c/convert.cjs");
|
|
22
|
-
Object.defineProperty(exports, "d4cToLevelData", { enumerable: true, get: function () { return convert_cjs_2.d4cToLevelData; } });
|
|
23
|
-
__exportStar(require("./b34dj/index.cjs"), exports);
|
|
24
|
-
__exportStar(require("./d4c/index.cjs"), exports);
|
|
25
|
-
exports.version = '1.5.0';
|
|
26
|
-
exports.databaseEngineItem = {
|
|
27
|
-
name: 'd4dj',
|
|
28
|
-
version: 13,
|
|
29
|
-
title: {
|
|
30
|
-
en: 'D4DJ'
|
|
31
|
-
},
|
|
32
|
-
subtitle: {
|
|
33
|
-
en: 'D4DJ Groovy Mix',
|
|
34
|
-
ja: 'D4DJグルミク',
|
|
35
|
-
},
|
|
36
|
-
author: {
|
|
37
|
-
en: 'Gorengan Hunter#329978',
|
|
38
|
-
},
|
|
39
|
-
description: {
|
|
40
|
-
en: [
|
|
41
|
-
'A recreation of D4DJ Groovy Mix engine in Sonolus.',
|
|
42
|
-
'',
|
|
43
|
-
'Version:',
|
|
44
|
-
exports.version,
|
|
45
|
-
'',
|
|
46
|
-
'GitHub Repository:',
|
|
47
|
-
'https://github.com/gorenganhunter/sonolus-d4dj-engine',
|
|
48
|
-
].join('\n'),
|
|
49
|
-
},
|
|
50
|
-
};
|
|
File without changes
|
|
File without changes
|