/
ParticlesMaterial.hx
555 lines (439 loc) · 16.4 KB
/
ParticlesMaterial.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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
ParticlesMaterial defines particle properties and behavior. It is used in the `process_material` of `godot.Particles` and `godot.Particles2D` emitter nodes.
Some of this material's properties are applied to each particle when emitted, while others can have a `godot.CurveTexture` applied to vary values over the lifetime of the particle.
When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between `1.0` and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of `0.4` would scale the original property between `0.4-1.0` of its original value.
**/
@:libType
@:csNative
@:native("Godot.ParticlesMaterial")
@:autoBuild(godot.Godot.buildUserClass())
extern class ParticlesMaterial extends godot.Material {
/**
Each particle's animation offset will vary along this `godot.CurveTexture`.
**/
@:native("AnimOffsetCurve")
public var animOffsetCurve:godot.Texture;
/**
Animation offset randomness ratio.
**/
@:native("AnimOffsetRandom")
public var animOffsetRandom:Single;
/**
Particle animation offset.
**/
@:native("AnimOffset")
public var animOffset:Single;
/**
Each particle's animation speed will vary along this `godot.CurveTexture`.
**/
@:native("AnimSpeedCurve")
public var animSpeedCurve:godot.Texture;
/**
Animation speed randomness ratio.
**/
@:native("AnimSpeedRandom")
public var animSpeedRandom:Single;
/**
Particle animation speed.
**/
@:native("AnimSpeed")
public var animSpeed:Single;
/**
Each particle's hue will vary along this `godot.CurveTexture`.
**/
@:native("HueVariationCurve")
public var hueVariationCurve:godot.Texture;
/**
Hue variation randomness ratio.
**/
@:native("HueVariationRandom")
public var hueVariationRandom:Single;
/**
Initial hue variation applied to each particle.
**/
@:native("HueVariation")
public var hueVariation:Single;
/**
Each particle's color will vary along this `godot.GradientTexture` over its lifetime (multiplied with `godot.ParticlesMaterial.color`).
**/
@:native("ColorRamp")
public var colorRamp:godot.Texture;
/**
Each particle's initial color. If the `godot.Particles2D`'s `texture` is defined, it will be multiplied by this color. To have particle display color in a `godot.SpatialMaterial` make sure to set `godot.SpatialMaterial.vertexColorUseAsAlbedo` to `true`.
**/
@:native("Color")
public var color:godot.Color;
/**
Each particle's scale will vary along this `godot.CurveTexture`.
**/
@:native("ScaleCurve")
public var scaleCurve:godot.Texture;
/**
Scale randomness ratio.
**/
@:native("ScaleRandom")
public var scaleRandom:Single;
/**
Initial scale applied to each particle.
**/
@:native("Scale")
public var scale:Single;
/**
Each particle's rotation will be animated along this `godot.CurveTexture`.
**/
@:native("AngleCurve")
public var angleCurve:godot.Texture;
/**
Rotation randomness ratio.
**/
@:native("AngleRandom")
public var angleRandom:Single;
/**
Initial rotation applied to each particle, in degrees.
Note: Only applied when `godot.ParticlesMaterial.flagDisableZ` or `godot.ParticlesMaterial.flagRotateY` are `true` or the `godot.SpatialMaterial` being used to draw the particle is using `godot.SpatialMaterial_BillboardMode.particles`.
**/
@:native("Angle")
public var angle:Single;
/**
Damping will vary along this `godot.CurveTexture`.
**/
@:native("DampingCurve")
public var dampingCurve:godot.Texture;
/**
Damping randomness ratio.
**/
@:native("DampingRandom")
public var dampingRandom:Single;
/**
The rate at which particles lose velocity.
**/
@:native("Damping")
public var damping:Single;
/**
Each particle's tangential acceleration will vary along this `godot.CurveTexture`.
**/
@:native("TangentialAccelCurve")
public var tangentialAccelCurve:godot.Texture;
/**
Tangential acceleration randomness ratio.
**/
@:native("TangentialAccelRandom")
public var tangentialAccelRandom:Single;
/**
Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
**/
@:native("TangentialAccel")
public var tangentialAccel:Single;
/**
Each particle's radial acceleration will vary along this `godot.CurveTexture`.
**/
@:native("RadialAccelCurve")
public var radialAccelCurve:godot.Texture;
/**
Radial acceleration randomness ratio.
**/
@:native("RadialAccelRandom")
public var radialAccelRandom:Single;
/**
Radial acceleration applied to each particle. Makes particle accelerate away from origin.
**/
@:native("RadialAccel")
public var radialAccel:Single;
/**
Each particle's linear acceleration will vary along this `godot.CurveTexture`.
**/
@:native("LinearAccelCurve")
public var linearAccelCurve:godot.Texture;
/**
Linear acceleration randomness ratio.
**/
@:native("LinearAccelRandom")
public var linearAccelRandom:Single;
/**
Linear acceleration applied to each particle in the direction of motion.
**/
@:native("LinearAccel")
public var linearAccel:Single;
/**
Each particle's orbital velocity will vary along this `godot.CurveTexture`.
**/
@:native("OrbitVelocityCurve")
public var orbitVelocityCurve:godot.Texture;
/**
Orbital velocity randomness ratio.
**/
@:native("OrbitVelocityRandom")
public var orbitVelocityRandom:Single;
/**
Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
Note: Only available when `godot.ParticlesMaterial.flagDisableZ` is `true`.
**/
@:native("OrbitVelocity")
public var orbitVelocity:Single;
/**
Each particle's angular velocity will vary along this `godot.CurveTexture`.
**/
@:native("AngularVelocityCurve")
public var angularVelocityCurve:godot.Texture;
/**
Angular velocity randomness ratio.
**/
@:native("AngularVelocityRandom")
public var angularVelocityRandom:Single;
/**
Initial angular velocity applied to each particle in degrees per second. Sets the speed of rotation of the particle.
Note: Only applied when `godot.ParticlesMaterial.flagDisableZ` or `godot.ParticlesMaterial.flagRotateY` are `true` or the `godot.SpatialMaterial` being used to draw the particle is using `godot.SpatialMaterial_BillboardMode.particles`.
**/
@:native("AngularVelocity")
public var angularVelocity:Single;
/**
Initial velocity randomness ratio.
**/
@:native("InitialVelocityRandom")
public var initialVelocityRandom:Single;
/**
Initial velocity magnitude for each particle. Direction comes from `godot.ParticlesMaterial.spread` and the node's orientation.
**/
@:native("InitialVelocity")
public var initialVelocity:Single;
/**
Gravity applied to every particle.
**/
@:native("Gravity")
public var gravity:godot.Vector3;
/**
Amount of `godot.ParticlesMaterial.spread` along the Y axis.
**/
@:native("Flatness")
public var flatness:Single;
/**
Each particle's initial direction range from `+spread` to `-spread` degrees.
**/
@:native("Spread")
public var spread:Single;
/**
Unit vector specifying the particles' emission direction.
**/
@:native("Direction")
public var direction:godot.Vector3;
/**
If `true`, particles will not move on the z axis.
**/
@:native("FlagDisableZ")
public var flagDisableZ:Bool;
/**
If `true`, particles rotate around Y axis by `godot.ParticlesMaterial.angle`.
**/
@:native("FlagRotateY")
public var flagRotateY:Bool;
/**
Align Y axis of particle with the direction of its velocity.
**/
@:native("FlagAlignY")
public var flagAlignY:Bool;
/**
The axis of the ring when using the emitter `godot.ParticlesMaterial_EmissionShapeEnum.ring`.
**/
@:native("EmissionRingAxis")
public var emissionRingAxis:godot.Vector3;
/**
The height of the ring when using the emitter `godot.ParticlesMaterial_EmissionShapeEnum.ring`.
**/
@:native("EmissionRingHeight")
public var emissionRingHeight:Single;
/**
The inner radius of the ring when using the emitter `godot.ParticlesMaterial_EmissionShapeEnum.ring`.
**/
@:native("EmissionRingInnerRadius")
public var emissionRingInnerRadius:Single;
/**
The radius of the ring when using the emitter `godot.ParticlesMaterial_EmissionShapeEnum.ring`.
**/
@:native("EmissionRingRadius")
public var emissionRingRadius:Single;
/**
The number of emission points if `emission_shape` is set to `godot.ParticlesMaterial_EmissionShapeEnum.points` or `godot.ParticlesMaterial_EmissionShapeEnum.directedPoints`.
**/
@:native("EmissionPointCount")
public var emissionPointCount:Int;
/**
Particle color will be modulated by color determined by sampling this texture at the same point as the `godot.ParticlesMaterial.emissionPointTexture`.
**/
@:native("EmissionColorTexture")
public var emissionColorTexture:godot.Texture;
/**
Particle velocity and rotation will be set by sampling this texture at the same point as the `godot.ParticlesMaterial.emissionPointTexture`. Used only in `godot.ParticlesMaterial_EmissionShapeEnum.directedPoints`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
**/
@:native("EmissionNormalTexture")
public var emissionNormalTexture:godot.Texture;
/**
Particles will be emitted at positions determined by sampling this texture at a random position. Used with `godot.ParticlesMaterial_EmissionShapeEnum.points` and `godot.ParticlesMaterial_EmissionShapeEnum.directedPoints`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
**/
@:native("EmissionPointTexture")
public var emissionPointTexture:godot.Texture;
/**
The box's extents if `emission_shape` is set to `godot.ParticlesMaterial_EmissionShapeEnum.box`.
**/
@:native("EmissionBoxExtents")
public var emissionBoxExtents:godot.Vector3;
/**
The sphere's radius if `emission_shape` is set to `godot.ParticlesMaterial_EmissionShapeEnum.sphere`.
**/
@:native("EmissionSphereRadius")
public var emissionSphereRadius:Single;
/**
Particles will be emitted inside this region. Use `godot.ParticlesMaterial_EmissionShapeEnum` constants for values.
**/
@:native("EmissionShape")
public var emissionShape:godot.ParticlesMaterial_EmissionShapeEnum;
/**
Trail particles' color will vary along this `godot.GradientTexture`.
**/
@:native("TrailColorModifier")
public var trailColorModifier:godot.GradientTexture;
/**
Trail particles' size will vary along this `godot.CurveTexture`.
**/
@:native("TrailSizeModifier")
public var trailSizeModifier:godot.CurveTexture;
/**
Emitter will emit `amount` divided by `trail_divisor` particles. The remaining particles will be used as trail(s).
**/
@:native("TrailDivisor")
public var trailDivisor:Int;
/**
Particle lifetime randomness ratio.
**/
@:native("LifetimeRandomness")
public var lifetimeRandomness:Single;
@:native("new")
public function new():Void;
@:native("SetDirection")
public function setDirection(degrees:godot.Vector3):Void;
@:native("GetDirection")
public function getDirection():godot.Vector3;
@:native("SetSpread")
public function setSpread(degrees:Single):Void;
@:native("GetSpread")
public function getSpread():Single;
@:native("SetFlatness")
public function setFlatness(amount:Single):Void;
@:native("GetFlatness")
public function getFlatness():Single;
/**
Sets the specified `godot.ParticlesMaterial_Parameter`.
**/
@:native("SetParam")
public function setParam(param:godot.ParticlesMaterial_Parameter, value:Single):Void;
/**
Returns the value of the specified parameter.
**/
@:native("GetParam")
public function getParam(param:godot.ParticlesMaterial_Parameter):Single;
/**
Sets the randomness ratio for the specified `godot.ParticlesMaterial_Parameter`.
**/
@:native("SetParamRandomness")
public function setParamRandomness(param:godot.ParticlesMaterial_Parameter, randomness:Single):Void;
/**
Returns the randomness ratio associated with the specified parameter.
**/
@:native("GetParamRandomness")
public function getParamRandomness(param:godot.ParticlesMaterial_Parameter):Single;
/**
Sets the `godot.Texture` for the specified `godot.ParticlesMaterial_Parameter`.
**/
@:native("SetParamTexture")
public function setParamTexture(param:godot.ParticlesMaterial_Parameter, texture:godot.Texture):Void;
/**
Returns the `godot.Texture` used by the specified parameter.
**/
@:native("GetParamTexture")
public function getParamTexture(param:godot.ParticlesMaterial_Parameter):godot.Texture;
@:native("SetColor")
public function setColor(color:godot.Color):Void;
@:native("GetColor")
public function getColor():godot.Color;
@:native("SetColorRamp")
public function setColorRamp(ramp:godot.Texture):Void;
@:native("GetColorRamp")
public function getColorRamp():godot.Texture;
/**
If `true`, enables the specified flag. See `godot.ParticlesMaterial_Flags` for options.
**/
@:native("SetFlag")
public function setFlag(flag:godot.ParticlesMaterial_Flags, enable:Bool):Void;
/**
Returns `true` if the specified flag is enabled.
**/
@:native("GetFlag")
public function getFlag(flag:godot.ParticlesMaterial_Flags):Bool;
@:native("SetEmissionShape")
public function setEmissionShape(shape:godot.ParticlesMaterial_EmissionShapeEnum):Void;
@:native("GetEmissionShape")
public function getEmissionShape():godot.ParticlesMaterial_EmissionShapeEnum;
@:native("SetEmissionSphereRadius")
public function setEmissionSphereRadius(radius:Single):Void;
@:native("GetEmissionSphereRadius")
public function getEmissionSphereRadius():Single;
@:native("SetEmissionBoxExtents")
public function setEmissionBoxExtents(extents:godot.Vector3):Void;
@:native("GetEmissionBoxExtents")
public function getEmissionBoxExtents():godot.Vector3;
@:native("SetEmissionPointTexture")
public function setEmissionPointTexture(texture:godot.Texture):Void;
@:native("GetEmissionPointTexture")
public function getEmissionPointTexture():godot.Texture;
@:native("SetEmissionNormalTexture")
public function setEmissionNormalTexture(texture:godot.Texture):Void;
@:native("GetEmissionNormalTexture")
public function getEmissionNormalTexture():godot.Texture;
@:native("SetEmissionColorTexture")
public function setEmissionColorTexture(texture:godot.Texture):Void;
@:native("GetEmissionColorTexture")
public function getEmissionColorTexture():godot.Texture;
@:native("SetEmissionPointCount")
public function setEmissionPointCount(pointCount:Int):Void;
@:native("GetEmissionPointCount")
public function getEmissionPointCount():Int;
@:native("SetEmissionRingRadius")
public function setEmissionRingRadius(radius:Single):Void;
@:native("GetEmissionRingRadius")
public function getEmissionRingRadius():Single;
@:native("SetEmissionRingInnerRadius")
public function setEmissionRingInnerRadius(offset:Single):Void;
@:native("GetEmissionRingInnerRadius")
public function getEmissionRingInnerRadius():Single;
@:native("SetEmissionRingHeight")
public function setEmissionRingHeight(height:Single):Void;
@:native("GetEmissionRingHeight")
public function getEmissionRingHeight():Single;
@:native("SetEmissionRingAxis")
public function setEmissionRingAxis(axis:godot.Vector3):Void;
@:native("GetEmissionRingAxis")
public function getEmissionRingAxis():godot.Vector3;
@:native("SetTrailDivisor")
public function setTrailDivisor(divisor:Int):Void;
@:native("GetTrailDivisor")
public function getTrailDivisor():Int;
@:native("SetTrailSizeModifier")
public function setTrailSizeModifier(texture:godot.CurveTexture):Void;
@:native("GetTrailSizeModifier")
public function getTrailSizeModifier():godot.CurveTexture;
@:native("SetTrailColorModifier")
public function setTrailColorModifier(texture:godot.GradientTexture):Void;
@:native("GetTrailColorModifier")
public function getTrailColorModifier():godot.GradientTexture;
@:native("GetGravity")
public function getGravity():godot.Vector3;
@:native("SetGravity")
public function setGravity(accelVec:godot.Vector3):Void;
@:native("SetLifetimeRandomness")
public function setLifetimeRandomness(randomness:Single):Void;
@:native("GetLifetimeRandomness")
public function getLifetimeRandomness():Single;
}