1 /** 2 Particle properties for $(D Particles) and $(D Particles2D) nodes. 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.particlesmaterial; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.meta; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.object; 22 import godot.classdb; 23 import godot.material; 24 import godot.texture; 25 import godot.curvetexture; 26 import godot.gradienttexture; 27 import godot.resource; 28 import godot.reference; 29 /** 30 Particle properties for $(D Particles) and $(D Particles2D) nodes. 31 32 ParticlesMaterial defines particle properties and behavior. It is used in the `process_material` of $(D Particles) and $(D Particles2D) emitter nodes. 33 Some of this material's properties are applied to each particle when emitted, while others can have a $(D CurveTexture) applied to vary values over the lifetime of the particle. 34 */ 35 @GodotBaseClass struct ParticlesMaterial 36 { 37 enum string _GODOT_internal_name = "ParticlesMaterial"; 38 public: 39 @nogc nothrow: 40 union { godot_object _godot_object; Material _GODOT_base; } 41 alias _GODOT_base this; 42 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 43 package(godot) __gshared bool _classBindingInitialized = false; 44 package(godot) static struct _classBinding 45 { 46 __gshared: 47 @GodotName("set_spread") GodotMethod!(void, double) setSpread; 48 @GodotName("get_spread") GodotMethod!(double) getSpread; 49 @GodotName("set_flatness") GodotMethod!(void, double) setFlatness; 50 @GodotName("get_flatness") GodotMethod!(double) getFlatness; 51 @GodotName("set_param") GodotMethod!(void, long, double) setParam; 52 @GodotName("get_param") GodotMethod!(double, long) getParam; 53 @GodotName("set_param_randomness") GodotMethod!(void, long, double) setParamRandomness; 54 @GodotName("get_param_randomness") GodotMethod!(double, long) getParamRandomness; 55 @GodotName("set_param_texture") GodotMethod!(void, long, Texture) setParamTexture; 56 @GodotName("get_param_texture") GodotMethod!(Texture, long) getParamTexture; 57 @GodotName("set_color") GodotMethod!(void, Color) setColor; 58 @GodotName("get_color") GodotMethod!(Color) getColor; 59 @GodotName("set_color_ramp") GodotMethod!(void, Texture) setColorRamp; 60 @GodotName("get_color_ramp") GodotMethod!(Texture) getColorRamp; 61 @GodotName("set_flag") GodotMethod!(void, long, bool) setFlag; 62 @GodotName("get_flag") GodotMethod!(bool, long) getFlag; 63 @GodotName("set_emission_shape") GodotMethod!(void, long) setEmissionShape; 64 @GodotName("get_emission_shape") GodotMethod!(ParticlesMaterial.EmissionShape) getEmissionShape; 65 @GodotName("set_emission_sphere_radius") GodotMethod!(void, double) setEmissionSphereRadius; 66 @GodotName("get_emission_sphere_radius") GodotMethod!(double) getEmissionSphereRadius; 67 @GodotName("set_emission_box_extents") GodotMethod!(void, Vector3) setEmissionBoxExtents; 68 @GodotName("get_emission_box_extents") GodotMethod!(Vector3) getEmissionBoxExtents; 69 @GodotName("set_emission_point_texture") GodotMethod!(void, Texture) setEmissionPointTexture; 70 @GodotName("get_emission_point_texture") GodotMethod!(Texture) getEmissionPointTexture; 71 @GodotName("set_emission_normal_texture") GodotMethod!(void, Texture) setEmissionNormalTexture; 72 @GodotName("get_emission_normal_texture") GodotMethod!(Texture) getEmissionNormalTexture; 73 @GodotName("set_emission_color_texture") GodotMethod!(void, Texture) setEmissionColorTexture; 74 @GodotName("get_emission_color_texture") GodotMethod!(Texture) getEmissionColorTexture; 75 @GodotName("set_emission_point_count") GodotMethod!(void, long) setEmissionPointCount; 76 @GodotName("get_emission_point_count") GodotMethod!(long) getEmissionPointCount; 77 @GodotName("set_trail_divisor") GodotMethod!(void, long) setTrailDivisor; 78 @GodotName("get_trail_divisor") GodotMethod!(long) getTrailDivisor; 79 @GodotName("set_trail_size_modifier") GodotMethod!(void, CurveTexture) setTrailSizeModifier; 80 @GodotName("get_trail_size_modifier") GodotMethod!(CurveTexture) getTrailSizeModifier; 81 @GodotName("set_trail_color_modifier") GodotMethod!(void, GradientTexture) setTrailColorModifier; 82 @GodotName("get_trail_color_modifier") GodotMethod!(GradientTexture) getTrailColorModifier; 83 @GodotName("get_gravity") GodotMethod!(Vector3) getGravity; 84 @GodotName("set_gravity") GodotMethod!(void, Vector3) setGravity; 85 } 86 bool opEquals(in ParticlesMaterial other) const { return _godot_object.ptr is other._godot_object.ptr; } 87 ParticlesMaterial opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 88 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 89 mixin baseCasts; 90 static ParticlesMaterial _new() 91 { 92 static godot_class_constructor constructor; 93 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("ParticlesMaterial"); 94 if(constructor is null) return typeof(this).init; 95 return cast(ParticlesMaterial)(constructor()); 96 } 97 @disable new(size_t s); 98 /// 99 enum Flags : int 100 { 101 /** 102 Use with $(D setFlag) to set $(D flagAlignY). 103 */ 104 flagAlignYToVelocity = 0, 105 /** 106 Use with $(D setFlag) to set $(D flagRotateY) 107 */ 108 flagRotateY = 1, 109 /** 110 111 */ 112 flagMax = 4, 113 } 114 /// 115 enum EmissionShape : int 116 { 117 /** 118 All particles will be emitted from a single point. 119 */ 120 emissionShapePoint = 0, 121 /** 122 Particles will be emitted in the volume of a sphere. 123 */ 124 emissionShapeSphere = 1, 125 /** 126 Particles will be emitted in the volume of a box. 127 */ 128 emissionShapeBox = 2, 129 /** 130 131 */ 132 emissionShapePoints = 3, 133 /** 134 135 */ 136 emissionShapeDirectedPoints = 4, 137 } 138 /// 139 enum Parameter : int 140 { 141 /** 142 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set initial velocity properties. 143 */ 144 paramInitialLinearVelocity = 0, 145 /** 146 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set angular velocity properties. 147 */ 148 paramAngularVelocity = 1, 149 /** 150 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set orbital_velocity properties. 151 */ 152 paramOrbitVelocity = 2, 153 /** 154 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set linear acceleration properties. 155 */ 156 paramLinearAccel = 3, 157 /** 158 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set radial acceleration properties. 159 */ 160 paramRadialAccel = 4, 161 /** 162 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set tangential acceleration properties. 163 */ 164 paramTangentialAccel = 5, 165 /** 166 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set damping properties. 167 */ 168 paramDamping = 6, 169 /** 170 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set angle properties. 171 */ 172 paramAngle = 7, 173 /** 174 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set scale properties. 175 */ 176 paramScale = 8, 177 /** 178 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set hue_variation properties. 179 */ 180 paramHueVariation = 9, 181 /** 182 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set animation speed properties. 183 */ 184 paramAnimSpeed = 10, 185 /** 186 Use with $(D setParam), $(D setParamRandomness), and $(D setParamTexture) to set animation offset properties. 187 */ 188 paramAnimOffset = 11, 189 /** 190 191 */ 192 paramMax = 12, 193 } 194 /// 195 enum Constants : int 196 { 197 flagAlignYToVelocity = 0, 198 paramInitialLinearVelocity = 0, 199 emissionShapePoint = 0, 200 paramAngularVelocity = 1, 201 flagRotateY = 1, 202 emissionShapeSphere = 1, 203 paramOrbitVelocity = 2, 204 emissionShapeBox = 2, 205 emissionShapePoints = 3, 206 paramLinearAccel = 3, 207 flagMax = 4, 208 emissionShapeDirectedPoints = 4, 209 paramRadialAccel = 4, 210 paramTangentialAccel = 5, 211 paramDamping = 6, 212 paramAngle = 7, 213 paramScale = 8, 214 paramHueVariation = 9, 215 paramAnimSpeed = 10, 216 paramAnimOffset = 11, 217 paramMax = 12, 218 } 219 /** 220 221 */ 222 void setSpread(in double degrees) 223 { 224 checkClassBinding!(typeof(this))(); 225 ptrcall!(void)(_classBinding.setSpread, _godot_object, degrees); 226 } 227 /** 228 229 */ 230 double getSpread() const 231 { 232 checkClassBinding!(typeof(this))(); 233 return ptrcall!(double)(_classBinding.getSpread, _godot_object); 234 } 235 /** 236 237 */ 238 void setFlatness(in double amount) 239 { 240 checkClassBinding!(typeof(this))(); 241 ptrcall!(void)(_classBinding.setFlatness, _godot_object, amount); 242 } 243 /** 244 245 */ 246 double getFlatness() const 247 { 248 checkClassBinding!(typeof(this))(); 249 return ptrcall!(double)(_classBinding.getFlatness, _godot_object); 250 } 251 /** 252 253 */ 254 void setParam(in long param, in double value) 255 { 256 checkClassBinding!(typeof(this))(); 257 ptrcall!(void)(_classBinding.setParam, _godot_object, param, value); 258 } 259 /** 260 261 */ 262 double getParam(in long param) const 263 { 264 checkClassBinding!(typeof(this))(); 265 return ptrcall!(double)(_classBinding.getParam, _godot_object, param); 266 } 267 /** 268 269 */ 270 void setParamRandomness(in long param, in double randomness) 271 { 272 checkClassBinding!(typeof(this))(); 273 ptrcall!(void)(_classBinding.setParamRandomness, _godot_object, param, randomness); 274 } 275 /** 276 277 */ 278 double getParamRandomness(in long param) const 279 { 280 checkClassBinding!(typeof(this))(); 281 return ptrcall!(double)(_classBinding.getParamRandomness, _godot_object, param); 282 } 283 /** 284 285 */ 286 void setParamTexture(in long param, Texture texture) 287 { 288 checkClassBinding!(typeof(this))(); 289 ptrcall!(void)(_classBinding.setParamTexture, _godot_object, param, texture); 290 } 291 /** 292 293 */ 294 Ref!Texture getParamTexture(in long param) const 295 { 296 checkClassBinding!(typeof(this))(); 297 return ptrcall!(Texture)(_classBinding.getParamTexture, _godot_object, param); 298 } 299 /** 300 301 */ 302 void setColor(in Color color) 303 { 304 checkClassBinding!(typeof(this))(); 305 ptrcall!(void)(_classBinding.setColor, _godot_object, color); 306 } 307 /** 308 309 */ 310 Color getColor() const 311 { 312 checkClassBinding!(typeof(this))(); 313 return ptrcall!(Color)(_classBinding.getColor, _godot_object); 314 } 315 /** 316 317 */ 318 void setColorRamp(Texture ramp) 319 { 320 checkClassBinding!(typeof(this))(); 321 ptrcall!(void)(_classBinding.setColorRamp, _godot_object, ramp); 322 } 323 /** 324 325 */ 326 Ref!Texture getColorRamp() const 327 { 328 checkClassBinding!(typeof(this))(); 329 return ptrcall!(Texture)(_classBinding.getColorRamp, _godot_object); 330 } 331 /** 332 333 */ 334 void setFlag(in long flag, in bool enable) 335 { 336 checkClassBinding!(typeof(this))(); 337 ptrcall!(void)(_classBinding.setFlag, _godot_object, flag, enable); 338 } 339 /** 340 341 */ 342 bool getFlag(in long flag) const 343 { 344 checkClassBinding!(typeof(this))(); 345 return ptrcall!(bool)(_classBinding.getFlag, _godot_object, flag); 346 } 347 /** 348 349 */ 350 void setEmissionShape(in long shape) 351 { 352 checkClassBinding!(typeof(this))(); 353 ptrcall!(void)(_classBinding.setEmissionShape, _godot_object, shape); 354 } 355 /** 356 357 */ 358 ParticlesMaterial.EmissionShape getEmissionShape() const 359 { 360 checkClassBinding!(typeof(this))(); 361 return ptrcall!(ParticlesMaterial.EmissionShape)(_classBinding.getEmissionShape, _godot_object); 362 } 363 /** 364 365 */ 366 void setEmissionSphereRadius(in double radius) 367 { 368 checkClassBinding!(typeof(this))(); 369 ptrcall!(void)(_classBinding.setEmissionSphereRadius, _godot_object, radius); 370 } 371 /** 372 373 */ 374 double getEmissionSphereRadius() const 375 { 376 checkClassBinding!(typeof(this))(); 377 return ptrcall!(double)(_classBinding.getEmissionSphereRadius, _godot_object); 378 } 379 /** 380 381 */ 382 void setEmissionBoxExtents(in Vector3 extents) 383 { 384 checkClassBinding!(typeof(this))(); 385 ptrcall!(void)(_classBinding.setEmissionBoxExtents, _godot_object, extents); 386 } 387 /** 388 389 */ 390 Vector3 getEmissionBoxExtents() const 391 { 392 checkClassBinding!(typeof(this))(); 393 return ptrcall!(Vector3)(_classBinding.getEmissionBoxExtents, _godot_object); 394 } 395 /** 396 397 */ 398 void setEmissionPointTexture(Texture texture) 399 { 400 checkClassBinding!(typeof(this))(); 401 ptrcall!(void)(_classBinding.setEmissionPointTexture, _godot_object, texture); 402 } 403 /** 404 405 */ 406 Ref!Texture getEmissionPointTexture() const 407 { 408 checkClassBinding!(typeof(this))(); 409 return ptrcall!(Texture)(_classBinding.getEmissionPointTexture, _godot_object); 410 } 411 /** 412 413 */ 414 void setEmissionNormalTexture(Texture texture) 415 { 416 checkClassBinding!(typeof(this))(); 417 ptrcall!(void)(_classBinding.setEmissionNormalTexture, _godot_object, texture); 418 } 419 /** 420 421 */ 422 Ref!Texture getEmissionNormalTexture() const 423 { 424 checkClassBinding!(typeof(this))(); 425 return ptrcall!(Texture)(_classBinding.getEmissionNormalTexture, _godot_object); 426 } 427 /** 428 429 */ 430 void setEmissionColorTexture(Texture texture) 431 { 432 checkClassBinding!(typeof(this))(); 433 ptrcall!(void)(_classBinding.setEmissionColorTexture, _godot_object, texture); 434 } 435 /** 436 437 */ 438 Ref!Texture getEmissionColorTexture() const 439 { 440 checkClassBinding!(typeof(this))(); 441 return ptrcall!(Texture)(_classBinding.getEmissionColorTexture, _godot_object); 442 } 443 /** 444 445 */ 446 void setEmissionPointCount(in long point_count) 447 { 448 checkClassBinding!(typeof(this))(); 449 ptrcall!(void)(_classBinding.setEmissionPointCount, _godot_object, point_count); 450 } 451 /** 452 453 */ 454 long getEmissionPointCount() const 455 { 456 checkClassBinding!(typeof(this))(); 457 return ptrcall!(long)(_classBinding.getEmissionPointCount, _godot_object); 458 } 459 /** 460 461 */ 462 void setTrailDivisor(in long divisor) 463 { 464 checkClassBinding!(typeof(this))(); 465 ptrcall!(void)(_classBinding.setTrailDivisor, _godot_object, divisor); 466 } 467 /** 468 469 */ 470 long getTrailDivisor() const 471 { 472 checkClassBinding!(typeof(this))(); 473 return ptrcall!(long)(_classBinding.getTrailDivisor, _godot_object); 474 } 475 /** 476 477 */ 478 void setTrailSizeModifier(CurveTexture texture) 479 { 480 checkClassBinding!(typeof(this))(); 481 ptrcall!(void)(_classBinding.setTrailSizeModifier, _godot_object, texture); 482 } 483 /** 484 485 */ 486 Ref!CurveTexture getTrailSizeModifier() const 487 { 488 checkClassBinding!(typeof(this))(); 489 return ptrcall!(CurveTexture)(_classBinding.getTrailSizeModifier, _godot_object); 490 } 491 /** 492 493 */ 494 void setTrailColorModifier(GradientTexture texture) 495 { 496 checkClassBinding!(typeof(this))(); 497 ptrcall!(void)(_classBinding.setTrailColorModifier, _godot_object, texture); 498 } 499 /** 500 501 */ 502 Ref!GradientTexture getTrailColorModifier() const 503 { 504 checkClassBinding!(typeof(this))(); 505 return ptrcall!(GradientTexture)(_classBinding.getTrailColorModifier, _godot_object); 506 } 507 /** 508 509 */ 510 Vector3 getGravity() const 511 { 512 checkClassBinding!(typeof(this))(); 513 return ptrcall!(Vector3)(_classBinding.getGravity, _godot_object); 514 } 515 /** 516 517 */ 518 void setGravity(in Vector3 accel_vec) 519 { 520 checkClassBinding!(typeof(this))(); 521 ptrcall!(void)(_classBinding.setGravity, _godot_object, accel_vec); 522 } 523 /** 524 Emitter will emit `amount` divided by `trail_divisor` particles. The remaining particles will be used as trail(s). 525 */ 526 @property long trailDivisor() 527 { 528 return getTrailDivisor(); 529 } 530 /// ditto 531 @property void trailDivisor(long v) 532 { 533 setTrailDivisor(v); 534 } 535 /** 536 Trail particles' size will vary along this $(D CurveTexture). 537 */ 538 @property CurveTexture trailSizeModifier() 539 { 540 return getTrailSizeModifier(); 541 } 542 /// ditto 543 @property void trailSizeModifier(CurveTexture v) 544 { 545 setTrailSizeModifier(v); 546 } 547 /** 548 Trail particles' color will vary along this $(D GradientTexture). 549 */ 550 @property GradientTexture trailColorModifier() 551 { 552 return getTrailColorModifier(); 553 } 554 /// ditto 555 @property void trailColorModifier(GradientTexture v) 556 { 557 setTrailColorModifier(v); 558 } 559 /** 560 Particles will be emitted inside this region. Use `EMISSION_SHAPE_*` constants for values. Default value: `EMISSION_SHAPE_POINT`. 561 */ 562 @property ParticlesMaterial.EmissionShape emissionShape() 563 { 564 return getEmissionShape(); 565 } 566 /// ditto 567 @property void emissionShape(long v) 568 { 569 setEmissionShape(v); 570 } 571 /** 572 The sphere's radius if `emission_shape` is set to `EMISSION_SHAPE_SPHERE`. 573 */ 574 @property double emissionSphereRadius() 575 { 576 return getEmissionSphereRadius(); 577 } 578 /// ditto 579 @property void emissionSphereRadius(double v) 580 { 581 setEmissionSphereRadius(v); 582 } 583 /** 584 The box's extents if `emission_shape` is set to `EMISSION_SHAPE_BOX`. 585 */ 586 @property Vector3 emissionBoxExtents() 587 { 588 return getEmissionBoxExtents(); 589 } 590 /// ditto 591 @property void emissionBoxExtents(Vector3 v) 592 { 593 setEmissionBoxExtents(v); 594 } 595 /** 596 597 */ 598 @property Texture emissionPointTexture() 599 { 600 return getEmissionPointTexture(); 601 } 602 /// ditto 603 @property void emissionPointTexture(Texture v) 604 { 605 setEmissionPointTexture(v); 606 } 607 /** 608 609 */ 610 @property Texture emissionNormalTexture() 611 { 612 return getEmissionNormalTexture(); 613 } 614 /// ditto 615 @property void emissionNormalTexture(Texture v) 616 { 617 setEmissionNormalTexture(v); 618 } 619 /** 620 621 */ 622 @property Texture emissionColorTexture() 623 { 624 return getEmissionColorTexture(); 625 } 626 /// ditto 627 @property void emissionColorTexture(Texture v) 628 { 629 setEmissionColorTexture(v); 630 } 631 /** 632 The number of emission points if `emission_shape` is set to `EMISSION_SHAPE_POINTS` or `EMISSION_SHAPE_DIRECTED_POINTS`. 633 */ 634 @property long emissionPointCount() 635 { 636 return getEmissionPointCount(); 637 } 638 /// ditto 639 @property void emissionPointCount(long v) 640 { 641 setEmissionPointCount(v); 642 } 643 /** 644 645 */ 646 @property bool flagAlignY() 647 { 648 return getFlag(0); 649 } 650 /// ditto 651 @property void flagAlignY(bool v) 652 { 653 setFlag(0, v); 654 } 655 /** 656 657 */ 658 @property bool flagRotateY() 659 { 660 return getFlag(1); 661 } 662 /// ditto 663 @property void flagRotateY(bool v) 664 { 665 setFlag(1, v); 666 } 667 /** 668 If `true` particles will not move on the z axis. Default value: `true` for $(D Particles2D), `false` for $(D Particles). 669 */ 670 @property bool flagDisableZ() 671 { 672 return getFlag(2); 673 } 674 /// ditto 675 @property void flagDisableZ(bool v) 676 { 677 setFlag(2, v); 678 } 679 /** 680 Each particle's initial direction range from `+spread` to `-spread` degrees. Default value: `45`. 681 */ 682 @property double spread() 683 { 684 return getSpread(); 685 } 686 /// ditto 687 @property void spread(double v) 688 { 689 setSpread(v); 690 } 691 /** 692 693 */ 694 @property double flatness() 695 { 696 return getFlatness(); 697 } 698 /// ditto 699 @property void flatness(double v) 700 { 701 setFlatness(v); 702 } 703 /** 704 Gravity applied to every particle. Default value: `(0, 98, 0)`. 705 */ 706 @property Vector3 gravity() 707 { 708 return getGravity(); 709 } 710 /// ditto 711 @property void gravity(Vector3 v) 712 { 713 setGravity(v); 714 } 715 /** 716 Initial velocity for each particle. 717 */ 718 @property double initialVelocity() 719 { 720 return getParam(0); 721 } 722 /// ditto 723 @property void initialVelocity(double v) 724 { 725 setParam(0, v); 726 } 727 /** 728 Initial velocity randomness ratio. Default value: `0`. 729 */ 730 @property double initialVelocityRandom() 731 { 732 return getParamRandomness(0); 733 } 734 /// ditto 735 @property void initialVelocityRandom(double v) 736 { 737 setParamRandomness(0, v); 738 } 739 /** 740 Initial angular velocity applied to each particle. 741 */ 742 @property double angularVelocity() 743 { 744 return getParam(1); 745 } 746 /// ditto 747 @property void angularVelocity(double v) 748 { 749 setParam(1, v); 750 } 751 /** 752 Angular velocity randomness ratio. Default value: `0`. 753 */ 754 @property double angularVelocityRandom() 755 { 756 return getParamRandomness(1); 757 } 758 /// ditto 759 @property void angularVelocityRandom(double v) 760 { 761 setParamRandomness(1, v); 762 } 763 /** 764 Each particle's angular velocity will vary along this $(D CurveTexture). 765 */ 766 @property Texture angularVelocityCurve() 767 { 768 return getParamTexture(1); 769 } 770 /// ditto 771 @property void angularVelocityCurve(Texture v) 772 { 773 setParamTexture(1, v); 774 } 775 /** 776 Orbital velocity applied to each particle. 777 */ 778 @property double orbitVelocity() 779 { 780 return getParam(2); 781 } 782 /// ditto 783 @property void orbitVelocity(double v) 784 { 785 setParam(2, v); 786 } 787 /** 788 Orbital velocity randomness ratio. Default value: `0`. 789 */ 790 @property double orbitVelocityRandom() 791 { 792 return getParamRandomness(2); 793 } 794 /// ditto 795 @property void orbitVelocityRandom(double v) 796 { 797 setParamRandomness(2, v); 798 } 799 /** 800 Each particle's orbital velocity will vary along this $(D CurveTexture). 801 */ 802 @property Texture orbitVelocityCurve() 803 { 804 return getParamTexture(2); 805 } 806 /// ditto 807 @property void orbitVelocityCurve(Texture v) 808 { 809 setParamTexture(2, v); 810 } 811 /** 812 Linear acceleration applied to each particle. 813 */ 814 @property double linearAccel() 815 { 816 return getParam(3); 817 } 818 /// ditto 819 @property void linearAccel(double v) 820 { 821 setParam(3, v); 822 } 823 /** 824 Linear acceleration randomness ratio. Default value: `0`. 825 */ 826 @property double linearAccelRandom() 827 { 828 return getParamRandomness(3); 829 } 830 /// ditto 831 @property void linearAccelRandom(double v) 832 { 833 setParamRandomness(3, v); 834 } 835 /** 836 Each particle's linear acceleration will vary along this $(D CurveTexture). 837 */ 838 @property Texture linearAccelCurve() 839 { 840 return getParamTexture(3); 841 } 842 /// ditto 843 @property void linearAccelCurve(Texture v) 844 { 845 setParamTexture(3, v); 846 } 847 /** 848 Radial acceleration applied to each particle. 849 */ 850 @property double radialAccel() 851 { 852 return getParam(4); 853 } 854 /// ditto 855 @property void radialAccel(double v) 856 { 857 setParam(4, v); 858 } 859 /** 860 Radial acceleration randomness ratio. Default value: `0`. 861 */ 862 @property double radialAccelRandom() 863 { 864 return getParamRandomness(4); 865 } 866 /// ditto 867 @property void radialAccelRandom(double v) 868 { 869 setParamRandomness(4, v); 870 } 871 /** 872 Each particle's radial acceleration will vary along this $(D CurveTexture). 873 */ 874 @property Texture radialAccelCurve() 875 { 876 return getParamTexture(4); 877 } 878 /// ditto 879 @property void radialAccelCurve(Texture v) 880 { 881 setParamTexture(4, v); 882 } 883 /** 884 Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity. 885 */ 886 @property double tangentialAccel() 887 { 888 return getParam(5); 889 } 890 /// ditto 891 @property void tangentialAccel(double v) 892 { 893 setParam(5, v); 894 } 895 /** 896 Tangential acceleration randomness ratio. Default value: `0`. 897 */ 898 @property double tangentialAccelRandom() 899 { 900 return getParamRandomness(5); 901 } 902 /// ditto 903 @property void tangentialAccelRandom(double v) 904 { 905 setParamRandomness(5, v); 906 } 907 /** 908 Each particle's tangential acceleration will vary along this $(D CurveTexture). 909 */ 910 @property Texture tangentialAccelCurve() 911 { 912 return getParamTexture(5); 913 } 914 /// ditto 915 @property void tangentialAccelCurve(Texture v) 916 { 917 setParamTexture(5, v); 918 } 919 /** 920 The rate at which particles lose velocity. 921 */ 922 @property double damping() 923 { 924 return getParam(6); 925 } 926 /// ditto 927 @property void damping(double v) 928 { 929 setParam(6, v); 930 } 931 /** 932 Damping randomness ratio. Default value: `0`. 933 */ 934 @property double dampingRandom() 935 { 936 return getParamRandomness(6); 937 } 938 /// ditto 939 @property void dampingRandom(double v) 940 { 941 setParamRandomness(6, v); 942 } 943 /** 944 Damping will vary along this $(D CurveTexture). 945 */ 946 @property Texture dampingCurve() 947 { 948 return getParamTexture(6); 949 } 950 /// ditto 951 @property void dampingCurve(Texture v) 952 { 953 setParamTexture(6, v); 954 } 955 /** 956 Initial rotation applied to each particle. 957 */ 958 @property double angle() 959 { 960 return getParam(7); 961 } 962 /// ditto 963 @property void angle(double v) 964 { 965 setParam(7, v); 966 } 967 /** 968 Rotation randomness ratio. Default value: `0`. 969 */ 970 @property double angleRandom() 971 { 972 return getParamRandomness(7); 973 } 974 /// ditto 975 @property void angleRandom(double v) 976 { 977 setParamRandomness(7, v); 978 } 979 /** 980 Each particle's rotation will be animated along this $(D CurveTexture). 981 */ 982 @property Texture angleCurve() 983 { 984 return getParamTexture(7); 985 } 986 /// ditto 987 @property void angleCurve(Texture v) 988 { 989 setParamTexture(7, v); 990 } 991 /** 992 Initial scale applied to each particle. 993 */ 994 @property double scale() 995 { 996 return getParam(8); 997 } 998 /// ditto 999 @property void scale(double v) 1000 { 1001 setParam(8, v); 1002 } 1003 /** 1004 Scale randomness ratio. Default value: `0`. 1005 */ 1006 @property double scaleRandom() 1007 { 1008 return getParamRandomness(8); 1009 } 1010 /// ditto 1011 @property void scaleRandom(double v) 1012 { 1013 setParamRandomness(8, v); 1014 } 1015 /** 1016 Each particle's scale will vary along this $(D CurveTexture). 1017 */ 1018 @property Texture scaleCurve() 1019 { 1020 return getParamTexture(8); 1021 } 1022 /// ditto 1023 @property void scaleCurve(Texture v) 1024 { 1025 setParamTexture(8, v); 1026 } 1027 /** 1028 Each particle's initial color. If the $(D Particle2D)'s `texture` is defined, it will be multiplied by this color. 1029 */ 1030 @property Color color() 1031 { 1032 return getColor(); 1033 } 1034 /// ditto 1035 @property void color(Color v) 1036 { 1037 setColor(v); 1038 } 1039 /** 1040 Each particle's color will vary along this $(D GradientTexture). 1041 */ 1042 @property Texture colorRamp() 1043 { 1044 return getColorRamp(); 1045 } 1046 /// ditto 1047 @property void colorRamp(Texture v) 1048 { 1049 setColorRamp(v); 1050 } 1051 /** 1052 Initial hue variation applied to each particle. 1053 */ 1054 @property double hueVariation() 1055 { 1056 return getParam(9); 1057 } 1058 /// ditto 1059 @property void hueVariation(double v) 1060 { 1061 setParam(9, v); 1062 } 1063 /** 1064 Hue variation randomness ratio. Default value: `0`. 1065 */ 1066 @property double hueVariationRandom() 1067 { 1068 return getParamRandomness(9); 1069 } 1070 /// ditto 1071 @property void hueVariationRandom(double v) 1072 { 1073 setParamRandomness(9, v); 1074 } 1075 /** 1076 Each particle's hue will vary along this $(D CurveTexture). 1077 */ 1078 @property Texture hueVariationCurve() 1079 { 1080 return getParamTexture(9); 1081 } 1082 /// ditto 1083 @property void hueVariationCurve(Texture v) 1084 { 1085 setParamTexture(9, v); 1086 } 1087 /** 1088 Particle animation speed. 1089 */ 1090 @property double animSpeed() 1091 { 1092 return getParam(10); 1093 } 1094 /// ditto 1095 @property void animSpeed(double v) 1096 { 1097 setParam(10, v); 1098 } 1099 /** 1100 Animation speed randomness ratio. Default value: `0`. 1101 */ 1102 @property double animSpeedRandom() 1103 { 1104 return getParamRandomness(10); 1105 } 1106 /// ditto 1107 @property void animSpeedRandom(double v) 1108 { 1109 setParamRandomness(10, v); 1110 } 1111 /** 1112 Each particle's animation speed will vary along this $(D CurveTexture). 1113 */ 1114 @property Texture animSpeedCurve() 1115 { 1116 return getParamTexture(10); 1117 } 1118 /// ditto 1119 @property void animSpeedCurve(Texture v) 1120 { 1121 setParamTexture(10, v); 1122 } 1123 /** 1124 Particle animation offset. 1125 */ 1126 @property double animOffset() 1127 { 1128 return getParam(11); 1129 } 1130 /// ditto 1131 @property void animOffset(double v) 1132 { 1133 setParam(11, v); 1134 } 1135 /** 1136 Animation offset randomness ratio. Default value: `0`. 1137 */ 1138 @property double animOffsetRandom() 1139 { 1140 return getParamRandomness(11); 1141 } 1142 /// ditto 1143 @property void animOffsetRandom(double v) 1144 { 1145 setParamRandomness(11, v); 1146 } 1147 /** 1148 Each particle's animation offset will vary along this $(D CurveTexture). 1149 */ 1150 @property Texture animOffsetCurve() 1151 { 1152 return getParamTexture(11); 1153 } 1154 /// ditto 1155 @property void animOffsetCurve(Texture v) 1156 { 1157 setParamTexture(11, v); 1158 } 1159 /** 1160 If `true` animation will loop. Default value: `false`. 1161 */ 1162 @property bool animLoop() 1163 { 1164 return getFlag(3); 1165 } 1166 /// ditto 1167 @property void animLoop(bool v) 1168 { 1169 setFlag(3, v); 1170 } 1171 }