sonolus-next-rush-engine 2.13.1 → 2.13.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/holodori/convert.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/holodori/convert.js
CHANGED
|
@@ -145,6 +145,38 @@ export const hldToLeveldata = (hld, offset = 0) => {
|
|
|
145
145
|
converted.set(source, entity);
|
|
146
146
|
entities.push(entity);
|
|
147
147
|
}
|
|
148
|
+
// Holodori allows overlapping slide heads to share one tap. Keep one tap/flick
|
|
149
|
+
// head per overlapping pair and let the others accept that touch as traces.
|
|
150
|
+
const seenHeads = new Set();
|
|
151
|
+
const retainedHeadsByBeat = new Map();
|
|
152
|
+
for (const [source] of converted) {
|
|
153
|
+
if (source.archetype !== 'Connector')
|
|
154
|
+
continue;
|
|
155
|
+
const segmentHead = resolve(source, 'segmentHead');
|
|
156
|
+
const kind = getValue(segmentHead, 'segmentKind');
|
|
157
|
+
if (kind >= GUIDE_GHOST && kind <= GUIDE_BLACK)
|
|
158
|
+
continue;
|
|
159
|
+
const head = converted.get(resolve(source, 'head'));
|
|
160
|
+
if (seenHeads.has(head))
|
|
161
|
+
continue;
|
|
162
|
+
seenHeads.add(head);
|
|
163
|
+
if (!/^(Normal|Critical)(Head|Tail)?(Tap|Flick)Note$/.test(head.archetype))
|
|
164
|
+
continue;
|
|
165
|
+
const beat = getValue(head, '#BEAT');
|
|
166
|
+
const lane = getValue(head, 'lane');
|
|
167
|
+
const size = getValue(head, 'size');
|
|
168
|
+
const retainedHeads = retainedHeadsByBeat.get(beat) ?? [];
|
|
169
|
+
const overlaps = retainedHeads.some((other) => Math.abs(lane - getValue(other, 'lane')) < size + getValue(other, 'size'));
|
|
170
|
+
if (overlaps) {
|
|
171
|
+
head.archetype = head.archetype.endsWith('TapNote')
|
|
172
|
+
? head.archetype.replace('TapNote', 'TraceNote')
|
|
173
|
+
: head.archetype.replace('FlickNote', 'TraceFlickNote');
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
retainedHeads.push(head);
|
|
177
|
+
retainedHeadsByBeat.set(beat, retainedHeads);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
148
180
|
// Drop references to skipped entities and update names assigned to unnamed entities.
|
|
149
181
|
for (const entity of entities) {
|
|
150
182
|
entity.data = entity.data.flatMap((field) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { USC } from './usc/index.js';
|
|
|
8
8
|
export * from './usc/index.js';
|
|
9
9
|
export { type ExtendedEntityData, type ExtendedEntityDataField, extendedToLevelData, hldToLeveldata, mmwsToUSC, susToUSC, ucmmwsToLevelData, uscToLevelData, };
|
|
10
10
|
export declare const convertToLevelData: (input: string | Uint8Array | USC | LevelData, offset?: number) => LevelData;
|
|
11
|
-
export declare const version = "2.13.
|
|
11
|
+
export declare const version = "2.13.2";
|
|
12
12
|
export declare const engineFullName: {
|
|
13
13
|
readonly en: 'Next RUSH';
|
|
14
14
|
};
|
package/dist/index.js
CHANGED