SceneParticle.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. function SceneParticle() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.SceneParticle()
  4. }
  5. Object.defineProperties(this, {
  6. 'lifetime': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_lifetime, set: SceneParticle.prototype.__set_lifetime},
  7. 'position': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_position, set: SceneParticle.prototype.__set_position},
  8. 'velocity': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_velocity, set: SceneParticle.prototype.__set_velocity},
  9. 'perlinPos': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_perlinPos, set: SceneParticle.prototype.__set_perlinPos},
  10. 'rotation': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_rotation, set: SceneParticle.prototype.__set_rotation},
  11. 'brightnessDeviation': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_brightnessDeviation, set: SceneParticle.prototype.__set_brightnessDeviation},
  12. 'scale': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_scale, set: SceneParticle.prototype.__set_scale},
  13. 'color': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_color, set: SceneParticle.prototype.__set_color},
  14. 'varianceIndex': { enumerable: true, configurable: true, get: SceneParticle.prototype.__get_varianceIndex, set: SceneParticle.prototype.__set_varianceIndex}
  15. })
  16. }
  17. SceneParticle.prototype.__get_lifetime = function() {
  18. return Polycode.SceneParticle__get_lifetime(this.__ptr)
  19. }
  20. SceneParticle.prototype.__set_lifetime = function(val) {
  21. Polycode.SceneParticle__set_lifetime(this.__ptr, val)
  22. }
  23. SceneParticle.prototype.__get_position = function() {
  24. var retVal = new Vector3()
  25. retVal.__ptr = Polycode.SceneParticle__get_position(this.__ptr)
  26. return retVal
  27. }
  28. SceneParticle.prototype.__set_position = function(val) {
  29. Polycode.SceneParticle__set_position(this.__ptr, val.__ptr)
  30. }
  31. SceneParticle.prototype.__get_velocity = function() {
  32. var retVal = new Vector3()
  33. retVal.__ptr = Polycode.SceneParticle__get_velocity(this.__ptr)
  34. return retVal
  35. }
  36. SceneParticle.prototype.__set_velocity = function(val) {
  37. Polycode.SceneParticle__set_velocity(this.__ptr, val.__ptr)
  38. }
  39. SceneParticle.prototype.__get_perlinPos = function() {
  40. var retVal = new Vector3()
  41. retVal.__ptr = Polycode.SceneParticle__get_perlinPos(this.__ptr)
  42. return retVal
  43. }
  44. SceneParticle.prototype.__set_perlinPos = function(val) {
  45. Polycode.SceneParticle__set_perlinPos(this.__ptr, val.__ptr)
  46. }
  47. SceneParticle.prototype.__get_rotation = function() {
  48. var retVal = new Vector3()
  49. retVal.__ptr = Polycode.SceneParticle__get_rotation(this.__ptr)
  50. return retVal
  51. }
  52. SceneParticle.prototype.__set_rotation = function(val) {
  53. Polycode.SceneParticle__set_rotation(this.__ptr, val.__ptr)
  54. }
  55. SceneParticle.prototype.__get_brightnessDeviation = function() {
  56. return Polycode.SceneParticle__get_brightnessDeviation(this.__ptr)
  57. }
  58. SceneParticle.prototype.__set_brightnessDeviation = function(val) {
  59. Polycode.SceneParticle__set_brightnessDeviation(this.__ptr, val)
  60. }
  61. SceneParticle.prototype.__get_scale = function() {
  62. return Polycode.SceneParticle__get_scale(this.__ptr)
  63. }
  64. SceneParticle.prototype.__set_scale = function(val) {
  65. Polycode.SceneParticle__set_scale(this.__ptr, val)
  66. }
  67. SceneParticle.prototype.__get_color = function() {
  68. var retVal = new Color()
  69. retVal.__ptr = Polycode.SceneParticle__get_color(this.__ptr)
  70. return retVal
  71. }
  72. SceneParticle.prototype.__set_color = function(val) {
  73. Polycode.SceneParticle__set_color(this.__ptr, val.__ptr)
  74. }
  75. SceneParticle.prototype.__get_varianceIndex = function() {
  76. return Polycode.SceneParticle__get_varianceIndex(this.__ptr)
  77. }
  78. SceneParticle.prototype.__set_varianceIndex = function(val) {
  79. Polycode.SceneParticle__set_varianceIndex(this.__ptr, val)
  80. }
  81. Duktape.fin(SceneParticle.prototype, function (x) {
  82. if (x === SceneParticle.prototype) {
  83. return;
  84. }
  85. Polycode.SceneParticle__delete(x.__ptr)
  86. })