particles.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. datablock ParticleEmitterNodeData(DefaultEmitterNodeData)
  23. {
  24. timeMultiple = 1;
  25. };
  26. // Smoke
  27. datablock ParticleData(Smoke)
  28. {
  29. textureName = "art/particles/smoke";
  30. dragCoefficient = 0.3;
  31. gravityCoefficient = -0.2; // rises slowly
  32. inheritedVelFactor = 0.00;
  33. lifetimeMS = 3000;
  34. lifetimeVarianceMS = 250;
  35. useInvAlpha = true;
  36. spinRandomMin = -30.0;
  37. spinRandomMax = 30.0;
  38. sizes[0] = 1.5;
  39. sizes[1] = 2.75;
  40. sizes[2] = 6.5;
  41. times[0] = 0.0;
  42. times[1] = 0.5;
  43. times[2] = 1.0;
  44. };
  45. datablock ParticleEmitterData(SmokeEmitter)
  46. {
  47. ejectionPeriodMS = 400;
  48. periodVarianceMS = 5;
  49. ejectionVelocity = 0.0;
  50. velocityVariance = 0.0;
  51. thetaMin = 0.0;
  52. thetaMax = 90.0;
  53. particles = Smoke;
  54. };
  55. datablock ParticleEmitterNodeData(SmokeEmitterNode)
  56. {
  57. timeMultiple = 1;
  58. };
  59. // Ember
  60. datablock ParticleData(EmberParticle)
  61. {
  62. textureName = "art/particles/ember";
  63. dragCoefficient = 0.0;
  64. windCoefficient = 0.0;
  65. gravityCoefficient = -0.05; // rises slowly
  66. inheritedVelFactor = 0.00;
  67. lifetimeMS = 5000;
  68. lifetimeVarianceMS = 0;
  69. useInvAlpha = false;
  70. spinRandomMin = -90.0;
  71. spinRandomMax = 90.0;
  72. spinSpeed = 1;
  73. colors[0] = "1.000000 0.800000 0.000000 0.800000";
  74. colors[1] = "1.000000 0.700000 0.000000 0.800000";
  75. colors[2] = "1.000000 0.000000 0.000000 0.200000";
  76. sizes[0] = 0.05;
  77. sizes[1] = 0.1;
  78. sizes[2] = 0.05;
  79. times[0] = 0.0;
  80. times[1] = 0.5;
  81. times[2] = 1.0;
  82. };
  83. datablock ParticleEmitterData(EmberEmitter)
  84. {
  85. ejectionPeriodMS = 100;
  86. periodVarianceMS = 0;
  87. ejectionVelocity = 0.75;
  88. velocityVariance = 0.00;
  89. ejectionOffset = 2.0;
  90. thetaMin = 1.0;
  91. thetaMax = 100.0;
  92. particles = "EmberParticle";
  93. };
  94. datablock ParticleEmitterNodeData(EmberNode)
  95. {
  96. timeMultiple = 1;
  97. };
  98. // Fire
  99. datablock ParticleData(FireParticle)
  100. {
  101. textureName = "art/particles/smoke";
  102. dragCoefficient = 0.0;
  103. windCoefficient = 0.0;
  104. gravityCoefficient = -0.05; // rises slowly
  105. inheritedVelFactor = 0.00;
  106. lifetimeMS = 5000;
  107. lifetimeVarianceMS = 1000;
  108. useInvAlpha = false;
  109. spinRandomMin = -90.0;
  110. spinRandomMax = 90.0;
  111. spinSpeed = 1.0;
  112. colors[0] = "0.2 0.2 0.0 0.2";
  113. colors[1] = "0.6 0.2 0.0 0.2";
  114. colors[2] = "0.4 0.0 0.0 0.1";
  115. colors[3] = "0.1 0.04 0.0 0.3";
  116. sizes[0] = 0.5;
  117. sizes[1] = 4.0;
  118. sizes[2] = 5.0;
  119. sizes[3] = 6.0;
  120. times[0] = 0.0;
  121. times[1] = 0.1;
  122. times[2] = 0.2;
  123. times[3] = 0.3;
  124. };
  125. datablock ParticleEmitterData(FireEmitter)
  126. {
  127. ejectionPeriodMS = 50;
  128. periodVarianceMS = 0;
  129. ejectionVelocity = 0.55;
  130. velocityVariance = 0.00;
  131. ejectionOffset = 1.0;
  132. thetaMin = 1.0;
  133. thetaMax = 100.0;
  134. particles = "FireParticle";
  135. };
  136. datablock ParticleEmitterNodeData(FireNode)
  137. {
  138. timeMultiple = 1;
  139. };
  140. // Torch Fire
  141. datablock ParticleData(TorchFire1)
  142. {
  143. textureName = "art/particles/smoke";
  144. dragCoefficient = 0.0;
  145. gravityCoefficient = -0.3; // rises slowly
  146. inheritedVelFactor = 0.00;
  147. lifetimeMS = 500;
  148. lifetimeVarianceMS = 250;
  149. useInvAlpha = false;
  150. spinRandomMin = -30.0;
  151. spinRandomMax = 30.0;
  152. spinSpeed = 1;
  153. colors[0] = "0.6 0.6 0.0 0.1";
  154. colors[1] = "0.8 0.6 0.0 0.1";
  155. colors[2] = "0.0 0.0 0.0 0.1";
  156. sizes[0] = 0.5;
  157. sizes[1] = 0.5;
  158. sizes[2] = 2.4;
  159. times[0] = 0.0;
  160. times[1] = 0.5;
  161. times[2] = 1.0;
  162. };
  163. datablock ParticleData(TorchFire2)
  164. {
  165. textureName = "art/particles/smoke";
  166. dragCoefficient = 0.0;
  167. gravityCoefficient = -0.5; // rises slowly
  168. inheritedVelFactor = 0.00;
  169. lifetimeMS = 800;
  170. lifetimeVarianceMS = 150;
  171. useInvAlpha = false;
  172. spinRandomMin = -30.0;
  173. spinRandomMax = 30.0;
  174. spinSpeed = 1;
  175. colors[0] = "0.8 0.6 0.0 0.1";
  176. colors[1] = "0.6 0.6 0.0 0.1";
  177. colors[2] = "0.0 0.0 0.0 0.1";
  178. sizes[0] = 0.3;
  179. sizes[1] = 0.3;
  180. sizes[2] = 0.3;
  181. times[0] = 0.0;
  182. times[1] = 0.5;
  183. times[2] = 1.0;
  184. };
  185. datablock ParticleEmitterData(TorchFireEmitter)
  186. {
  187. ejectionPeriodMS = 15;
  188. periodVarianceMS = 5;
  189. ejectionVelocity = 0.25;
  190. velocityVariance = 0.10;
  191. thetaMin = 0.0;
  192. thetaMax = 45.0;
  193. particles = "TorchFire1" TAB "TorchFire2";
  194. };
  195. datablock ParticleEmitterNodeData(TorchFireEmitterNode)
  196. {
  197. timeMultiple = 1;
  198. };