adofai 2.13.1 → 2.14.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.
@@ -1,75 +0,0 @@
1
- export const preset_noeffect = {
2
- type: 'exclude', events: [
3
- 'Flash',
4
- 'SetFilter',
5
- 'SetFilterAdvanced',
6
- 'HallOfMirrors',
7
- 'Bloom',
8
- 'ScalePlanets',
9
- 'ScreenTile',
10
- 'ScreenScroll',
11
- 'ShakeScreen'
12
- ]
13
- };
14
- export const preset_noholds = {
15
- type: 'exclude', events: [
16
- 'Hold',
17
- ]
18
- };
19
- export const preset_nomovecamera = {
20
- type: 'exclude', events: [
21
- 'MoveCamera',
22
- ]
23
- };
24
- export const preset_noeffect_completely = {
25
- type: 'exclude', events: [
26
- "AddDecoration",
27
- "AddText",
28
- "AddObject",
29
- "Checkpoint",
30
- "SetHitsound",
31
- "PlaySound",
32
- "SetPlanetRotation",
33
- "ScalePlanets",
34
- "ColorTrack",
35
- "AnimateTrack",
36
- "RecolorTrack",
37
- "MoveTrack",
38
- "PositionTrack",
39
- "MoveDecorations",
40
- "SetText",
41
- "SetObject",
42
- "SetDefaultText",
43
- "CustomBackground",
44
- "Flash",
45
- "MoveCamera",
46
- "SetFilter",
47
- "HallOfMirrors",
48
- "ShakeScreen",
49
- "Bloom",
50
- "ScreenTile",
51
- "ScreenScroll",
52
- "SetFrameRate",
53
- "RepeatEvents",
54
- "SetConditionalEvents",
55
- "EditorComment",
56
- "Bookmark",
57
- "Hold",
58
- "SetHoldSound",
59
- //"MultiPlanet",
60
- //"FreeRoam",
61
- //"FreeRoamTwirl",
62
- //"FreeRoamRemove",
63
- "Hide",
64
- "ScaleMargin",
65
- "ScaleRadius"
66
- ]
67
- };
68
- export const preset_inner_no_deco = {
69
- type: "special", events: [
70
- "MoveDecorations",
71
- "SetText",
72
- "SetObject",
73
- "SetDefaultText"
74
- ]
75
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * @param {object} obj - JSON Object
3
- * @param {number} indent - No usage
4
- * @param {boolean} isRoot - Is JSON the Root?
5
- * @returns ADOFAI File Content or Object
6
- */
7
- declare function exportAsADOFAI(obj: any, indent?: number, isRoot?: boolean): string;
8
- export default exportAsADOFAI;
@@ -1,44 +0,0 @@
1
- /**
2
- * @param {object} obj - JSON Object
3
- * @param {number} indent - No usage
4
- * @param {boolean} isRoot - Is JSON the Root?
5
- * @returns ADOFAI File Content or Object
6
- */
7
- function exportAsADOFAI(obj, indent = 0, isRoot = false) {
8
- if (typeof obj !== 'object' || obj === null) {
9
- return JSON.stringify(obj);
10
- }
11
- if (Array.isArray(obj)) {
12
- const allPrimitives = obj.every(item => typeof item !== 'object' || item === null);
13
- if (allPrimitives) {
14
- return '[' + obj.map(item => exportAsADOFAI(item)).join(',') + ']';
15
- }
16
- const spaces = ' '.repeat(indent);
17
- const arrayItems = obj.map(item => spaces + ' ' + formatAsSingleLine(item)).join(',\n');
18
- return '[\n' + arrayItems + '\n' + spaces + ']';
19
- }
20
- const spaces = ' '.repeat(indent);
21
- const keys = Object.keys(obj);
22
- if (isRoot) {
23
- const objectItems = keys.map(key => ' ' + JSON.stringify(key) + ': ' + exportAsADOFAI(obj[key], 2)).join(',\n');
24
- return '{\n' + objectItems + '\n}';
25
- }
26
- const objectItems = keys.map(key => spaces + ' ' + JSON.stringify(key) + ': ' + exportAsADOFAI(obj[key], indent + 2)).join(',\n');
27
- return '{\n' + objectItems + '\n' + spaces + '}';
28
- }
29
- /**
30
- * @param {Array} obj Eventlist to keep
31
- * @returns {string} JSON formated as singleline
32
- */
33
- function formatAsSingleLine(obj) {
34
- if (typeof obj !== 'object' || obj === null) {
35
- return exportAsADOFAI(obj);
36
- }
37
- if (Array.isArray(obj)) {
38
- return '[' + obj.map(formatAsSingleLine).join(',') + ']';
39
- }
40
- const keys = Object.keys(obj);
41
- const entries = keys.map(key => JSON.stringify(key) + ': ' + formatAsSingleLine(obj[key])).join(', ');
42
- return '{' + entries + '}';
43
- }
44
- export default exportAsADOFAI;