adofai 3.0.1 → 3.1.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.
- package/README.md +111 -111
- package/dist/src/effectProcessor.js +37 -2
- package/dist/src/events/AddDecoration.d.ts +8 -7
- package/dist/src/events/AddObject.d.ts +5 -4
- package/dist/src/events/AddText.d.ts +5 -4
- package/dist/src/events/AnimateTrack.d.ts +3 -2
- package/dist/src/events/AutoPlayTiles.d.ts +2 -1
- package/dist/src/events/Bookmark.d.ts +2 -1
- package/dist/src/events/ChangeTrack.d.ts +2 -1
- package/dist/src/events/CustomBackground.d.ts +9 -8
- package/dist/src/events/Flash.d.ts +2 -1
- package/dist/src/events/FreeRoam.d.ts +4 -3
- package/dist/src/events/FreeRoamRemove.d.ts +2 -1
- package/dist/src/events/FreeRoamTwirl.d.ts +2 -1
- package/dist/src/events/Hide.d.ts +5 -4
- package/dist/src/events/MoveCamera.d.ts +4 -3
- package/dist/src/events/MoveDecorations.d.ts +5 -4
- package/dist/src/events/MoveTrack.d.ts +3 -2
- package/dist/src/events/Pause.d.ts +2 -1
- package/dist/src/events/PlaySound.d.ts +3 -2
- package/dist/src/events/PositionTrack.d.ts +3 -2
- package/dist/src/events/ScaleMargin.d.ts +2 -1
- package/dist/src/events/ScalePlanets.d.ts +2 -1
- package/dist/src/events/ScaleRadius.d.ts +2 -1
- package/dist/src/events/SetConditionalEvents.d.ts +2 -1
- package/dist/src/events/SetFilter.d.ts +2 -1
- package/dist/src/events/SetFilterAdvanced.d.ts +2 -1
- package/dist/src/events/SetFloorIcon.d.ts +2 -1
- package/dist/src/events/SetFrameRate.d.ts +2 -1
- package/dist/src/events/SetHitsound.d.ts +3 -2
- package/dist/src/events/SetHoldSound.d.ts +2 -1
- package/dist/src/events/SetInputEvent.d.ts +4 -3
- package/dist/src/events/SetObject.d.ts +3 -2
- package/dist/src/events/SetParticle.d.ts +2 -1
- package/dist/src/events/SetText.d.ts +3 -2
- package/dist/src/format.js +3 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/dist/src/pathdata.js +3 -1
- package/dist/src/presets.js +8 -5
- package/dist/src/types.d.ts +96 -0
- package/dist/src/types.js +7 -0
- package/dist/umd/index.js +1 -1
- package/package.json +97 -92
- package/dist/src/parser/ArrayBufferParser copy.d.ts +0 -9
- package/dist/src/parser/ArrayBufferParser copy.js +0 -98
- package/dist/src/parser/BufferParser copy.d.ts +0 -9
- package/dist/src/parser/BufferParser copy.js +0 -92
- package/dist/src/parser/BufferParserX.d.ts +0 -23
- package/dist/src/parser/BufferParserX.js +0 -77
- package/dist/src/parser/FileParser.d.ts +0 -9
- package/dist/src/parser/FileParser.js +0 -30
- package/dist/src/structure/format copy.d.ts +0 -8
- package/dist/src/structure/format copy.js +0 -44
package/README.md
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
# ADOFAI
|
|
2
|
-
|
|
3
|
-
A Javascript library for ADOFAI levels.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
Preview / Edit the `.adofai` file.
|
|
7
|
-
|
|
8
|
-
Re_ADOJAS(A Level Player of ADOFAI) uses `adofai` to parse ADOFAI Level file.
|
|
9
|
-
|
|
10
|
-
## Installation
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npm install adofai
|
|
14
|
-
# or
|
|
15
|
-
yarn add adofai
|
|
16
|
-
# or
|
|
17
|
-
pnpm install adofai
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
if you want to display highlight of adofai file, you can use `Rhythm Game Syntax Highlighter` vscode extension.
|
|
21
|
-
|
|
22
|
-
## Got Started
|
|
23
|
-
|
|
24
|
-
### Import
|
|
25
|
-
|
|
26
|
-
For Commonjs:
|
|
27
|
-
```ts
|
|
28
|
-
const adofai = require('adofai');
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
For ES6 Modules:
|
|
32
|
-
```ts
|
|
33
|
-
import * as adofai from 'adofai';
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Create a Level
|
|
37
|
-
|
|
38
|
-
```ts
|
|
39
|
-
const file = new adofai.Level(adofaiFileContent);
|
|
40
|
-
|
|
41
|
-
//or
|
|
42
|
-
|
|
43
|
-
const parser = new adofai.Parsers.StringParser();
|
|
44
|
-
const file = new adofai.Level(adofaiFileContent,parser);
|
|
45
|
-
|
|
46
|
-
//The advantage of the latter over the former is that it pre-initializes the Parser, avoiding multiple instantiations.
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Format:
|
|
50
|
-
```ts
|
|
51
|
-
class Level {
|
|
52
|
-
constructor(opt: string | LevelOptions, provider?: ParseProvider)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
Available ParseProviders:
|
|
57
|
-
`StringParser` `ArrayBufferParser` `BufferParser`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Usually,only `StringParser` is needed.
|
|
61
|
-
but you can use `BufferParser` to parse ADOFAI files in Node environment.
|
|
62
|
-
|
|
63
|
-
On browser, you can also use `ArrayBuffer` to parse ADOFAI files.
|
|
64
|
-
(`BufferParser` is not available in browser,but you can use browserify `Buffer` to polyfill)
|
|
65
|
-
|
|
66
|
-
### Load Level
|
|
67
|
-
```ts
|
|
68
|
-
file.on('load'() => {
|
|
69
|
-
//logic...
|
|
70
|
-
})
|
|
71
|
-
file.load()
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
or you can use `then()`
|
|
75
|
-
```ts
|
|
76
|
-
file.load().then(() => {
|
|
77
|
-
|
|
78
|
-
})
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Export Level
|
|
82
|
-
```ts
|
|
83
|
-
type FileType = 'string'|'object'
|
|
84
|
-
|
|
85
|
-
file.export(type: FileType = 'string',indent?:number,useAdofaiStyle:boolean = true)
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
method `export()` returns a Object or String.
|
|
89
|
-
|
|
90
|
-
Object: return ADOFAI Object.
|
|
91
|
-
String: return ADOFAI String.
|
|
92
|
-
|
|
93
|
-
```ts
|
|
94
|
-
import fs from 'fs'
|
|
95
|
-
type FileType = 'string'|'object'
|
|
96
|
-
|
|
97
|
-
const content = file.export('string',null,true);
|
|
98
|
-
fs.writeFileSync('output.adofai',content)
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## Data Operation
|
|
103
|
-
|
|
104
|
-
See interfaces to see all data.
|
|
105
|
-
|
|
106
|
-
```ts
|
|
107
|
-
//Get AngleDatas:
|
|
108
|
-
const angleDatas = file.angleData;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
1
|
+
# ADOFAI
|
|
2
|
+
|
|
3
|
+
A Javascript library for ADOFAI levels.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
Preview / Edit the `.adofai` file.
|
|
7
|
+
|
|
8
|
+
Re_ADOJAS(A Level Player of ADOFAI) uses `adofai` to parse ADOFAI Level file.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install adofai
|
|
14
|
+
# or
|
|
15
|
+
yarn add adofai
|
|
16
|
+
# or
|
|
17
|
+
pnpm install adofai
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
if you want to display highlight of adofai file, you can use `Rhythm Game Syntax Highlighter` vscode extension.
|
|
21
|
+
|
|
22
|
+
## Got Started
|
|
23
|
+
|
|
24
|
+
### Import
|
|
25
|
+
|
|
26
|
+
For Commonjs:
|
|
27
|
+
```ts
|
|
28
|
+
const adofai = require('adofai');
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For ES6 Modules:
|
|
32
|
+
```ts
|
|
33
|
+
import * as adofai from 'adofai';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Create a Level
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
const file = new adofai.Level(adofaiFileContent);
|
|
40
|
+
|
|
41
|
+
//or
|
|
42
|
+
|
|
43
|
+
const parser = new adofai.Parsers.StringParser();
|
|
44
|
+
const file = new adofai.Level(adofaiFileContent,parser);
|
|
45
|
+
|
|
46
|
+
//The advantage of the latter over the former is that it pre-initializes the Parser, avoiding multiple instantiations.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Format:
|
|
50
|
+
```ts
|
|
51
|
+
class Level {
|
|
52
|
+
constructor(opt: string | LevelOptions, provider?: ParseProvider)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Available ParseProviders:
|
|
57
|
+
`StringParser` `ArrayBufferParser` `BufferParser`
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
Usually,only `StringParser` is needed.
|
|
61
|
+
but you can use `BufferParser` to parse ADOFAI files in Node environment.
|
|
62
|
+
|
|
63
|
+
On browser, you can also use `ArrayBuffer` to parse ADOFAI files.
|
|
64
|
+
(`BufferParser` is not available in browser,but you can use browserify `Buffer` to polyfill)
|
|
65
|
+
|
|
66
|
+
### Load Level
|
|
67
|
+
```ts
|
|
68
|
+
file.on('load'() => {
|
|
69
|
+
//logic...
|
|
70
|
+
})
|
|
71
|
+
file.load()
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
or you can use `then()`
|
|
75
|
+
```ts
|
|
76
|
+
file.load().then(() => {
|
|
77
|
+
|
|
78
|
+
})
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Export Level
|
|
82
|
+
```ts
|
|
83
|
+
type FileType = 'string'|'object'
|
|
84
|
+
|
|
85
|
+
file.export(type: FileType = 'string',indent?:number,useAdofaiStyle:boolean = true)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
method `export()` returns a Object or String.
|
|
89
|
+
|
|
90
|
+
Object: return ADOFAI Object.
|
|
91
|
+
String: return ADOFAI String.
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import fs from 'fs'
|
|
95
|
+
type FileType = 'string'|'object'
|
|
96
|
+
|
|
97
|
+
const content = file.export('string',null,true);
|
|
98
|
+
fs.writeFileSync('output.adofai',content)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## Data Operation
|
|
103
|
+
|
|
104
|
+
See interfaces to see all data.
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
//Get AngleDatas:
|
|
108
|
+
const angleDatas = file.angleData;
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
112
|
```
|
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const presets = __importStar(require("./presets"));
|
|
2
37
|
/**
|
|
3
38
|
* @param {Array} tiles ADOFAI Tiles from ADOFAI.Level
|
|
4
39
|
* @returns {Array} new Tiles
|
|
@@ -51,4 +86,4 @@ const effectProcessor = {
|
|
|
51
86
|
clearEvents,
|
|
52
87
|
keepEvents
|
|
53
88
|
};
|
|
54
|
-
|
|
89
|
+
exports.default = effectProcessor;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2, TextAnchor, Hitbox, ABoolean } from '../types';
|
|
2
3
|
export interface AddDecoration extends AdofaiEvent {
|
|
3
4
|
eventType: 'AddDecoration';
|
|
4
5
|
decText?: string;
|
|
5
6
|
decTextColor?: string;
|
|
6
7
|
decTextFont?: string;
|
|
7
|
-
decTextAnchor?:
|
|
8
|
+
decTextAnchor?: TextAnchor;
|
|
8
9
|
decTextScale?: number;
|
|
9
10
|
decTextAngle?: number;
|
|
10
11
|
decTextDepth?: number;
|
|
11
12
|
decorationImage?: string;
|
|
12
13
|
angleOffset?: number;
|
|
13
|
-
position?:
|
|
14
|
+
position?: Vec2;
|
|
14
15
|
rotation?: number;
|
|
15
|
-
scale?:
|
|
16
|
-
parallax?:
|
|
16
|
+
scale?: Vec2;
|
|
17
|
+
parallax?: Vec2;
|
|
17
18
|
opacity?: number;
|
|
18
19
|
color?: string;
|
|
19
20
|
depth?: number;
|
|
20
21
|
tag?: string;
|
|
21
|
-
imageSmoothing?:
|
|
22
|
-
hitbox?:
|
|
23
|
-
failsafe?:
|
|
22
|
+
imageSmoothing?: ABoolean;
|
|
23
|
+
hitbox?: Hitbox;
|
|
24
|
+
failsafe?: ABoolean;
|
|
24
25
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2, ABoolean } from '../types';
|
|
2
3
|
export interface AddObject extends AdofaiEvent {
|
|
3
4
|
eventType: 'AddObject';
|
|
4
5
|
object?: string;
|
|
5
|
-
position?:
|
|
6
|
+
position?: Vec2;
|
|
6
7
|
rotation?: number;
|
|
7
|
-
scale?:
|
|
8
|
+
scale?: Vec2;
|
|
8
9
|
opacity?: number;
|
|
9
|
-
parallax?:
|
|
10
|
+
parallax?: Vec2;
|
|
10
11
|
tag?: string;
|
|
11
12
|
depth?: number;
|
|
12
13
|
color?: string;
|
|
13
|
-
imageSmoothing?:
|
|
14
|
+
imageSmoothing?: ABoolean;
|
|
14
15
|
angleOffset?: number;
|
|
15
16
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2, TextAnchor } from '../types';
|
|
2
3
|
export interface AddText extends AdofaiEvent {
|
|
3
4
|
eventType: 'AddText';
|
|
4
5
|
decText?: string;
|
|
5
6
|
decTextColor?: string;
|
|
6
7
|
decTextFont?: string;
|
|
7
|
-
decTextAnchor?:
|
|
8
|
+
decTextAnchor?: TextAnchor;
|
|
8
9
|
decTextScale?: number;
|
|
9
10
|
decTextAngle?: number;
|
|
10
11
|
decTextDepth?: number;
|
|
11
12
|
decTextFontSize?: number;
|
|
12
13
|
angleOffset?: number;
|
|
13
|
-
position?:
|
|
14
|
+
position?: Vec2;
|
|
14
15
|
rotation?: number;
|
|
15
|
-
scale?:
|
|
16
|
-
parallax?:
|
|
16
|
+
scale?: Vec2;
|
|
17
|
+
parallax?: Vec2;
|
|
17
18
|
opacity?: number;
|
|
18
19
|
color?: string;
|
|
19
20
|
depth?: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2 } from '../types';
|
|
2
3
|
export interface AnimateTrack extends AdofaiEvent {
|
|
3
4
|
eventType: 'AnimateTrack';
|
|
4
5
|
startTile?: number;
|
|
@@ -6,9 +7,9 @@ export interface AnimateTrack extends AdofaiEvent {
|
|
|
6
7
|
duration?: number;
|
|
7
8
|
easing?: string;
|
|
8
9
|
tag?: string;
|
|
9
|
-
positionOffset?:
|
|
10
|
+
positionOffset?: Vec2;
|
|
10
11
|
rotation?: number;
|
|
11
|
-
scale?:
|
|
12
|
+
scale?: Vec2;
|
|
12
13
|
opacity?: number;
|
|
13
14
|
color?: string;
|
|
14
15
|
colorTo?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface AutoPlayTiles extends AdofaiEvent {
|
|
3
4
|
eventType: 'AutoPlayTiles';
|
|
4
|
-
editorOnly?:
|
|
5
|
+
editorOnly?: ABoolean;
|
|
5
6
|
angleOffset?: number;
|
|
6
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface Bookmark extends AdofaiEvent {
|
|
3
4
|
eventType: 'Bookmark';
|
|
4
5
|
bookmark?: string;
|
|
5
|
-
editorOnly?:
|
|
6
|
+
editorOnly?: ABoolean;
|
|
6
7
|
angleOffset?: number;
|
|
7
8
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2 } from '../types';
|
|
2
3
|
export interface ChangeTrack extends AdofaiEvent {
|
|
3
4
|
eventType: 'ChangeTrack';
|
|
4
5
|
startTile?: number;
|
|
5
6
|
floorCount?: number;
|
|
6
7
|
duration?: number;
|
|
7
|
-
positionOffset?:
|
|
8
|
+
positionOffset?: Vec2;
|
|
8
9
|
angleOffset?: number;
|
|
9
10
|
easing?: string;
|
|
10
11
|
tag?: string;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2, BgDisplayMode, BgShapeType, ABoolean } from '../types';
|
|
2
3
|
export interface CustomBackground extends AdofaiEvent {
|
|
3
4
|
eventType: 'CustomBackground';
|
|
4
5
|
bgImage?: string;
|
|
5
6
|
bgImageColor?: string;
|
|
6
|
-
parallax?:
|
|
7
|
-
bgDisplayMode?:
|
|
8
|
-
lockRot?:
|
|
9
|
-
loopBG?:
|
|
7
|
+
parallax?: Vec2;
|
|
8
|
+
bgDisplayMode?: BgDisplayMode;
|
|
9
|
+
lockRot?: ABoolean;
|
|
10
|
+
loopBG?: ABoolean;
|
|
10
11
|
scalingRatio?: number;
|
|
11
|
-
imageSmoothing?:
|
|
12
|
-
showDefaultBGIfNoImage?:
|
|
13
|
-
showDefaultBGTile?:
|
|
12
|
+
imageSmoothing?: ABoolean;
|
|
13
|
+
showDefaultBGIfNoImage?: ABoolean;
|
|
14
|
+
showDefaultBGTile?: ABoolean;
|
|
14
15
|
defaultBGTileColor?: string;
|
|
15
|
-
defaultBGShapeType?:
|
|
16
|
+
defaultBGShapeType?: BgShapeType;
|
|
16
17
|
defaultBGShapeColor?: string;
|
|
17
18
|
duration?: number;
|
|
18
19
|
easing?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { FlashStyle } from '../types';
|
|
2
3
|
export interface Flash extends AdofaiEvent {
|
|
3
4
|
eventType: 'Flash';
|
|
4
5
|
duration?: number;
|
|
@@ -6,7 +7,7 @@ export interface Flash extends AdofaiEvent {
|
|
|
6
7
|
colorTo?: string;
|
|
7
8
|
colorToDuration?: number;
|
|
8
9
|
colorToEasing?: string;
|
|
9
|
-
flashStyle?:
|
|
10
|
+
flashStyle?: FlashStyle;
|
|
10
11
|
opacity?: number;
|
|
11
12
|
easing?: string;
|
|
12
13
|
angleOffset?: number;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { AngleCorrectionDir, ABoolean } from '../types';
|
|
2
3
|
export interface FreeRoam extends AdofaiEvent {
|
|
3
4
|
eventType: 'FreeRoam';
|
|
4
5
|
duration?: number;
|
|
5
|
-
angleCorrectionDir?:
|
|
6
|
+
angleCorrectionDir?: AngleCorrectionDir;
|
|
6
7
|
freeRoamAngle?: number;
|
|
7
|
-
freeRoamAngleLocal?:
|
|
8
|
-
editorOnly?:
|
|
8
|
+
freeRoamAngleLocal?: ABoolean;
|
|
9
|
+
editorOnly?: ABoolean;
|
|
9
10
|
angleOffset?: number;
|
|
10
11
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface FreeRoamRemove extends AdofaiEvent {
|
|
3
4
|
eventType: 'FreeRoamRemove';
|
|
4
|
-
editorOnly?:
|
|
5
|
+
editorOnly?: ABoolean;
|
|
5
6
|
angleOffset?: number;
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface FreeRoamTwirl extends AdofaiEvent {
|
|
3
4
|
eventType: 'FreeRoamTwirl';
|
|
4
|
-
editorOnly?:
|
|
5
|
+
editorOnly?: ABoolean;
|
|
5
6
|
angleOffset?: number;
|
|
6
7
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface Hide extends AdofaiEvent {
|
|
3
4
|
eventType: 'Hide';
|
|
4
|
-
hideJudgment?:
|
|
5
|
-
hideUI?:
|
|
6
|
-
hidePlanet?:
|
|
7
|
-
editorOnly?:
|
|
5
|
+
hideJudgment?: ABoolean;
|
|
6
|
+
hideUI?: ABoolean;
|
|
7
|
+
hidePlanet?: ABoolean;
|
|
8
|
+
editorOnly?: ABoolean;
|
|
8
9
|
angleOffset?: number;
|
|
9
10
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2, RelativeTo, ABoolean } from '../types';
|
|
2
3
|
export interface MoveCamera extends AdofaiEvent {
|
|
3
4
|
eventType: 'MoveCamera';
|
|
4
5
|
duration?: number;
|
|
5
|
-
relativeTo?:
|
|
6
|
-
position?:
|
|
6
|
+
relativeTo?: RelativeTo;
|
|
7
|
+
position?: Vec2;
|
|
7
8
|
rotation?: number;
|
|
8
9
|
zoom?: number;
|
|
9
10
|
minZoom?: number;
|
|
10
11
|
maxZoom?: number;
|
|
11
12
|
easing?: string;
|
|
12
|
-
editorOnly?:
|
|
13
|
+
editorOnly?: ABoolean;
|
|
13
14
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2 } from '../types';
|
|
2
3
|
export interface MoveDecorations extends AdofaiEvent {
|
|
3
4
|
eventType: 'MoveDecorations';
|
|
4
5
|
duration?: number;
|
|
5
6
|
tag?: string;
|
|
6
|
-
positionOffset?:
|
|
7
|
+
positionOffset?: Vec2;
|
|
7
8
|
rotationOffset?: number;
|
|
8
|
-
scale?:
|
|
9
|
+
scale?: Vec2;
|
|
9
10
|
opacity?: number;
|
|
10
11
|
color?: string;
|
|
11
12
|
colorTo?: string;
|
|
@@ -13,6 +14,6 @@ export interface MoveDecorations extends AdofaiEvent {
|
|
|
13
14
|
colorToEasing?: string;
|
|
14
15
|
easing?: string;
|
|
15
16
|
angleOffset?: number;
|
|
16
|
-
parallaxOffset?:
|
|
17
|
-
pivotOffset?:
|
|
17
|
+
parallaxOffset?: Vec2;
|
|
18
|
+
pivotOffset?: Vec2;
|
|
18
19
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2 } from '../types';
|
|
2
3
|
export interface MoveTrack extends AdofaiEvent {
|
|
3
4
|
eventType: 'MoveTrack';
|
|
4
5
|
startTile?: number;
|
|
5
6
|
floorCount?: number;
|
|
6
7
|
duration?: number;
|
|
7
|
-
positionOffset?:
|
|
8
|
+
positionOffset?: Vec2;
|
|
8
9
|
rotation?: number;
|
|
9
|
-
scale?:
|
|
10
|
+
scale?: Vec2;
|
|
10
11
|
opacity?: number;
|
|
11
12
|
easing?: string;
|
|
12
13
|
tag?: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { AngleCorrectionDir } from '../types';
|
|
2
3
|
export interface Pause extends AdofaiEvent {
|
|
3
4
|
eventType: 'Pause';
|
|
4
5
|
duration?: number;
|
|
5
|
-
angleCorrectionDir?:
|
|
6
|
+
angleCorrectionDir?: AngleCorrectionDir;
|
|
6
7
|
countdownTicks?: number;
|
|
7
8
|
angleOffset?: number;
|
|
8
9
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface PlaySound extends AdofaiEvent {
|
|
3
4
|
eventType: 'PlaySound';
|
|
4
5
|
sound?: string;
|
|
5
6
|
volume?: number;
|
|
6
7
|
pan?: number;
|
|
7
|
-
loop?:
|
|
8
|
-
editorOnly?:
|
|
8
|
+
loop?: ABoolean;
|
|
9
|
+
editorOnly?: ABoolean;
|
|
9
10
|
angleOffset?: number;
|
|
10
11
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Vec2, ABoolean } from '../types';
|
|
2
3
|
export interface PositionTrack extends AdofaiEvent {
|
|
3
4
|
eventType: 'PositionTrack';
|
|
4
5
|
startTile?: number;
|
|
5
6
|
floorCount?: number;
|
|
6
|
-
positionOffset?:
|
|
7
|
+
positionOffset?: Vec2;
|
|
7
8
|
easing?: string;
|
|
8
|
-
editorOnly?:
|
|
9
|
+
editorOnly?: ABoolean;
|
|
9
10
|
angleOffset?: number;
|
|
10
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface ScaleMargin extends AdofaiEvent {
|
|
3
4
|
eventType: 'ScaleMargin';
|
|
4
5
|
scale?: number;
|
|
5
|
-
editorOnly?:
|
|
6
|
+
editorOnly?: ABoolean;
|
|
6
7
|
angleOffset?: number;
|
|
7
8
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { TargetPlanet } from '../types';
|
|
2
3
|
export interface ScalePlanets extends AdofaiEvent {
|
|
3
4
|
eventType: 'ScalePlanets';
|
|
4
5
|
planetsScale?: number;
|
|
5
6
|
scale?: number;
|
|
6
7
|
duration?: number;
|
|
7
8
|
easing?: string;
|
|
8
|
-
targetPlanet?:
|
|
9
|
+
targetPlanet?: TargetPlanet;
|
|
9
10
|
planetNumber?: number;
|
|
10
11
|
angleOffset?: number;
|
|
11
12
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { ABoolean } from '../types';
|
|
2
3
|
export interface ScaleRadius extends AdofaiEvent {
|
|
3
4
|
eventType: 'ScaleRadius';
|
|
4
5
|
scale?: number;
|
|
5
|
-
editorOnly?:
|
|
6
|
+
editorOnly?: ABoolean;
|
|
6
7
|
angleOffset?: number;
|
|
7
8
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { Condition } from '../types';
|
|
2
3
|
export interface SetConditionalEvents extends AdofaiEvent {
|
|
3
4
|
eventType: 'SetConditionalEvents';
|
|
4
5
|
eventTag?: string;
|
|
5
|
-
condition?:
|
|
6
|
+
condition?: Condition;
|
|
6
7
|
execution?: string;
|
|
7
8
|
events?: any[];
|
|
8
9
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AdofaiEvent } from '../structure/interfaces';
|
|
2
|
+
import type { FilterType } from '../types';
|
|
2
3
|
export interface SetFilter extends AdofaiEvent {
|
|
3
4
|
eventType: 'SetFilter';
|
|
4
|
-
filterType?:
|
|
5
|
+
filterType?: FilterType;
|
|
5
6
|
intensity?: number;
|
|
6
7
|
duration?: number;
|
|
7
8
|
easing?: string;
|