/
Light2D.hx
271 lines (205 loc) · 6.41 KB
/
Light2D.hx
1
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related).
Note: Light2D can also be used as a mask.
**/
@:libType
@:csNative
@:native("Godot.Light2D")
@:autoBuild(godot.Godot.buildUserClass())
extern class Light2D extends godot.Node2D {
/**
The shadow mask. Used with `godot.LightOccluder2D` to cast shadows. Only occluders with a matching light mask will cast shadows.
**/
@:native("ShadowItemCullMask")
public var shadowItemCullMask:Int;
/**
Smoothing value for shadows.
**/
@:native("ShadowFilterSmooth")
public var shadowFilterSmooth:Single;
/**
Shadow filter type. See `godot.Light2D_ShadowFilterEnum` for possible values.
**/
@:native("ShadowFilter")
public var shadowFilter:godot.Light2D_ShadowFilterEnum;
/**
Smooth shadow gradient length.
**/
@:native("ShadowGradientLength")
public var shadowGradientLength:Single;
/**
Shadow buffer size.
**/
@:native("ShadowBufferSize")
public var shadowBufferSize:Int;
/**
`godot.Color` of shadows cast by the Light2D.
**/
@:native("ShadowColor")
public var shadowColor:godot.Color;
/**
If `true`, the Light2D will cast shadows.
**/
@:native("ShadowEnabled")
public var shadowEnabled:Bool;
/**
The layer mask. Only objects with a matching mask will be affected by the Light2D.
**/
@:native("RangeItemCullMask")
public var rangeItemCullMask:Int;
/**
Maximum layer value of objects that are affected by the Light2D.
**/
@:native("RangeLayerMax")
public var rangeLayerMax:Int;
/**
Minimum layer value of objects that are affected by the Light2D.
**/
@:native("RangeLayerMin")
public var rangeLayerMin:Int;
/**
Maximum `z` value of objects that are affected by the Light2D.
**/
@:native("RangeZMax")
public var rangeZMax:Int;
/**
Minimum `z` value of objects that are affected by the Light2D.
**/
@:native("RangeZMin")
public var rangeZMin:Int;
/**
The height of the Light2D. Used with 2D normal mapping.
**/
@:native("RangeHeight")
public var rangeHeight:Single;
/**
The Light2D's mode. See `godot.Light2D_ModeEnum` constants for values.
**/
@:native("Mode")
public var mode:godot.Light2D_ModeEnum;
/**
The Light2D's energy value. The larger the value, the stronger the light.
**/
@:native("Energy")
public var energy:Single;
/**
The Light2D's `godot.Color`.
**/
@:native("Color")
public var color:godot.Color;
/**
The `texture`'s scale factor.
**/
@:native("TextureScale")
public var textureScale:Single;
/**
The offset of the Light2D's `texture`.
**/
@:native("Offset")
public var offset:godot.Vector2;
/**
`godot.Texture` used for the Light2D's appearance.
**/
@:native("Texture")
public var texture:godot.Texture;
/**
If `true`, Light2D will only appear when editing the scene.
**/
@:native("EditorOnly")
public var editorOnly:Bool;
/**
If `true`, Light2D will emit light.
**/
@:native("Enabled")
public var enabled:Bool;
@:native("new")
public function new():Void;
@:native("SetEnabled")
public function setEnabled(enabled:Bool):Void;
@:native("IsEnabled")
public function isEnabled():Bool;
@:native("SetEditorOnly")
public function setEditorOnly(editorOnly:Bool):Void;
@:native("IsEditorOnly")
public function isEditorOnly():Bool;
@:native("SetTexture")
public function setTexture(texture:godot.Texture):Void;
@:native("GetTexture")
public function getTexture():godot.Texture;
@:native("SetTextureOffset")
public function setTextureOffset(textureOffset:godot.Vector2):Void;
@:native("GetTextureOffset")
public function getTextureOffset():godot.Vector2;
@:native("SetColor")
public function setColor(color:godot.Color):Void;
@:native("GetColor")
public function getColor():godot.Color;
@:native("SetHeight")
public function setHeight(height:Single):Void;
@:native("GetHeight")
public function getHeight():Single;
@:native("SetEnergy")
public function setEnergy(energy:Single):Void;
@:native("GetEnergy")
public function getEnergy():Single;
@:native("SetTextureScale")
public function setTextureScale(textureScale:Single):Void;
@:native("GetTextureScale")
public function getTextureScale():Single;
@:native("SetZRangeMin")
public function setZRangeMin(z:Int):Void;
@:native("GetZRangeMin")
public function getZRangeMin():Int;
@:native("SetZRangeMax")
public function setZRangeMax(z:Int):Void;
@:native("GetZRangeMax")
public function getZRangeMax():Int;
@:native("SetLayerRangeMin")
public function setLayerRangeMin(layer:Int):Void;
@:native("GetLayerRangeMin")
public function getLayerRangeMin():Int;
@:native("SetLayerRangeMax")
public function setLayerRangeMax(layer:Int):Void;
@:native("GetLayerRangeMax")
public function getLayerRangeMax():Int;
@:native("SetItemCullMask")
public function setItemCullMask(itemCullMask:Int):Void;
@:native("GetItemCullMask")
public function getItemCullMask():Int;
@:native("SetItemShadowCullMask")
public function setItemShadowCullMask(itemShadowCullMask:Int):Void;
@:native("GetItemShadowCullMask")
public function getItemShadowCullMask():Int;
@:native("SetMode")
public function setMode(mode:godot.Light2D_ModeEnum):Void;
@:native("GetMode")
public function getMode():godot.Light2D_ModeEnum;
@:native("SetShadowEnabled")
public function setShadowEnabled(enabled:Bool):Void;
@:native("IsShadowEnabled")
public function isShadowEnabled():Bool;
@:native("SetShadowBufferSize")
public function setShadowBufferSize(size:Int):Void;
@:native("GetShadowBufferSize")
public function getShadowBufferSize():Int;
@:native("SetShadowSmooth")
public function setShadowSmooth(smooth:Single):Void;
@:native("GetShadowSmooth")
public function getShadowSmooth():Single;
@:native("SetShadowGradientLength")
public function setShadowGradientLength(multiplier:Single):Void;
@:native("GetShadowGradientLength")
public function getShadowGradientLength():Single;
@:native("SetShadowFilter")
public function setShadowFilter(filter:godot.Light2D_ShadowFilterEnum):Void;
@:native("GetShadowFilter")
public function getShadowFilter():godot.Light2D_ShadowFilterEnum;
@:native("SetShadowColor")
public function setShadowColor(shadowColor:godot.Color):Void;
@:native("GetShadowColor")
public function getShadowColor():godot.Color;
}