adofai-lib 1.0.5 → 1.0.6
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 +55 -5
- package/dist/LevelDict.d.ts +144 -2
- package/dist/LevelDict.d.ts.map +1 -1
- package/dist/LevelDict.js +425 -9
- package/dist/LevelDict.js.map +1 -1
- package/dist/__tests__/LevelFile.test.js +315 -1
- package/dist/__tests__/LevelFile.test.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/levelUtils.d.ts +1 -1
- package/dist/utils/levelUtils.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ npm install adofai-lib
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import {
|
|
15
|
+
import LevelDict, {LevelJSON, Action} from 'adofai-lib';
|
|
16
16
|
|
|
17
17
|
// Load an ADOFAI level file
|
|
18
18
|
const level = new LevelDict('path/to/level.adofai');
|
|
@@ -26,8 +26,23 @@ const relativeAngles = level.getAnglesRelative();
|
|
|
26
26
|
// Get all actions in the level
|
|
27
27
|
const actions = level.getActions();
|
|
28
28
|
|
|
29
|
-
// Get
|
|
30
|
-
const
|
|
29
|
+
// Get actions with a filter condition
|
|
30
|
+
const twirlActions = level.getActions(action => action.eventType === 'Twirl');
|
|
31
|
+
|
|
32
|
+
// Get all floor decorations
|
|
33
|
+
const floorDecorations = level.getDecorations();
|
|
34
|
+
|
|
35
|
+
// Get all decorations including non-floor decorations
|
|
36
|
+
const allDecorations = level.getDecorations(() => true, true);
|
|
37
|
+
|
|
38
|
+
// Get decorations with a filter condition
|
|
39
|
+
const backgroundDecos = level.getDecorations(deco => deco.decorationType === 'Background');
|
|
40
|
+
|
|
41
|
+
// Get tiles in a range
|
|
42
|
+
const tilesInRange = level.getTiles(1, 4);
|
|
43
|
+
|
|
44
|
+
// Get tiles at specific indices
|
|
45
|
+
const specificTiles = level.getTiles([0, 2, 4]);
|
|
31
46
|
|
|
32
47
|
// Modify the level...
|
|
33
48
|
|
|
@@ -42,6 +57,7 @@ level.writeToFile('path/to/output.adofai');
|
|
|
42
57
|
- Get relative angles between tiles
|
|
43
58
|
- Manage actions and decorations
|
|
44
59
|
- Support for both angle-based and path-based level formats
|
|
60
|
+
- Flexible tile, action, and decoration retrieval with filtering options
|
|
45
61
|
|
|
46
62
|
## API Reference
|
|
47
63
|
|
|
@@ -60,12 +76,46 @@ new LevelDict(filename?: string, encoding?: string)
|
|
|
60
76
|
|
|
61
77
|
#### Methods
|
|
62
78
|
|
|
79
|
+
##### Tile Management
|
|
63
80
|
- `getAngles()`: Returns an array of all tile angles
|
|
64
81
|
- `setAngles(angles: number[])`: Sets the angles for all tiles
|
|
65
82
|
- `getAnglesRelative(ignoreTwirls?: boolean, padMidspins?: boolean)`: Returns relative angles between tiles
|
|
66
|
-
- `
|
|
67
|
-
- `
|
|
83
|
+
- `getTiles(start: number, end: number)`: Returns tiles in the specified range
|
|
84
|
+
- `getTiles(indices: number[])`: Returns tiles at the specified indices
|
|
85
|
+
|
|
86
|
+
##### Action Management
|
|
87
|
+
- `getActions(condition?: (action: Action) => boolean)`: Returns actions matching the condition
|
|
88
|
+
- `setActions(actions: Action[])`: Sets all actions in the level
|
|
89
|
+
- `insertAction(floor: number, action: Action)`: Inserts an action at the specified floor
|
|
90
|
+
- `removeAction(floor: number, actionIndex: number)`: Removes an action at the specified floor and index
|
|
91
|
+
- `updateAction(floor: number, actionIndex: number, newAction: Partial<Action>)`: Updates an action
|
|
92
|
+
- `insertActionAt(floor: number, actionIndex: number, action: Action)`: Inserts an action at a specific position
|
|
93
|
+
|
|
94
|
+
##### Decoration Management
|
|
95
|
+
- `getDecorations(condition?: (decoration: Decoration) => boolean, includeNonFloor?: boolean)`: Returns decorations matching the condition
|
|
96
|
+
- `setDecorations(decorations: Decoration[])`: Sets all decorations in the level
|
|
97
|
+
- `insertDecoration(floor: number | undefined, decoration: Decoration)`: Inserts a decoration
|
|
98
|
+
- `removeDecoration(floor: number | undefined, decorationIndex: number)`: Removes a decoration
|
|
99
|
+
- `updateDecoration(floor: number | undefined, decorationIndex: number, newDecoration: Partial<Decoration>)`: Updates a decoration
|
|
100
|
+
- `insertDecorationAt(floor: number | undefined, decorationIndex: number, decoration: Decoration)`: Inserts a decoration at a specific position
|
|
101
|
+
|
|
102
|
+
##### File Operations
|
|
68
103
|
- `writeToFile(filename?: string)`: Saves the level to a file
|
|
104
|
+
- `toJSON()`: Returns the level data as a JSON object
|
|
105
|
+
- `static fromJSON(json: string)`: Creates a LevelDict instance from JSON data
|
|
106
|
+
|
|
107
|
+
##### Utility Methods
|
|
108
|
+
- `copy()`: Creates a deep copy of the level
|
|
109
|
+
- `compareWith(other: LevelDict)`: Compares two levels and returns differences
|
|
110
|
+
|
|
111
|
+
## Error Handling
|
|
112
|
+
|
|
113
|
+
The library includes comprehensive error handling for invalid operations:
|
|
114
|
+
- Invalid tile indices
|
|
115
|
+
- Invalid floor indices
|
|
116
|
+
- Invalid action/decoration indices
|
|
117
|
+
- Invalid range selections
|
|
118
|
+
- Invalid file operations
|
|
69
119
|
|
|
70
120
|
## License
|
|
71
121
|
|
package/dist/LevelDict.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Action, Decoration } from './types';
|
|
1
|
+
import { Action, Decoration, Settings, Tile, LevelJSON } from './types/index.js';
|
|
2
2
|
export default class LevelDict {
|
|
3
3
|
private filename;
|
|
4
4
|
private encoding;
|
|
@@ -11,8 +11,150 @@ export default class LevelDict {
|
|
|
11
11
|
getAngles(): number[];
|
|
12
12
|
setAngles(angles: number[]): void;
|
|
13
13
|
getAnglesRelative(ignoreTwirls?: boolean, padMidspins?: boolean): number[];
|
|
14
|
+
/**
|
|
15
|
+
* Gets actions from the level
|
|
16
|
+
* @param condition Filter condition for actions
|
|
17
|
+
* @returns Array of actions
|
|
18
|
+
*/
|
|
14
19
|
getActions(condition?: (action: Action) => boolean): Action[];
|
|
15
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Gets decorations from the level
|
|
22
|
+
* @param condition Filter condition for decorations
|
|
23
|
+
* @param includeNonFloor Whether to include non-floor decorations
|
|
24
|
+
* @returns Array of decorations
|
|
25
|
+
*/
|
|
26
|
+
getDecorations(condition?: (decoration: Decoration) => boolean, includeNonFloor?: boolean): Decoration[];
|
|
27
|
+
/**
|
|
28
|
+
* Gets tiles from the level
|
|
29
|
+
* @param start Start index for range selection, or array of specific indices
|
|
30
|
+
* @param end End index for range selection (exclusive)
|
|
31
|
+
* @returns Array of tiles at the specified indices
|
|
32
|
+
* @throws Error if any index is invalid
|
|
33
|
+
*/
|
|
34
|
+
getTiles(start: number, end: number): Tile[];
|
|
35
|
+
/**
|
|
36
|
+
* Gets tiles from the level
|
|
37
|
+
* @param indices Array of specific indices
|
|
38
|
+
* @returns Array of tiles at the specified indices
|
|
39
|
+
* @throws Error if any index is invalid
|
|
40
|
+
*/
|
|
41
|
+
getTiles(indices: number[]): Tile[];
|
|
16
42
|
writeToFile(filename?: string): void;
|
|
43
|
+
toJSON(): LevelJSON;
|
|
44
|
+
static fromJSON(json: string): LevelDict;
|
|
45
|
+
compareWith(other: LevelDict): {
|
|
46
|
+
differentTiles: number[];
|
|
47
|
+
differentActions: number[];
|
|
48
|
+
differentDecorations: number[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Inserts a new tile at the specified index. The new tile will be inserted BEFORE the specified index,
|
|
52
|
+
* pushing all existing tiles at and after that index forward.
|
|
53
|
+
* @param index The index where the new tile will be inserted (before this index)
|
|
54
|
+
* @param angle The angle of the new tile
|
|
55
|
+
* @throws Error if index is invalid (negative or greater than tiles.length)
|
|
56
|
+
*/
|
|
57
|
+
insertTile(index: number, angle: number): void;
|
|
58
|
+
removeTile(index: number): void;
|
|
59
|
+
copy(): LevelDict;
|
|
60
|
+
setActions(actions: Action[]): void;
|
|
61
|
+
/**
|
|
62
|
+
* Inserts a new action at the specified floor. The new action will be added to the end of the actions array
|
|
63
|
+
* for that floor.
|
|
64
|
+
* @param floor The floor index where the action will be added
|
|
65
|
+
* @param action The action to insert
|
|
66
|
+
* @throws Error if floor index is invalid
|
|
67
|
+
*/
|
|
68
|
+
insertAction(floor: number, action: Action): void;
|
|
69
|
+
removeAction(floor: number, actionIndex: number): void;
|
|
70
|
+
updateAction(floor: number, actionIndex: number, newAction: Partial<Action>): void;
|
|
71
|
+
setDecorations(decorations: Decoration[]): void;
|
|
72
|
+
/**
|
|
73
|
+
* Inserts a new decoration. If floor is specified, the decoration will be added to the end of the decorations array
|
|
74
|
+
* for that floor. If floor is undefined, it will be added to the non-floor decorations.
|
|
75
|
+
* @param floor The floor index where the decoration will be added, or undefined for non-floor decoration
|
|
76
|
+
* @param decoration The decoration to insert
|
|
77
|
+
* @throws Error if floor index is invalid
|
|
78
|
+
*/
|
|
79
|
+
insertDecoration(floor: number | undefined, decoration: Decoration): void;
|
|
80
|
+
removeDecoration(floor: number | undefined, decorationIndex: number): void;
|
|
81
|
+
updateDecoration(floor: number | undefined, decorationIndex: number, newDecoration: Partial<Decoration>): void;
|
|
82
|
+
/**
|
|
83
|
+
* Inserts a new action at a specific position in the actions array for a floor.
|
|
84
|
+
* The new action will be inserted BEFORE the specified index.
|
|
85
|
+
* @param floor The floor index
|
|
86
|
+
* @param actionIndex The index where the action will be inserted (before this index)
|
|
87
|
+
* @param action The action to insert
|
|
88
|
+
* @throws Error if floor or action index is invalid
|
|
89
|
+
*/
|
|
90
|
+
insertActionAt(floor: number, actionIndex: number, action: Action): void;
|
|
91
|
+
/**
|
|
92
|
+
* Inserts a new decoration at a specific position in the decorations array for a floor.
|
|
93
|
+
* The new decoration will be inserted BEFORE the specified index.
|
|
94
|
+
* @param floor The floor index, or undefined for non-floor decoration
|
|
95
|
+
* @param decorationIndex The index where the decoration will be inserted (before this index)
|
|
96
|
+
* @param decoration The decoration to insert
|
|
97
|
+
* @throws Error if floor or decoration index is invalid
|
|
98
|
+
*/
|
|
99
|
+
insertDecorationAt(floor: number | undefined, decorationIndex: number, decoration: Decoration): void;
|
|
100
|
+
/**
|
|
101
|
+
* Gets the current settings object
|
|
102
|
+
* @returns A copy of the current settings
|
|
103
|
+
*/
|
|
104
|
+
getSettings(): Settings;
|
|
105
|
+
/**
|
|
106
|
+
* Sets all settings at once
|
|
107
|
+
* @param settings The new settings object
|
|
108
|
+
*/
|
|
109
|
+
setSettings(settings: Settings): void;
|
|
110
|
+
/**
|
|
111
|
+
* Updates specific settings while preserving others
|
|
112
|
+
* @param settings Partial settings object containing only the properties to update
|
|
113
|
+
*/
|
|
114
|
+
updateSettings(settings: Partial<Settings>): void;
|
|
115
|
+
/**
|
|
116
|
+
* Gets a specific setting value
|
|
117
|
+
* @param key The setting key to retrieve
|
|
118
|
+
* @returns The value of the setting, or undefined if not found
|
|
119
|
+
*/
|
|
120
|
+
getSetting<K extends keyof Settings>(key: K): Settings[K] | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Sets a specific setting value
|
|
123
|
+
* @param key The setting key to set
|
|
124
|
+
* @param value The new value for the setting
|
|
125
|
+
*/
|
|
126
|
+
setSetting<K extends keyof Settings>(key: K, value: Settings[K]): void;
|
|
127
|
+
/**
|
|
128
|
+
* Removes a specific setting
|
|
129
|
+
* @param key The setting key to remove
|
|
130
|
+
* @returns true if the setting was removed, false if it didn't exist
|
|
131
|
+
*/
|
|
132
|
+
removeSetting<K extends keyof Settings>(key: K): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Checks if a specific setting exists
|
|
135
|
+
* @param key The setting key to check
|
|
136
|
+
* @returns true if the setting exists, false otherwise
|
|
137
|
+
*/
|
|
138
|
+
hasSetting<K extends keyof Settings>(key: K): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Gets all setting keys
|
|
141
|
+
* @returns Array of all setting keys
|
|
142
|
+
*/
|
|
143
|
+
getSettingKeys(): (keyof Settings)[];
|
|
144
|
+
/**
|
|
145
|
+
* Resets all settings to their default values
|
|
146
|
+
*/
|
|
147
|
+
resetSettings(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Merges new settings with existing ones
|
|
150
|
+
* @param settings Settings to merge
|
|
151
|
+
* @param deep Whether to perform a deep merge (default: false)
|
|
152
|
+
*/
|
|
153
|
+
mergeSettings(settings: Settings, deep?: boolean): void;
|
|
154
|
+
/**
|
|
155
|
+
* Helper method for deep merging objects
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
private deepMerge;
|
|
17
159
|
}
|
|
18
160
|
//# sourceMappingURL=LevelDict.d.ts.map
|
package/dist/LevelDict.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevelDict.d.ts","sourceRoot":"","sources":["../src/LevelDict.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"LevelDict.d.ts","sourceRoot":"","sources":["../src/LevelDict.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAA6B,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE5G,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,aAAa,CAAoB;IACzC,OAAO,CAAC,QAAQ,CAAgB;gBAEpB,QAAQ,GAAE,MAAW,EAAE,QAAQ,GAAE,cAAwB;IAsDrE,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,WAAW;IAcZ,SAAS,IAAI,MAAM,EAAE;IAIrB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAcjC,iBAAiB,CAAC,YAAY,GAAE,OAAe,EAAE,WAAW,GAAE,OAAe,GAAG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AE,CAAC,GAAG,OAAO;IAI5D;;;OAGG;IACI,cAAc,IAAI,CAAC,MAAM,QAAQ,CAAC,EAAE;IAI3C;;OAEG;IACI,aAAa,IAAI,IAAI;IAI5B;;;;OAIG;IACI,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,GAAE,OAAe,GAAG,IAAI;IAQrE;;;OAGG;IACH,OAAO,CAAC,SAAS;CAWlB"}
|
package/dist/LevelDict.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
|
-
import * as utils from './utils/levelUtils';
|
|
3
|
-
import { InvalidLevelDictException } from './types';
|
|
2
|
+
import * as utils from './utils/levelUtils.js';
|
|
3
|
+
import { InvalidLevelDictException } from './types/index.js';
|
|
4
4
|
export default class LevelDict {
|
|
5
5
|
constructor(filename = '', encoding = 'utf-8') {
|
|
6
|
-
this.filename = filename;
|
|
7
|
-
this.encoding = encoding;
|
|
8
6
|
this.tiles = [];
|
|
9
7
|
this.nonFloorDecos = [];
|
|
10
8
|
this.settings = {};
|
|
9
|
+
this.filename = filename;
|
|
10
|
+
this.encoding = encoding;
|
|
11
11
|
const leveldict = this.getFileDict(filename);
|
|
12
12
|
if (!leveldict.actions || !leveldict.settings || (!leveldict.angleData && !leveldict.pathData)) {
|
|
13
13
|
throw new InvalidLevelDictException(`The provided .adofai file is invalid. (missing: ${!leveldict.actions ? 'actions' : ''} ${!leveldict.settings ? 'settings' : ''} ${!leveldict.angleData && !leveldict.pathData ? 'angleData or pathData' : ''})`);
|
|
@@ -89,7 +89,7 @@ export default class LevelDict {
|
|
|
89
89
|
getAnglesRelative(ignoreTwirls = false, padMidspins = false) {
|
|
90
90
|
const absangles = this.getAngles();
|
|
91
91
|
if (!ignoreTwirls) {
|
|
92
|
-
const twirls = this.getActions(action => action.eventType === 'Twirl')
|
|
92
|
+
const twirls = this.getActions((action) => action.eventType === 'Twirl')
|
|
93
93
|
.map(event => event.floor);
|
|
94
94
|
for (const twirl of twirls.reverse()) {
|
|
95
95
|
absangles.splice(twirl, absangles.length - twirl, ...absangles.slice(twirl).map(angle => angle !== 999 ? (2 * absangles[twirl - 1] - angle) % 360 : 999));
|
|
@@ -113,12 +113,40 @@ export default class LevelDict {
|
|
|
113
113
|
return ((absangles[idx - 1] - angle + 180 - 1) % 360) + 1;
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Gets actions from the level
|
|
118
|
+
* @param condition Filter condition for actions
|
|
119
|
+
* @returns Array of actions
|
|
120
|
+
*/
|
|
116
121
|
getActions(condition = () => true) {
|
|
117
|
-
return this.tiles.flatMap(tile => tile.actions.filter(condition)
|
|
122
|
+
return this.tiles.flatMap(tile => tile.actions).filter(condition);
|
|
118
123
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Gets decorations from the level
|
|
126
|
+
* @param condition Filter condition for decorations
|
|
127
|
+
* @param includeNonFloor Whether to include non-floor decorations
|
|
128
|
+
* @returns Array of decorations
|
|
129
|
+
*/
|
|
130
|
+
getDecorations(condition = () => true, includeNonFloor = false) {
|
|
131
|
+
return includeNonFloor ?
|
|
132
|
+
this.tiles.flatMap(tile => tile.decorations).filter(condition)
|
|
133
|
+
.concat(this.nonFloorDecos.filter(condition))
|
|
134
|
+
: this.tiles.flatMap(tile => tile.decorations).filter(condition);
|
|
135
|
+
}
|
|
136
|
+
getTiles(startOrIndices, end) {
|
|
137
|
+
// Handle range selection
|
|
138
|
+
if (typeof startOrIndices === 'number' && end !== undefined) {
|
|
139
|
+
if (startOrIndices < 0 || end > this.tiles.length || startOrIndices >= end) {
|
|
140
|
+
throw new Error('Invalid range indices');
|
|
141
|
+
}
|
|
142
|
+
return this.tiles.slice(startOrIndices, end);
|
|
143
|
+
}
|
|
144
|
+
// Handle specific indices selection
|
|
145
|
+
const indices = startOrIndices;
|
|
146
|
+
if (!indices.every(i => i >= 0 && i < this.tiles.length)) {
|
|
147
|
+
throw new Error('Invalid tile index');
|
|
148
|
+
}
|
|
149
|
+
return indices.map(i => this.tiles[i]);
|
|
122
150
|
}
|
|
123
151
|
writeToFile(filename) {
|
|
124
152
|
const final = {
|
|
@@ -130,5 +158,393 @@ export default class LevelDict {
|
|
|
130
158
|
const outputFile = filename || this.filename;
|
|
131
159
|
fs.writeFileSync(outputFile, JSON.stringify(final, null, 4), { encoding: this.encoding });
|
|
132
160
|
}
|
|
161
|
+
toJSON() {
|
|
162
|
+
return {
|
|
163
|
+
angleData: this.getAngles(),
|
|
164
|
+
settings: this.settings,
|
|
165
|
+
actions: this.getActions(),
|
|
166
|
+
decorations: this.getDecorations()
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
static fromJSON(json) {
|
|
170
|
+
const data = JSON.parse(json);
|
|
171
|
+
const level = new LevelDict();
|
|
172
|
+
level.tiles = data.angleData.map((angle) => ({
|
|
173
|
+
angle,
|
|
174
|
+
actions: [],
|
|
175
|
+
decorations: []
|
|
176
|
+
}));
|
|
177
|
+
level.settings = data.settings;
|
|
178
|
+
level.setActions(data.actions);
|
|
179
|
+
level.setDecorations(data.decorations);
|
|
180
|
+
return level;
|
|
181
|
+
}
|
|
182
|
+
compareWith(other) {
|
|
183
|
+
var _a, _b;
|
|
184
|
+
const result = {
|
|
185
|
+
differentTiles: [],
|
|
186
|
+
differentActions: [],
|
|
187
|
+
differentDecorations: []
|
|
188
|
+
};
|
|
189
|
+
// Compare tiles
|
|
190
|
+
const maxTiles = Math.max(this.tiles.length, other.tiles.length);
|
|
191
|
+
for (let i = 0; i < maxTiles; i++) {
|
|
192
|
+
if (((_a = this.tiles[i]) === null || _a === void 0 ? void 0 : _a.angle) !== ((_b = other.tiles[i]) === null || _b === void 0 ? void 0 : _b.angle)) {
|
|
193
|
+
result.differentTiles.push(i);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
// Compare actions
|
|
197
|
+
const thisActions = JSON.stringify(this.getActions());
|
|
198
|
+
const otherActions = JSON.stringify(other.getActions());
|
|
199
|
+
if (thisActions !== otherActions) {
|
|
200
|
+
result.differentActions = this.getActions()
|
|
201
|
+
.map((action, i) => other.getActions()[i] !== action ? i : -1)
|
|
202
|
+
.filter(i => i !== -1);
|
|
203
|
+
}
|
|
204
|
+
// Compare decorations
|
|
205
|
+
const thisDecos = JSON.stringify(this.getDecorations());
|
|
206
|
+
const otherDecos = JSON.stringify(other.getDecorations());
|
|
207
|
+
if (thisDecos !== otherDecos) {
|
|
208
|
+
result.differentDecorations = this.getDecorations()
|
|
209
|
+
.map((deco, i) => other.getDecorations()[i] !== deco ? i : -1)
|
|
210
|
+
.filter(i => i !== -1);
|
|
211
|
+
}
|
|
212
|
+
return result;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Inserts a new tile at the specified index. The new tile will be inserted BEFORE the specified index,
|
|
216
|
+
* pushing all existing tiles at and after that index forward.
|
|
217
|
+
* @param index The index where the new tile will be inserted (before this index)
|
|
218
|
+
* @param angle The angle of the new tile
|
|
219
|
+
* @throws Error if index is invalid (negative or greater than tiles.length)
|
|
220
|
+
*/
|
|
221
|
+
insertTile(index, angle) {
|
|
222
|
+
if (index < 0 || index > this.tiles.length) {
|
|
223
|
+
throw new Error('Invalid tile index');
|
|
224
|
+
}
|
|
225
|
+
this.tiles.splice(index, 0, {
|
|
226
|
+
angle,
|
|
227
|
+
actions: [],
|
|
228
|
+
decorations: []
|
|
229
|
+
});
|
|
230
|
+
// Shift all actions and decorations after the inserted tile
|
|
231
|
+
this.tiles.forEach(tile => {
|
|
232
|
+
tile.actions = tile.actions.map(action => {
|
|
233
|
+
if (action.floor && action.floor >= index) {
|
|
234
|
+
return { ...action, floor: action.floor + 1 };
|
|
235
|
+
}
|
|
236
|
+
return action;
|
|
237
|
+
});
|
|
238
|
+
tile.decorations = tile.decorations.map(deco => {
|
|
239
|
+
if (deco.floor && deco.floor >= index) {
|
|
240
|
+
return { ...deco, floor: deco.floor + 1 };
|
|
241
|
+
}
|
|
242
|
+
return deco;
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
removeTile(index) {
|
|
247
|
+
if (index < 0 || index >= this.tiles.length) {
|
|
248
|
+
throw new Error('Invalid tile index');
|
|
249
|
+
}
|
|
250
|
+
this.tiles.splice(index, 1);
|
|
251
|
+
// Remove actions and decorations on the deleted tile
|
|
252
|
+
this.tiles.forEach(tile => {
|
|
253
|
+
tile.actions = tile.actions.filter(action => action.floor !== index);
|
|
254
|
+
tile.decorations = tile.decorations.filter(deco => !('floor' in deco) || deco.floor !== index);
|
|
255
|
+
});
|
|
256
|
+
// Shift all actions and decorations after the removed tile
|
|
257
|
+
this.tiles.forEach(tile => {
|
|
258
|
+
tile.actions = tile.actions.map(action => {
|
|
259
|
+
if (action.floor && action.floor > index) {
|
|
260
|
+
return { ...action, floor: action.floor - 1 };
|
|
261
|
+
}
|
|
262
|
+
return action;
|
|
263
|
+
});
|
|
264
|
+
tile.decorations = tile.decorations.map((deco) => {
|
|
265
|
+
if (deco.floor && deco.floor > index) {
|
|
266
|
+
return { ...deco, floor: deco.floor - 1 };
|
|
267
|
+
}
|
|
268
|
+
return deco;
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
copy() {
|
|
273
|
+
const copy = new LevelDict();
|
|
274
|
+
copy.filename = this.filename;
|
|
275
|
+
copy.encoding = this.encoding;
|
|
276
|
+
copy.tiles = this.tiles.map(tile => ({
|
|
277
|
+
angle: tile.angle,
|
|
278
|
+
actions: tile.actions.map(action => ({ ...action })),
|
|
279
|
+
decorations: tile.decorations.map(deco => ({ ...deco }))
|
|
280
|
+
}));
|
|
281
|
+
copy.nonFloorDecos = this.nonFloorDecos.map(deco => ({ ...deco }));
|
|
282
|
+
copy.settings = { ...this.settings };
|
|
283
|
+
return copy;
|
|
284
|
+
}
|
|
285
|
+
// Action manipulation methods
|
|
286
|
+
setActions(actions) {
|
|
287
|
+
// Clear existing actions
|
|
288
|
+
this.tiles.forEach(tile => tile.actions = []);
|
|
289
|
+
// Add new actions
|
|
290
|
+
actions.forEach(action => {
|
|
291
|
+
if (action.floor !== undefined && action.floor < this.tiles.length) {
|
|
292
|
+
this.tiles[action.floor].actions.push({ ...action });
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Inserts a new action at the specified floor. The new action will be added to the end of the actions array
|
|
298
|
+
* for that floor.
|
|
299
|
+
* @param floor The floor index where the action will be added
|
|
300
|
+
* @param action The action to insert
|
|
301
|
+
* @throws Error if floor index is invalid
|
|
302
|
+
*/
|
|
303
|
+
insertAction(floor, action) {
|
|
304
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
305
|
+
throw new Error('Invalid floor index');
|
|
306
|
+
}
|
|
307
|
+
this.tiles[floor].actions.push({ ...action, floor });
|
|
308
|
+
}
|
|
309
|
+
removeAction(floor, actionIndex) {
|
|
310
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
311
|
+
throw new Error('Invalid floor index');
|
|
312
|
+
}
|
|
313
|
+
if (actionIndex < 0 || actionIndex >= this.tiles[floor].actions.length) {
|
|
314
|
+
throw new Error('Invalid action index');
|
|
315
|
+
}
|
|
316
|
+
this.tiles[floor].actions.splice(actionIndex, 1);
|
|
317
|
+
}
|
|
318
|
+
updateAction(floor, actionIndex, newAction) {
|
|
319
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
320
|
+
throw new Error('Invalid floor index');
|
|
321
|
+
}
|
|
322
|
+
if (actionIndex < 0 || actionIndex >= this.tiles[floor].actions.length) {
|
|
323
|
+
throw new Error('Invalid action index');
|
|
324
|
+
}
|
|
325
|
+
this.tiles[floor].actions[actionIndex] = {
|
|
326
|
+
...this.tiles[floor].actions[actionIndex],
|
|
327
|
+
...newAction
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
// Decoration manipulation methods
|
|
331
|
+
setDecorations(decorations) {
|
|
332
|
+
// Clear existing decorations
|
|
333
|
+
this.tiles.forEach(tile => tile.decorations = []);
|
|
334
|
+
this.nonFloorDecos = [];
|
|
335
|
+
// Add new decorations
|
|
336
|
+
decorations.forEach(deco => {
|
|
337
|
+
if ('floor' in deco) {
|
|
338
|
+
if (deco.floor >= this.tiles.length) {
|
|
339
|
+
this.tiles[this.tiles.length - 1].decorations.push({ ...deco });
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
this.tiles[deco.floor].decorations.push({ ...deco });
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
this.nonFloorDecos.push({ ...deco });
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Inserts a new decoration. If floor is specified, the decoration will be added to the end of the decorations array
|
|
352
|
+
* for that floor. If floor is undefined, it will be added to the non-floor decorations.
|
|
353
|
+
* @param floor The floor index where the decoration will be added, or undefined for non-floor decoration
|
|
354
|
+
* @param decoration The decoration to insert
|
|
355
|
+
* @throws Error if floor index is invalid
|
|
356
|
+
*/
|
|
357
|
+
insertDecoration(floor, decoration) {
|
|
358
|
+
if (floor !== undefined) {
|
|
359
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
360
|
+
throw new Error('Invalid floor index');
|
|
361
|
+
}
|
|
362
|
+
this.tiles[floor].decorations.push({ ...decoration, floor });
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
this.nonFloorDecos.push({ ...decoration });
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
removeDecoration(floor, decorationIndex) {
|
|
369
|
+
if (floor !== undefined) {
|
|
370
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
371
|
+
throw new Error('Invalid floor index');
|
|
372
|
+
}
|
|
373
|
+
if (decorationIndex < 0 || decorationIndex >= this.tiles[floor].decorations.length) {
|
|
374
|
+
throw new Error('Invalid decoration index');
|
|
375
|
+
}
|
|
376
|
+
this.tiles[floor].decorations.splice(decorationIndex, 1);
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
if (decorationIndex < 0 || decorationIndex >= this.nonFloorDecos.length) {
|
|
380
|
+
throw new Error('Invalid decoration index');
|
|
381
|
+
}
|
|
382
|
+
this.nonFloorDecos.splice(decorationIndex, 1);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
updateDecoration(floor, decorationIndex, newDecoration) {
|
|
386
|
+
if (floor !== undefined) {
|
|
387
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
388
|
+
throw new Error('Invalid floor index');
|
|
389
|
+
}
|
|
390
|
+
if (decorationIndex < 0 || decorationIndex >= this.tiles[floor].decorations.length) {
|
|
391
|
+
throw new Error('Invalid decoration index');
|
|
392
|
+
}
|
|
393
|
+
this.tiles[floor].decorations[decorationIndex] = {
|
|
394
|
+
...this.tiles[floor].decorations[decorationIndex],
|
|
395
|
+
...newDecoration
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
if (decorationIndex < 0 || decorationIndex >= this.nonFloorDecos.length) {
|
|
400
|
+
throw new Error('Invalid decoration index');
|
|
401
|
+
}
|
|
402
|
+
this.nonFloorDecos[decorationIndex] = {
|
|
403
|
+
...this.nonFloorDecos[decorationIndex],
|
|
404
|
+
...newDecoration
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Inserts a new action at a specific position in the actions array for a floor.
|
|
410
|
+
* The new action will be inserted BEFORE the specified index.
|
|
411
|
+
* @param floor The floor index
|
|
412
|
+
* @param actionIndex The index where the action will be inserted (before this index)
|
|
413
|
+
* @param action The action to insert
|
|
414
|
+
* @throws Error if floor or action index is invalid
|
|
415
|
+
*/
|
|
416
|
+
insertActionAt(floor, actionIndex, action) {
|
|
417
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
418
|
+
throw new Error('Invalid floor index');
|
|
419
|
+
}
|
|
420
|
+
if (actionIndex < 0 || actionIndex > this.tiles[floor].actions.length) {
|
|
421
|
+
throw new Error('Invalid action index');
|
|
422
|
+
}
|
|
423
|
+
this.tiles[floor].actions.splice(actionIndex, 0, { ...action, floor });
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Inserts a new decoration at a specific position in the decorations array for a floor.
|
|
427
|
+
* The new decoration will be inserted BEFORE the specified index.
|
|
428
|
+
* @param floor The floor index, or undefined for non-floor decoration
|
|
429
|
+
* @param decorationIndex The index where the decoration will be inserted (before this index)
|
|
430
|
+
* @param decoration The decoration to insert
|
|
431
|
+
* @throws Error if floor or decoration index is invalid
|
|
432
|
+
*/
|
|
433
|
+
insertDecorationAt(floor, decorationIndex, decoration) {
|
|
434
|
+
if (floor !== undefined) {
|
|
435
|
+
if (floor < 0 || floor >= this.tiles.length) {
|
|
436
|
+
throw new Error('Invalid floor index');
|
|
437
|
+
}
|
|
438
|
+
if (decorationIndex < 0 || decorationIndex > this.tiles[floor].decorations.length) {
|
|
439
|
+
throw new Error('Invalid decoration index');
|
|
440
|
+
}
|
|
441
|
+
this.tiles[floor].decorations.splice(decorationIndex, 0, { ...decoration, floor });
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
if (decorationIndex < 0 || decorationIndex > this.nonFloorDecos.length) {
|
|
445
|
+
throw new Error('Invalid decoration index');
|
|
446
|
+
}
|
|
447
|
+
this.nonFloorDecos.splice(decorationIndex, 0, { ...decoration });
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Gets the current settings object
|
|
452
|
+
* @returns A copy of the current settings
|
|
453
|
+
*/
|
|
454
|
+
getSettings() {
|
|
455
|
+
return { ...this.settings };
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Sets all settings at once
|
|
459
|
+
* @param settings The new settings object
|
|
460
|
+
*/
|
|
461
|
+
setSettings(settings) {
|
|
462
|
+
this.settings = { ...settings };
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Updates specific settings while preserving others
|
|
466
|
+
* @param settings Partial settings object containing only the properties to update
|
|
467
|
+
*/
|
|
468
|
+
updateSettings(settings) {
|
|
469
|
+
this.settings = { ...this.settings, ...settings };
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Gets a specific setting value
|
|
473
|
+
* @param key The setting key to retrieve
|
|
474
|
+
* @returns The value of the setting, or undefined if not found
|
|
475
|
+
*/
|
|
476
|
+
getSetting(key) {
|
|
477
|
+
return this.settings[key];
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Sets a specific setting value
|
|
481
|
+
* @param key The setting key to set
|
|
482
|
+
* @param value The new value for the setting
|
|
483
|
+
*/
|
|
484
|
+
setSetting(key, value) {
|
|
485
|
+
this.settings[key] = value;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Removes a specific setting
|
|
489
|
+
* @param key The setting key to remove
|
|
490
|
+
* @returns true if the setting was removed, false if it didn't exist
|
|
491
|
+
*/
|
|
492
|
+
removeSetting(key) {
|
|
493
|
+
if (key in this.settings) {
|
|
494
|
+
delete this.settings[key];
|
|
495
|
+
return true;
|
|
496
|
+
}
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Checks if a specific setting exists
|
|
501
|
+
* @param key The setting key to check
|
|
502
|
+
* @returns true if the setting exists, false otherwise
|
|
503
|
+
*/
|
|
504
|
+
hasSetting(key) {
|
|
505
|
+
return key in this.settings;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Gets all setting keys
|
|
509
|
+
* @returns Array of all setting keys
|
|
510
|
+
*/
|
|
511
|
+
getSettingKeys() {
|
|
512
|
+
return Object.keys(this.settings);
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Resets all settings to their default values
|
|
516
|
+
*/
|
|
517
|
+
resetSettings() {
|
|
518
|
+
this.settings = {};
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Merges new settings with existing ones
|
|
522
|
+
* @param settings Settings to merge
|
|
523
|
+
* @param deep Whether to perform a deep merge (default: false)
|
|
524
|
+
*/
|
|
525
|
+
mergeSettings(settings, deep = false) {
|
|
526
|
+
if (deep) {
|
|
527
|
+
this.settings = this.deepMerge(this.settings, settings);
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
this.settings = { ...this.settings, ...settings };
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Helper method for deep merging objects
|
|
535
|
+
* @private
|
|
536
|
+
*/
|
|
537
|
+
deepMerge(target, source) {
|
|
538
|
+
const output = { ...target };
|
|
539
|
+
for (const key in source) {
|
|
540
|
+
if (source[key] instanceof Object && key in target) {
|
|
541
|
+
output[key] = this.deepMerge(target[key], source[key]);
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
output[key] = source[key];
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return output;
|
|
548
|
+
}
|
|
133
549
|
}
|
|
134
550
|
//# sourceMappingURL=LevelDict.js.map
|
package/dist/LevelDict.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevelDict.js","sourceRoot":"","sources":["../src/LevelDict.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAsC,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAGxF,MAAM,CAAC,OAAO,OAAO,SAAS;IAO5B,YAAY,WAAmB,EAAE,EAAE,WAA2B,OAAO;QACnE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QA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as fs from 'fs';
|
|
3
3
|
// Mock fs module
|
|
4
4
|
jest.mock('fs');
|
|
@@ -69,5 +69,319 @@ describe('LevelDict', () => {
|
|
|
69
69
|
const level = new LevelDict('test.adofai');
|
|
70
70
|
expect(level.getAngles()).toEqual([0, 90, 0, 90]);
|
|
71
71
|
});
|
|
72
|
+
describe('Level manipulation', () => {
|
|
73
|
+
let level;
|
|
74
|
+
beforeEach(() => {
|
|
75
|
+
const mockLevelData = {
|
|
76
|
+
angleData: [0, 90, 180],
|
|
77
|
+
settings: { bpm: 120 },
|
|
78
|
+
actions: [
|
|
79
|
+
{ floor: 1, eventType: 'Twirl' },
|
|
80
|
+
{ floor: 2, eventType: 'Pause' }
|
|
81
|
+
],
|
|
82
|
+
decorations: [
|
|
83
|
+
{ floor: 0, decorationType: 'Background' },
|
|
84
|
+
{ floor: 1, decorationType: 'Foreground' }
|
|
85
|
+
]
|
|
86
|
+
};
|
|
87
|
+
fs.readFileSync.mockReturnValue(JSON.stringify(mockLevelData));
|
|
88
|
+
level = new LevelDict('test.adofai');
|
|
89
|
+
});
|
|
90
|
+
it('should create a deep copy of the level', () => {
|
|
91
|
+
const copy = level.copy();
|
|
92
|
+
// Test that it's a new instance
|
|
93
|
+
expect(copy).not.toBe(level);
|
|
94
|
+
// Test that all properties are copied correctly
|
|
95
|
+
expect(copy.getAngles()).toEqual(level.getAngles());
|
|
96
|
+
expect(copy.getActions()).toEqual(level.getActions());
|
|
97
|
+
expect(copy.getDecorations()).toEqual(level.getDecorations());
|
|
98
|
+
// Test that modifications to copy don't affect original
|
|
99
|
+
copy.setAngles([45, 90, 135]);
|
|
100
|
+
expect(level.getAngles()).toEqual([0, 90, 180]);
|
|
101
|
+
});
|
|
102
|
+
it('should insert a tile at specified index', () => {
|
|
103
|
+
level.insertTile(1, 45);
|
|
104
|
+
expect(level.getAngles()).toEqual([0, 45, 90, 180]);
|
|
105
|
+
// Test that actions and decorations are shifted correctly
|
|
106
|
+
const actions = level.getActions();
|
|
107
|
+
expect(actions[0].floor).toBe(2);
|
|
108
|
+
expect(actions[1].floor).toBe(3);
|
|
109
|
+
const decorations = level.getDecorations();
|
|
110
|
+
expect(decorations[0].floor).toBe(0);
|
|
111
|
+
expect(decorations[1].floor).toBe(2);
|
|
112
|
+
});
|
|
113
|
+
it('should throw error when inserting tile at invalid index', () => {
|
|
114
|
+
expect(() => level.insertTile(-1, 45)).toThrow('Invalid tile index');
|
|
115
|
+
expect(() => level.insertTile(4, 45)).toThrow('Invalid tile index');
|
|
116
|
+
});
|
|
117
|
+
it('should remove a tile at specified index', () => {
|
|
118
|
+
level.removeTile(1);
|
|
119
|
+
expect(level.getAngles()).toEqual([0, 180]);
|
|
120
|
+
const actions = level.getActions();
|
|
121
|
+
expect(actions[0].floor).toBe(1);
|
|
122
|
+
const decorations = level.getDecorations();
|
|
123
|
+
expect(decorations[0].floor).toBe(0);
|
|
124
|
+
expect(decorations[1]).toBeUndefined();
|
|
125
|
+
});
|
|
126
|
+
it('should throw error when removing tile at invalid index', () => {
|
|
127
|
+
expect(() => level.removeTile(-1)).toThrow('Invalid tile index');
|
|
128
|
+
expect(() => level.removeTile(3)).toThrow('Invalid tile index');
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
describe('Level comparison', () => {
|
|
132
|
+
let level1;
|
|
133
|
+
let level2;
|
|
134
|
+
beforeEach(() => {
|
|
135
|
+
const mockLevelData1 = {
|
|
136
|
+
angleData: [0, 90, 180],
|
|
137
|
+
settings: { bpm: 120 },
|
|
138
|
+
actions: [{ floor: 1, eventType: 'Twirl' }],
|
|
139
|
+
decorations: [{ floor: 0, decorationType: 'Background' }]
|
|
140
|
+
};
|
|
141
|
+
const mockLevelData2 = {
|
|
142
|
+
angleData: [0, 45, 180],
|
|
143
|
+
settings: { bpm: 120 },
|
|
144
|
+
actions: [{ floor: 1, eventType: 'Pause' }],
|
|
145
|
+
decorations: [{ floor: 0, decorationType: 'Foreground' }]
|
|
146
|
+
};
|
|
147
|
+
fs.readFileSync
|
|
148
|
+
.mockReturnValueOnce(JSON.stringify(mockLevelData1))
|
|
149
|
+
.mockReturnValueOnce(JSON.stringify(mockLevelData2));
|
|
150
|
+
level1 = new LevelDict('test1.adofai');
|
|
151
|
+
level2 = new LevelDict('test2.adofai');
|
|
152
|
+
});
|
|
153
|
+
it('should compare two levels and identify differences', () => {
|
|
154
|
+
const diff = level1.compareWith(level2);
|
|
155
|
+
expect(diff.differentTiles).toEqual([1]); // Different angle at index 1
|
|
156
|
+
expect(diff.differentActions).toEqual([0]); // Different action at index 0
|
|
157
|
+
expect(diff.differentDecorations).toEqual([0]); // Different decoration at index 0
|
|
158
|
+
});
|
|
159
|
+
it('should return empty arrays when comparing identical levels', () => {
|
|
160
|
+
const diff = level1.compareWith(level1);
|
|
161
|
+
expect(diff.differentTiles).toEqual([]);
|
|
162
|
+
expect(diff.differentActions).toEqual([]);
|
|
163
|
+
expect(diff.differentDecorations).toEqual([]);
|
|
164
|
+
});
|
|
165
|
+
it('should handle levels with different lengths', () => {
|
|
166
|
+
level1.setAngles([0, 90, 180, 270]);
|
|
167
|
+
const diff = level1.compareWith(level2);
|
|
168
|
+
expect(diff.differentTiles).toEqual([1, 3]); // Different at index 1 and extra tile at 3
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
describe('Action and Decoration manipulation', () => {
|
|
172
|
+
let level;
|
|
173
|
+
beforeEach(() => {
|
|
174
|
+
const mockLevelData = {
|
|
175
|
+
angleData: [0, 90, 180],
|
|
176
|
+
settings: { bpm: 120 },
|
|
177
|
+
actions: [
|
|
178
|
+
{ floor: 1, eventType: 'Twirl' },
|
|
179
|
+
{ floor: 2, eventType: 'Pause', duration: 2 }
|
|
180
|
+
],
|
|
181
|
+
decorations: [
|
|
182
|
+
{ floor: 0, decorationType: 'Background', color: '#000000' },
|
|
183
|
+
{ floor: 1, decorationType: 'Foreground', color: '#FFFFFF' },
|
|
184
|
+
{ decorationType: 'Global', color: '#FF0000' }
|
|
185
|
+
]
|
|
186
|
+
};
|
|
187
|
+
fs.readFileSync.mockReturnValue(JSON.stringify(mockLevelData));
|
|
188
|
+
level = new LevelDict('test.adofai');
|
|
189
|
+
});
|
|
190
|
+
describe('Action manipulation', () => {
|
|
191
|
+
it('should set all actions', () => {
|
|
192
|
+
const newActions = [
|
|
193
|
+
{ floor: 0, eventType: 'Twirl' },
|
|
194
|
+
{ floor: 2, eventType: 'Pause', duration: 2 }
|
|
195
|
+
];
|
|
196
|
+
level.setActions(newActions);
|
|
197
|
+
const actions = level.getActions();
|
|
198
|
+
expect(actions).toHaveLength(2);
|
|
199
|
+
expect(actions[0]).toEqual(newActions[0]);
|
|
200
|
+
expect(actions[1]).toEqual(newActions[1]);
|
|
201
|
+
});
|
|
202
|
+
it('should insert a new action', () => {
|
|
203
|
+
const newAction = { eventType: 'SetSpeed', bpm: 250 };
|
|
204
|
+
console.log("level", level.getActions());
|
|
205
|
+
level.insertAction(0, newAction);
|
|
206
|
+
console.log("level", level.getActions());
|
|
207
|
+
const actions = level.getActions();
|
|
208
|
+
console.log("newAction", { ...newAction, floor: 0 });
|
|
209
|
+
expect(actions).toHaveLength(3);
|
|
210
|
+
expect(actions[0]).toEqual({ ...newAction, floor: 0 });
|
|
211
|
+
});
|
|
212
|
+
it('should remove an action', () => {
|
|
213
|
+
level.removeAction(1, 0);
|
|
214
|
+
const actions = level.getActions();
|
|
215
|
+
expect(actions).toHaveLength(1);
|
|
216
|
+
expect(actions[0].eventType).toBe('Pause');
|
|
217
|
+
});
|
|
218
|
+
it('should update an action', () => {
|
|
219
|
+
level.updateAction(1, 0, { duration: 3 });
|
|
220
|
+
const actions = level.getActions();
|
|
221
|
+
expect(actions[0].duration).toBe(3);
|
|
222
|
+
expect(actions[0].eventType).toBe('Twirl'); // Other properties should remain unchanged
|
|
223
|
+
});
|
|
224
|
+
it('should throw error when inserting action at invalid floor', () => {
|
|
225
|
+
expect(() => level.insertAction(-1, { eventType: 'Twirl' }))
|
|
226
|
+
.toThrow('Invalid floor index');
|
|
227
|
+
expect(() => level.insertAction(3, { eventType: 'Twirl' }))
|
|
228
|
+
.toThrow('Invalid floor index');
|
|
229
|
+
});
|
|
230
|
+
it('should throw error when removing action at invalid index', () => {
|
|
231
|
+
expect(() => level.removeAction(1, -1))
|
|
232
|
+
.toThrow('Invalid action index');
|
|
233
|
+
expect(() => level.removeAction(1, 2))
|
|
234
|
+
.toThrow('Invalid action index');
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
describe('Decoration manipulation', () => {
|
|
238
|
+
it('should set all decorations', () => {
|
|
239
|
+
const newDecorations = [
|
|
240
|
+
{ floor: 0, decorationType: 'Background', color: '#111111' },
|
|
241
|
+
{ decorationType: 'Global', color: '#222222' }
|
|
242
|
+
];
|
|
243
|
+
level.setDecorations(newDecorations);
|
|
244
|
+
const decorations = level.getDecorations();
|
|
245
|
+
const nonFloorDecos = level.getDecorations(deco => deco.floor === undefined, true);
|
|
246
|
+
expect(decorations).toHaveLength(1);
|
|
247
|
+
expect(nonFloorDecos).toHaveLength(1);
|
|
248
|
+
expect(decorations[0]).toEqual(newDecorations[0]);
|
|
249
|
+
expect(nonFloorDecos[0]).toEqual(newDecorations[1]);
|
|
250
|
+
});
|
|
251
|
+
it('should insert a floor decoration', () => {
|
|
252
|
+
const newDecoration = { decorationType: 'Background', color: '#333333' };
|
|
253
|
+
level.insertDecoration(2, newDecoration);
|
|
254
|
+
const decorations = level.getDecorations();
|
|
255
|
+
expect(decorations).toHaveLength(3);
|
|
256
|
+
expect(decorations[2]).toEqual({ ...newDecoration, floor: 2 });
|
|
257
|
+
});
|
|
258
|
+
it('should insert a non-floor decoration', () => {
|
|
259
|
+
const newDecoration = { decorationType: 'Global', color: '#444444' };
|
|
260
|
+
level.insertDecoration(undefined, newDecoration);
|
|
261
|
+
const nonFloorDecos = level.getDecorations(deco => deco.floor === undefined, true);
|
|
262
|
+
expect(nonFloorDecos).toHaveLength(2);
|
|
263
|
+
expect(nonFloorDecos[1]).toEqual(newDecoration);
|
|
264
|
+
});
|
|
265
|
+
it('should remove a floor decoration', () => {
|
|
266
|
+
level.removeDecoration(1, 0);
|
|
267
|
+
const decorations = level.getDecorations();
|
|
268
|
+
expect(decorations).toHaveLength(1);
|
|
269
|
+
expect(decorations[0].floor).toBe(0);
|
|
270
|
+
});
|
|
271
|
+
it('should remove a non-floor decoration', () => {
|
|
272
|
+
level.removeDecoration(undefined, 0);
|
|
273
|
+
const nonFloorDecos = level.getDecorations(deco => deco.floor === undefined, true);
|
|
274
|
+
expect(nonFloorDecos).toHaveLength(0);
|
|
275
|
+
});
|
|
276
|
+
it('should update a floor decoration', () => {
|
|
277
|
+
level.updateDecoration(1, 0, { color: '#555555' });
|
|
278
|
+
const decorations = level.getDecorations();
|
|
279
|
+
expect(decorations[1].color).toBe('#555555');
|
|
280
|
+
expect(decorations[1].decorationType).toBe('Foreground'); // Other properties should remain unchanged
|
|
281
|
+
});
|
|
282
|
+
it('should update a non-floor decoration', () => {
|
|
283
|
+
level.updateDecoration(undefined, 0, { color: '#666666' });
|
|
284
|
+
const nonFloorDecos = level.getDecorations(deco => deco.floor === undefined, true);
|
|
285
|
+
expect(nonFloorDecos[0].color).toBe('#666666');
|
|
286
|
+
expect(nonFloorDecos[0].decorationType).toBe('Global'); // Other properties should remain unchanged
|
|
287
|
+
});
|
|
288
|
+
it('should throw error when inserting decoration at invalid floor', () => {
|
|
289
|
+
expect(() => level.insertDecoration(-1, { decorationType: 'Background' }))
|
|
290
|
+
.toThrow('Invalid floor index');
|
|
291
|
+
expect(() => level.insertDecoration(3, { decorationType: 'Background' }))
|
|
292
|
+
.toThrow('Invalid floor index');
|
|
293
|
+
});
|
|
294
|
+
it('should throw error when removing decoration at invalid index', () => {
|
|
295
|
+
expect(() => level.removeDecoration(1, -1))
|
|
296
|
+
.toThrow('Invalid decoration index');
|
|
297
|
+
expect(() => level.removeDecoration(1, 2))
|
|
298
|
+
.toThrow('Invalid decoration index');
|
|
299
|
+
expect(() => level.removeDecoration(undefined, -1))
|
|
300
|
+
.toThrow('Invalid decoration index');
|
|
301
|
+
expect(() => level.removeDecoration(undefined, 2))
|
|
302
|
+
.toThrow('Invalid decoration index');
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
describe('Tile and Item retrieval', () => {
|
|
307
|
+
let level;
|
|
308
|
+
beforeEach(() => {
|
|
309
|
+
const mockLevelData = {
|
|
310
|
+
angleData: [0, 90, 180, 270, 360],
|
|
311
|
+
settings: { bpm: 120 },
|
|
312
|
+
actions: [
|
|
313
|
+
{ floor: 1, eventType: 'Twirl' },
|
|
314
|
+
{ floor: 2, eventType: 'Pause', duration: 2 },
|
|
315
|
+
{ floor: 3, eventType: 'SetSpeed', bpm: 150 }
|
|
316
|
+
],
|
|
317
|
+
decorations: [
|
|
318
|
+
{ floor: 0, decorationType: 'Background', color: '#000000' },
|
|
319
|
+
{ floor: 1, decorationType: 'Foreground', color: '#FFFFFF' },
|
|
320
|
+
{ decorationType: 'Global', color: '#FF0000' }
|
|
321
|
+
]
|
|
322
|
+
};
|
|
323
|
+
fs.readFileSync.mockReturnValue(JSON.stringify(mockLevelData));
|
|
324
|
+
level = new LevelDict('test.adofai');
|
|
325
|
+
});
|
|
326
|
+
describe('getTiles', () => {
|
|
327
|
+
it('should get tiles in a range', () => {
|
|
328
|
+
const tiles = level.getTiles(1, 4);
|
|
329
|
+
expect(tiles).toHaveLength(3);
|
|
330
|
+
expect(tiles.map(t => t.angle)).toEqual([90, 180, 270]);
|
|
331
|
+
});
|
|
332
|
+
it('should get tiles at specific indices', () => {
|
|
333
|
+
const tiles = level.getTiles([0, 2, 4]);
|
|
334
|
+
expect(tiles).toHaveLength(3);
|
|
335
|
+
expect(tiles.map(t => t.angle)).toEqual([0, 180, 360]);
|
|
336
|
+
});
|
|
337
|
+
it('should throw error for invalid range', () => {
|
|
338
|
+
expect(() => level.getTiles(-1, 3)).toThrow('Invalid range indices');
|
|
339
|
+
expect(() => level.getTiles(3, 2)).toThrow('Invalid range indices');
|
|
340
|
+
expect(() => level.getTiles(0, 6)).toThrow('Invalid range indices');
|
|
341
|
+
});
|
|
342
|
+
it('should throw error for invalid indices', () => {
|
|
343
|
+
expect(() => level.getTiles([-1, 2])).toThrow('Invalid tile index');
|
|
344
|
+
expect(() => level.getTiles([0, 5])).toThrow('Invalid tile index');
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
describe('getActions', () => {
|
|
348
|
+
it('should get all actions', () => {
|
|
349
|
+
const actions = level.getActions();
|
|
350
|
+
expect(actions).toHaveLength(3);
|
|
351
|
+
expect(actions[0].eventType).toBe('Twirl');
|
|
352
|
+
expect(actions[1].eventType).toBe('Pause');
|
|
353
|
+
expect(actions[2].eventType).toBe('SetSpeed');
|
|
354
|
+
});
|
|
355
|
+
it('should filter actions by condition', () => {
|
|
356
|
+
const twirlActions = level.getActions(action => action.eventType === 'Twirl');
|
|
357
|
+
expect(twirlActions).toHaveLength(1);
|
|
358
|
+
expect(twirlActions[0].floor).toBe(1);
|
|
359
|
+
const speedActions = level.getActions(action => action.eventType === 'SetSpeed');
|
|
360
|
+
expect(speedActions).toHaveLength(1);
|
|
361
|
+
expect(speedActions[0].bpm).toBe(150);
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
describe('getDecorations', () => {
|
|
365
|
+
it('should get floor decorations by default', () => {
|
|
366
|
+
const decorations = level.getDecorations();
|
|
367
|
+
expect(decorations).toHaveLength(2);
|
|
368
|
+
expect(decorations[0].decorationType).toBe('Background');
|
|
369
|
+
expect(decorations[1].decorationType).toBe('Foreground');
|
|
370
|
+
});
|
|
371
|
+
it('should include non-floor decorations when specified', () => {
|
|
372
|
+
const allDecorations = level.getDecorations(() => true, true);
|
|
373
|
+
expect(allDecorations).toHaveLength(3);
|
|
374
|
+
expect(allDecorations[2].decorationType).toBe('Global');
|
|
375
|
+
});
|
|
376
|
+
it('should filter decorations by condition', () => {
|
|
377
|
+
const backgroundDecos = level.getDecorations(deco => deco.decorationType === 'Background');
|
|
378
|
+
expect(backgroundDecos).toHaveLength(1);
|
|
379
|
+
expect(backgroundDecos[0].color).toBe('#000000');
|
|
380
|
+
const globalDecos = level.getDecorations(deco => deco.decorationType === 'Global', true);
|
|
381
|
+
expect(globalDecos).toHaveLength(1);
|
|
382
|
+
expect(globalDecos[0].color).toBe('#FF0000');
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
});
|
|
72
386
|
});
|
|
73
387
|
//# sourceMappingURL=LevelFile.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevelFile.test.js","sourceRoot":"","sources":["../../src/__tests__/LevelFile.test.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,iBAAiB;AACjB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEhB,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,KAAK,GAAG,IAAI,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC5D,EAAE,CAAC,YAA0B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAErD,MAAM,CAAC,GAAG,EAAE;YACV,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CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC1D,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;gBAChD,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,KAAK,YAAY,CAAC,CAAC;gBAC3F,MAAM,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;gBACxC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAEjD,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,KAAK,QAAQ,EAAE,IAAI,CAAC,CAAC;gBACzF,MAAM,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;gBACpC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import LevelDict from './LevelDict';
|
|
2
|
-
import { Action, Decoration, InvalidLevelDictException, Settings, Tile } from './types';
|
|
1
|
+
import LevelDict from './LevelDict.js';
|
|
2
|
+
import { Action, Decoration, InvalidLevelDictException, Settings, Tile, LevelJSON } from './types/index.js';
|
|
3
3
|
export default LevelDict;
|
|
4
|
-
export { Action, Decoration, Settings, Tile, InvalidLevelDictException };
|
|
4
|
+
export { Action, Decoration, Settings, Tile, LevelJSON, InvalidLevelDictException };
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,yBAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE5G,eAAe,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,yBAAyB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import LevelDict from './LevelDict';
|
|
2
|
-
import { InvalidLevelDictException } from './types';
|
|
1
|
+
import LevelDict from './LevelDict.js';
|
|
2
|
+
import { InvalidLevelDictException } from './types/index.js';
|
|
3
3
|
export default LevelDict;
|
|
4
4
|
export { InvalidLevelDictException };
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAsB,yBAAyB,EAA6B,MAAM,kBAAkB,CAAC;AAE5G,eAAe,SAAS,CAAC;AACzB,OAAO,EAAiD,yBAAyB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levelUtils.d.ts","sourceRoot":"","sources":["../../src/utils/levelUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"levelUtils.d.ts","sourceRoot":"","sources":["../../src/utils/levelUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAWhD"}
|