xray16 1.3.4 → 1.5.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/LICENSE +21 -21
- package/README.md +112 -106
- package/package.json +45 -42
- package/plugins/built_at_info.d.ts +1 -1
- package/plugins/from_cast_utils.d.ts +1 -1
- package/plugins/global_declarations_transform.d.ts +1 -1
- package/plugins/inject_file_meta.d.ts +1 -1
- package/plugins/inject_tracy_zones.d.ts +1 -1
- package/plugins/inject_tracy_zones.js +2 -2
- package/plugins/strip_lua_logger.d.ts +1 -1
- package/plugins/strip_lua_logger.js +1 -1
- package/plugins/transform_luabind_class/plugin.d.ts +1 -1
- package/plugins/transform_luabind_class/transformation/class_declaration.d.ts +3 -3
- package/plugins/transform_luabind_class/transformation/decorators.d.ts +5 -2
- package/plugins/transform_luabind_class/transformation/decorators.js +3 -0
- package/plugins/transform_luabind_class/transformation/members/accessors.d.ts +1 -1
- package/plugins/transform_luabind_class/transformation/members/constructor.d.ts +2 -2
- package/plugins/transform_luabind_class/transformation/members/constructor.js +2 -2
- package/plugins/transform_luabind_class/transformation/members/fields.d.ts +5 -2
- package/plugins/transform_luabind_class/transformation/members/fields.js +5 -2
- package/plugins/transform_luabind_class/transformation/members/method.d.ts +6 -3
- package/plugins/transform_luabind_class/transformation/members/method.js +4 -1
- package/plugins/transform_luabind_class/transformation/new.d.ts +7 -3
- package/plugins/transform_luabind_class/transformation/new.js +5 -1
- package/plugins/transform_luabind_class/transformation/setup.d.ts +9 -3
- package/plugins/transform_luabind_class/transformation/setup.js +22 -6
- package/plugins/transform_luabind_class/transformation/super.d.ts +19 -3
- package/plugins/transform_luabind_class/transformation/super.js +17 -1
- package/plugins/transform_luabind_class/transformation/utils.d.ts +27 -4
- package/plugins/transform_luabind_class/transformation/utils.js +25 -2
- package/plugins/utils/ast.d.ts +1 -1
- package/plugins/utils/diagnostics.d.ts +9 -5
- package/plugins/utils/diagnostics.js +5 -1
- package/plugins/utils/tracy.d.ts +1 -1
- package/types/index.d.ts +55 -55
- package/types/xr_ai/xr_action.d.ts +1802 -510
- package/types/xr_ai/xr_alife.d.ts +1870 -566
- package/types/xr_ai/xr_enemy_evaluation.d.ts +134 -41
- package/types/xr_ai/xr_goap.d.ts +1116 -668
- package/types/xr_ai/xr_graph.d.ts +135 -47
- package/types/xr_ai/xr_memory.d.ts +382 -148
- package/types/xr_lib/xr_animation.d.ts +252 -81
- package/types/xr_lib/xr_bitwise.d.ts +44 -21
- package/types/xr_lib/xr_color.d.ts +142 -40
- package/types/xr_lib/xr_debug.d.ts +181 -77
- package/types/xr_lib/xr_dialog.d.ts +132 -40
- package/types/xr_lib/xr_flags.d.ts +592 -148
- package/types/xr_lib/xr_fs.d.ts +539 -148
- package/types/xr_lib/xr_game.d.ts +362 -158
- package/types/xr_lib/xr_hit.d.ts +125 -41
- package/types/xr_lib/xr_ini.d.ts +473 -188
- package/types/xr_lib/xr_level.d.ts +795 -225
- package/types/xr_lib/xr_luabind.d.ts +90 -59
- package/types/xr_lib/xr_map.d.ts +192 -61
- package/types/xr_lib/xr_math.d.ts +871 -233
- package/types/xr_lib/xr_multiplayer.d.ts +1079 -351
- package/types/xr_lib/xr_profile.d.ts +272 -160
- package/types/xr_lib/xr_properties.d.ts +610 -166
- package/types/xr_lib/xr_relation.d.ts +231 -84
- package/types/xr_lib/xr_render.d.ts +167 -69
- package/types/xr_lib/xr_save.d.ts +833 -223
- package/types/xr_lib/xr_sound.d.ts +515 -151
- package/types/xr_lib/xr_stats.ts +49 -20
- package/types/xr_lib/xr_task.d.ts +388 -111
- package/types/xr_lib/xr_time.d.ts +177 -61
- package/types/xr_lib/xr_type.d.ts +75 -75
- package/types/xr_object/client/xr_anomaly.d.ts +70 -50
- package/types/xr_object/client/xr_artefact.d.ts +153 -98
- package/types/xr_object/client/xr_client_object.d.ts +207 -76
- package/types/xr_object/client/xr_creature.d.ts +243 -164
- package/types/xr_object/client/xr_item.d.ts +370 -264
- package/types/xr_object/client/xr_level.d.ts +753 -285
- package/types/xr_object/client/xr_physic.d.ts +644 -214
- package/types/xr_object/client/xr_zone.d.ts +85 -47
- package/types/xr_object/script/xr_script_interface.d.ts +819 -584
- package/types/xr_object/script/xr_script_object.d.ts +5728 -1390
- package/types/xr_object/script/xr_script_trade.d.ts +51 -26
- package/types/xr_object/server/xr_server_object.d.ts +1486 -792
- package/types/xr_ui/xr_ui_asset.d.ts +364 -123
- package/types/xr_ui/xr_ui_core.d.ts +424 -97
- package/types/xr_ui/xr_ui_event.d.ts +1449 -381
- package/types/xr_ui/xr_ui_interface.d.ts +2447 -903
- package/types/xr_ui/xr_ui_menu.d.ts +385 -142
- package/types/xrf_plugin.d.ts +89 -51
|
@@ -1,81 +1,252 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
public
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* @source C++ class
|
|
50
|
-
* @customConstructor
|
|
51
|
-
* @group xr_animation
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
public
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* Post-process double-vision offsets.
|
|
4
|
+
*
|
|
5
|
+
* @source C++ class duality
|
|
6
|
+
* @customConstructor duality
|
|
7
|
+
* @group xr_animation
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* These values are accumulated when several post-process effectors are active.
|
|
11
|
+
*/
|
|
12
|
+
export class duality {
|
|
13
|
+
/**
|
|
14
|
+
* Vertical duality amount.
|
|
15
|
+
*/
|
|
16
|
+
public v: f32;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Horizontal duality amount.
|
|
20
|
+
*/
|
|
21
|
+
public h: f32;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Create zeroed duality settings.
|
|
25
|
+
*/
|
|
26
|
+
public constructor();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Create duality settings with both offsets.
|
|
30
|
+
*
|
|
31
|
+
* @param h - Horizontal duality amount.
|
|
32
|
+
* @param v - Vertical duality amount.
|
|
33
|
+
*/
|
|
34
|
+
public constructor(h: f32, v: f32);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Set both duality values.
|
|
38
|
+
*
|
|
39
|
+
* @param h - Horizontal duality amount.
|
|
40
|
+
* @param v - Vertical duality amount.
|
|
41
|
+
* @returns This object for chained setup.
|
|
42
|
+
*/
|
|
43
|
+
public set(h: f32, v: f32): duality;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Post-process noise settings.
|
|
48
|
+
*
|
|
49
|
+
* @source C++ class noise
|
|
50
|
+
* @customConstructor noise
|
|
51
|
+
* @group xr_animation
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Combined effectors keep the maximum intensity, grain, and FPS values.
|
|
55
|
+
*/
|
|
56
|
+
export class noise {
|
|
57
|
+
/**
|
|
58
|
+
* Noise frame rate.
|
|
59
|
+
*/
|
|
60
|
+
public fps: f32;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Noise grain size.
|
|
64
|
+
*/
|
|
65
|
+
public grain: f32;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Noise intensity.
|
|
69
|
+
*/
|
|
70
|
+
public intensity: f32;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Create default noise settings.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* Defaults are intensity 0, grain 1, and 10 FPS.
|
|
77
|
+
*/
|
|
78
|
+
public constructor();
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Create noise settings with all values.
|
|
82
|
+
*
|
|
83
|
+
* @param intensity - Noise intensity.
|
|
84
|
+
* @param grain - Noise grain size.
|
|
85
|
+
* @param fps - Noise frame rate.
|
|
86
|
+
*/
|
|
87
|
+
public constructor(intensity: f32, grain: f32, fps: f32);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Set all noise values.
|
|
91
|
+
*
|
|
92
|
+
* @param intensity - Noise intensity.
|
|
93
|
+
* @param grain - Noise grain size.
|
|
94
|
+
* @param fps - Noise frame rate.
|
|
95
|
+
* @returns This object for chained setup.
|
|
96
|
+
*/
|
|
97
|
+
public set(intensity: f32, grain: f32, fps: f32): noise;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Script-controlled post-process effector.
|
|
102
|
+
*
|
|
103
|
+
* @source C++ class effector
|
|
104
|
+
* @customConstructor effector
|
|
105
|
+
* @group xr_animation
|
|
106
|
+
*
|
|
107
|
+
* @remarks
|
|
108
|
+
* Subclass it from script and override {@link process}. The effector is tied to the actor camera stack.
|
|
109
|
+
*/
|
|
110
|
+
export class effector extends EngineBinding {
|
|
111
|
+
/**
|
|
112
|
+
* @remarks
|
|
113
|
+
* Use a stable custom type id. {@link finish} removes the active effector by this type.
|
|
114
|
+
*
|
|
115
|
+
* @param type - Unique post-process effector type id.
|
|
116
|
+
* @param time - Effector lifetime in seconds.
|
|
117
|
+
*/
|
|
118
|
+
public constructor(type: i32, time: f32);
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Add the effector to the actor camera stack.
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* Requires an active actor. This is intended for in-game actor post-processing, not menu/editor code.
|
|
125
|
+
*/
|
|
126
|
+
public start(): void;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Update post-process parameters for the current frame.
|
|
130
|
+
*
|
|
131
|
+
* @remarks
|
|
132
|
+
* Override this in script. Mutate `params` for the current frame and return `false` to stop the effector.
|
|
133
|
+
*
|
|
134
|
+
* @param params - Mutable post-process parameters.
|
|
135
|
+
* @returns Whether the effector should continue running.
|
|
136
|
+
*/
|
|
137
|
+
public process(params: effector_params): boolean;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Remove the effector from the actor camera stack.
|
|
141
|
+
*
|
|
142
|
+
* @remarks
|
|
143
|
+
* Removes by effector type, so sharing a type id with another active effector can remove the wrong effect.
|
|
144
|
+
*/
|
|
145
|
+
public finish(): void;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Mutable post-process state passed to effectors.
|
|
150
|
+
*
|
|
151
|
+
* @source C++ class effector_params
|
|
152
|
+
* @customConstructor effector_params
|
|
153
|
+
* @group xr_animation
|
|
154
|
+
*
|
|
155
|
+
* @remarks
|
|
156
|
+
* Defaults match the neutral post-process state: no blur, gray, duality, or noise intensity.
|
|
157
|
+
*/
|
|
158
|
+
export class effector_params extends EngineBinding {
|
|
159
|
+
/**
|
|
160
|
+
* Additive color applied over the frame.
|
|
161
|
+
*/
|
|
162
|
+
public color_add: color;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Base color tint.
|
|
166
|
+
*/
|
|
167
|
+
public color_base: color;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Grayscale color tint.
|
|
171
|
+
*/
|
|
172
|
+
public color_gray: color;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Double-vision settings.
|
|
176
|
+
*/
|
|
177
|
+
public dual: duality;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Blur amount.
|
|
181
|
+
*/
|
|
182
|
+
public blur: f32;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Grayscale amount.
|
|
186
|
+
*/
|
|
187
|
+
public gray: f32;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Noise settings.
|
|
191
|
+
*/
|
|
192
|
+
public noise: noise;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Create default post-process parameters.
|
|
196
|
+
*/
|
|
197
|
+
public constructor();
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Copy all post-process values from another params object.
|
|
201
|
+
*
|
|
202
|
+
* @remarks
|
|
203
|
+
* Copies the current values. Later changes to `params` are not linked back to this object.
|
|
204
|
+
*
|
|
205
|
+
* @param params - Source values.
|
|
206
|
+
*/
|
|
207
|
+
public assign(params: effector_params): void;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Evaluate a color animation by time.
|
|
212
|
+
*
|
|
213
|
+
* @source C++ class color_animator
|
|
214
|
+
* @customConstructor color_animator
|
|
215
|
+
* @group xr_animation
|
|
216
|
+
*
|
|
217
|
+
* @remarks
|
|
218
|
+
* Animations are looked up in the loaded light-animation library (`lanims.xr`).
|
|
219
|
+
*/
|
|
220
|
+
export class color_animator extends EngineBinding {
|
|
221
|
+
/**
|
|
222
|
+
* @param name - Color animation name.
|
|
223
|
+
*/
|
|
224
|
+
public constructor(name: string);
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @returns Animation length in milliseconds.
|
|
228
|
+
*/
|
|
229
|
+
public length(): u32;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Load another color animation.
|
|
233
|
+
*
|
|
234
|
+
* @remarks
|
|
235
|
+
* The native binding asserts when the animation name is missing or unknown.
|
|
236
|
+
*
|
|
237
|
+
* @param name - Color animation name.
|
|
238
|
+
*/
|
|
239
|
+
public load(name: string): void;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Sample the animation.
|
|
243
|
+
*
|
|
244
|
+
* @remarks
|
|
245
|
+
* Time wraps over the animation length.
|
|
246
|
+
*
|
|
247
|
+
* @param time - Animation time in seconds.
|
|
248
|
+
* @returns Color at the requested time.
|
|
249
|
+
*/
|
|
250
|
+
public calculate(time: f32): fcolor;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* @
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* Apply bitwise AND to two signed integers.
|
|
4
|
+
*
|
|
5
|
+
* @group xr_bitwise
|
|
6
|
+
*
|
|
7
|
+
* @param left - Left operand.
|
|
8
|
+
* @param right - Right operand.
|
|
9
|
+
* @returns Result of `left & right`.
|
|
10
|
+
*/
|
|
11
|
+
export function bit_and(this: void, left: i32, right: i32): i32;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Apply bitwise OR to two signed integers.
|
|
15
|
+
*
|
|
16
|
+
* @group xr_bitwise
|
|
17
|
+
*
|
|
18
|
+
* @param left - Left operand.
|
|
19
|
+
* @param right - Right operand.
|
|
20
|
+
* @returns Result of `left | right`.
|
|
21
|
+
*/
|
|
22
|
+
export function bit_or(this: void, left: i32, right: i32): i32;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Invert all bits in a signed integer.
|
|
26
|
+
*
|
|
27
|
+
* @group xr_bitwise
|
|
28
|
+
*
|
|
29
|
+
* @param value - Value to invert.
|
|
30
|
+
* @returns Result of `~value`.
|
|
31
|
+
*/
|
|
32
|
+
export function bit_not(this: void, value: i32): i32;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Apply bitwise XOR to two signed integers.
|
|
36
|
+
*
|
|
37
|
+
* @group xr_bitwise
|
|
38
|
+
*
|
|
39
|
+
* @param left - Left operand.
|
|
40
|
+
* @param right - Right operand.
|
|
41
|
+
* @returns Result of `left ^ right`.
|
|
42
|
+
*/
|
|
43
|
+
export function bit_xor(this: void, left: i32, right: i32): i32;
|
|
44
|
+
}
|
|
@@ -1,40 +1,142 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
public
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
public
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
declare module "xray16" {
|
|
2
|
+
/**
|
|
3
|
+
* Mutable RGBA color with float components.
|
|
4
|
+
*
|
|
5
|
+
* Components are exposed as `r`, `g`, `b`, and `a`.
|
|
6
|
+
*
|
|
7
|
+
* @source C++ class fcolor
|
|
8
|
+
* @customConstructor fcolor
|
|
9
|
+
* @group xr_color
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Float components are normally used in the `0..1` range. `set()` mutates this color and returns it.
|
|
13
|
+
*/
|
|
14
|
+
export class fcolor extends EngineBinding {
|
|
15
|
+
/**
|
|
16
|
+
* Alpha component.
|
|
17
|
+
*/
|
|
18
|
+
public a: f32;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Blue component.
|
|
22
|
+
*/
|
|
23
|
+
public b: f32;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Green component.
|
|
27
|
+
*/
|
|
28
|
+
public g: f32;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Red component.
|
|
32
|
+
*/
|
|
33
|
+
public r: f32;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Create an empty color.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Call `set()` before reading components when you need a known value.
|
|
40
|
+
*/
|
|
41
|
+
public constructor();
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Set RGBA components.
|
|
45
|
+
*
|
|
46
|
+
* @param r - Red component.
|
|
47
|
+
* @param g - Green component.
|
|
48
|
+
* @param b - Blue component.
|
|
49
|
+
* @param a - Alpha component.
|
|
50
|
+
* @returns This color.
|
|
51
|
+
*/
|
|
52
|
+
public set(r: f32, g: f32, b: f32, a: f32): fcolor;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Copy another float color.
|
|
56
|
+
*
|
|
57
|
+
* @param color - Source color.
|
|
58
|
+
* @returns This color.
|
|
59
|
+
*/
|
|
60
|
+
public set(color: fcolor): fcolor;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Decode packed ARGB color into float components.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* Channels are decoded from 8-bit ARGB into normalized float components.
|
|
67
|
+
*
|
|
68
|
+
* @param value - Packed ARGB value.
|
|
69
|
+
* @returns This color.
|
|
70
|
+
*/
|
|
71
|
+
public set(value: u32): fcolor;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Mutable RGB color with float components.
|
|
76
|
+
*
|
|
77
|
+
* @source C++ class color
|
|
78
|
+
* @customConstructor color
|
|
79
|
+
* @group xr_color
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* This is the postprocess RGB color helper used by effector parameters. It has no alpha channel.
|
|
83
|
+
*/
|
|
84
|
+
export class color {
|
|
85
|
+
/**
|
|
86
|
+
* Blue component.
|
|
87
|
+
*/
|
|
88
|
+
public b: f32;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Green component.
|
|
92
|
+
*/
|
|
93
|
+
public g: f32;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Red component.
|
|
97
|
+
*/
|
|
98
|
+
public r: f32;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Create a black color.
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* Use the RGB constructor or `set()` when you need explicit component values.
|
|
105
|
+
*/
|
|
106
|
+
public constructor();
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Create color from RGB components.
|
|
110
|
+
*
|
|
111
|
+
* @param r - Red component.
|
|
112
|
+
* @param g - Green component.
|
|
113
|
+
* @param b - Blue component.
|
|
114
|
+
*/
|
|
115
|
+
public constructor(r: f32, g: f32, b: f32);
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Set RGB components.
|
|
119
|
+
*
|
|
120
|
+
* @param r - Red component.
|
|
121
|
+
* @param g - Green component.
|
|
122
|
+
* @param b - Blue component.
|
|
123
|
+
*/
|
|
124
|
+
public set(r: f32, g: f32, b: f32): void;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Pack alpha, red, green, and blue channels into an engine color value.
|
|
129
|
+
*
|
|
130
|
+
* @group xr_color
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* Channels are packed as 8-bit ARGB. Values outside `0..255` keep only their low 8 bits.
|
|
134
|
+
*
|
|
135
|
+
* @param a - Alpha channel.
|
|
136
|
+
* @param r - Red channel.
|
|
137
|
+
* @param g - Green channel.
|
|
138
|
+
* @param b - Blue channel.
|
|
139
|
+
* @returns Packed ARGB color.
|
|
140
|
+
*/
|
|
141
|
+
export function GetARGB(this: void, a: u16, r: u16, g: u16, b: u16): i32;
|
|
142
|
+
}
|