sonolus-next-rush-engine 1.0.19 → 1.1.1
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/EngineConfiguration +0 -0
- package/dist/EnginePlayData +0 -0
- package/dist/EnginePreviewData +0 -0
- package/dist/EngineWatchData +0 -0
- package/dist/extended/convert.js +37 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/EngineConfiguration
CHANGED
|
Binary file
|
package/dist/EnginePlayData
CHANGED
|
Binary file
|
package/dist/EnginePreviewData
CHANGED
|
Binary file
|
package/dist/EngineWatchData
CHANGED
|
Binary file
|
package/dist/extended/convert.js
CHANGED
|
@@ -588,6 +588,41 @@ export const extendedToLevelData = (data, offset = 0) => {
|
|
|
588
588
|
}
|
|
589
589
|
return { tailRef: resolvedTailRef, skippedNoteRefs, skippedConnectors };
|
|
590
590
|
}
|
|
591
|
+
function refKey(ref) {
|
|
592
|
+
const original = resolveOriginal(ext, ref);
|
|
593
|
+
const index = original ? ext.entities.indexOf(original) : -1;
|
|
594
|
+
return index >= 0 ? `index:${index}` : `${typeof ref}:${String(ref)}`;
|
|
595
|
+
}
|
|
596
|
+
function getRefBeat(ref) {
|
|
597
|
+
return getNum(resolveOriginal(ext, ref) ?? { archetype: '', data: [] }, '#BEAT');
|
|
598
|
+
}
|
|
599
|
+
const activeTailRefsByStart = new Map();
|
|
600
|
+
function getActiveTailRef(activeStartRef) {
|
|
601
|
+
const key = refKey(activeStartRef);
|
|
602
|
+
if (activeTailRefsByStart.has(key))
|
|
603
|
+
return activeTailRefsByStart.get(key);
|
|
604
|
+
let activeTailRef;
|
|
605
|
+
let activeTailBeat = Number.NEGATIVE_INFINITY;
|
|
606
|
+
for (const { e } of ext.connectors) {
|
|
607
|
+
const startRef = getField(e, 'start');
|
|
608
|
+
const headRef = getField(e, 'head');
|
|
609
|
+
if (isIgnoredSlideTickRef(headRef))
|
|
610
|
+
continue;
|
|
611
|
+
const connectorActiveStartRef = getUltimateStartRef(e.archetype, startRef, headRef);
|
|
612
|
+
if (refKey(connectorActiveStartRef) !== key)
|
|
613
|
+
continue;
|
|
614
|
+
const endRef = getField(e, 'end');
|
|
615
|
+
const { tailRef } = resolveConnectorTailRef(e.archetype, startRef, getField(e, 'tail'));
|
|
616
|
+
const candidateTailRef = endRef ?? getUltimateTailRef(e.archetype, activeStartRef, tailRef);
|
|
617
|
+
const candidateTailBeat = getRefBeat(candidateTailRef);
|
|
618
|
+
if (candidateTailBeat >= activeTailBeat) {
|
|
619
|
+
activeTailBeat = candidateTailBeat;
|
|
620
|
+
activeTailRef = candidateTailRef;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
activeTailRefsByStart.set(key, activeTailRef);
|
|
624
|
+
return activeTailRef;
|
|
625
|
+
}
|
|
591
626
|
for (const { idx, e } of ext.connectors) {
|
|
592
627
|
const startRef = getField(e, 'start');
|
|
593
628
|
const headRef = getField(e, 'head');
|
|
@@ -605,10 +640,9 @@ export const extendedToLevelData = (data, offset = 0) => {
|
|
|
605
640
|
const usesStartAsHead = shouldUseStartAsHead(startRef, headRef);
|
|
606
641
|
const head = usesStartAsHead ? activeHead : rawHead;
|
|
607
642
|
const headOriginal = resolveOriginal(ext, usesStartAsHead ? startRef : headRef);
|
|
608
|
-
|
|
609
|
-
let activeTail = getNote(endRef);
|
|
643
|
+
let activeTail = getNote(getActiveTailRef(activeStartRef));
|
|
610
644
|
if (!activeTail) {
|
|
611
|
-
activeTail = getNote(
|
|
645
|
+
activeTail = getNote(getField(e, 'end'));
|
|
612
646
|
}
|
|
613
647
|
if (!activeTail) {
|
|
614
648
|
activeTail = tail;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { USC } from './usc/index.js';
|
|
|
7
7
|
export * from './usc/index.js';
|
|
8
8
|
export { type ExtendedEntityData, type ExtendedEntityDataField, extendedToLevelData, mmwsToUSC, susToUSC, ucmmwsToLevelData, uscToLevelData, };
|
|
9
9
|
export declare const convertToLevelData: (input: string | Uint8Array | USC | LevelData, offset?: number) => LevelData;
|
|
10
|
-
export declare const version = "1.
|
|
10
|
+
export declare const version = "1.1.1";
|
|
11
11
|
export declare const databaseEngineItem: {
|
|
12
12
|
readonly name: "next-rush";
|
|
13
13
|
readonly version: 13;
|
package/dist/index.js
CHANGED
|
@@ -65,7 +65,7 @@ export const convertToLevelData = (input, offset = 0) => {
|
|
|
65
65
|
}
|
|
66
66
|
return uscToLevelData(usc, offset, true, true);
|
|
67
67
|
};
|
|
68
|
-
export const version = '1.
|
|
68
|
+
export const version = '1.1.1';
|
|
69
69
|
export const databaseEngineItem = {
|
|
70
70
|
name: 'next-rush',
|
|
71
71
|
version: 13,
|