LightInfo.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. function LightInfo() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.LightInfo()
  4. }
  5. Object.defineProperties(this, {
  6. 'importance': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_importance, set: LightInfo.prototype.__set_importance},
  7. 'position': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_position, set: LightInfo.prototype.__set_position},
  8. 'direction': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_direction, set: LightInfo.prototype.__set_direction},
  9. 'type': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_type, set: LightInfo.prototype.__set_type},
  10. 'diffuseColor': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_diffuseColor, set: LightInfo.prototype.__set_diffuseColor},
  11. 'specularColor': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_specularColor, set: LightInfo.prototype.__set_specularColor},
  12. 'constantAttenuation': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_constantAttenuation, set: LightInfo.prototype.__set_constantAttenuation},
  13. 'linearAttenuation': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_linearAttenuation, set: LightInfo.prototype.__set_linearAttenuation},
  14. 'quadraticAttenuation': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_quadraticAttenuation, set: LightInfo.prototype.__set_quadraticAttenuation},
  15. 'intensity': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_intensity, set: LightInfo.prototype.__set_intensity},
  16. 'spotlightCutoff': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_spotlightCutoff, set: LightInfo.prototype.__set_spotlightCutoff},
  17. 'spotlightExponent': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_spotlightExponent, set: LightInfo.prototype.__set_spotlightExponent},
  18. 'shadowsEnabled': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_shadowsEnabled, set: LightInfo.prototype.__set_shadowsEnabled},
  19. 'lightViewMatrix': { enumerable: true, configurable: true, get: LightInfo.prototype.__get_lightViewMatrix, set: LightInfo.prototype.__set_lightViewMatrix}
  20. })
  21. }
  22. LightInfo.prototype.__get_importance = function() {
  23. return Polycode.LightInfo__get_importance(this.__ptr)
  24. }
  25. LightInfo.prototype.__set_importance = function(val) {
  26. Polycode.LightInfo__set_importance(this.__ptr, val)
  27. }
  28. LightInfo.prototype.__get_position = function() {
  29. var retVal = new Vector3()
  30. retVal.__ptr = Polycode.LightInfo__get_position(this.__ptr)
  31. return retVal
  32. }
  33. LightInfo.prototype.__set_position = function(val) {
  34. Polycode.LightInfo__set_position(this.__ptr, val.__ptr)
  35. }
  36. LightInfo.prototype.__get_direction = function() {
  37. var retVal = new Vector3()
  38. retVal.__ptr = Polycode.LightInfo__get_direction(this.__ptr)
  39. return retVal
  40. }
  41. LightInfo.prototype.__set_direction = function(val) {
  42. Polycode.LightInfo__set_direction(this.__ptr, val.__ptr)
  43. }
  44. LightInfo.prototype.__get_type = function() {
  45. return Polycode.LightInfo__get_type(this.__ptr)
  46. }
  47. LightInfo.prototype.__set_type = function(val) {
  48. Polycode.LightInfo__set_type(this.__ptr, val)
  49. }
  50. LightInfo.prototype.__get_diffuseColor = function() {
  51. var retVal = new Color()
  52. retVal.__ptr = Polycode.LightInfo__get_diffuseColor(this.__ptr)
  53. return retVal
  54. }
  55. LightInfo.prototype.__set_diffuseColor = function(val) {
  56. Polycode.LightInfo__set_diffuseColor(this.__ptr, val.__ptr)
  57. }
  58. LightInfo.prototype.__get_specularColor = function() {
  59. var retVal = new Color()
  60. retVal.__ptr = Polycode.LightInfo__get_specularColor(this.__ptr)
  61. return retVal
  62. }
  63. LightInfo.prototype.__set_specularColor = function(val) {
  64. Polycode.LightInfo__set_specularColor(this.__ptr, val.__ptr)
  65. }
  66. LightInfo.prototype.__get_constantAttenuation = function() {
  67. return Polycode.LightInfo__get_constantAttenuation(this.__ptr)
  68. }
  69. LightInfo.prototype.__set_constantAttenuation = function(val) {
  70. Polycode.LightInfo__set_constantAttenuation(this.__ptr, val)
  71. }
  72. LightInfo.prototype.__get_linearAttenuation = function() {
  73. return Polycode.LightInfo__get_linearAttenuation(this.__ptr)
  74. }
  75. LightInfo.prototype.__set_linearAttenuation = function(val) {
  76. Polycode.LightInfo__set_linearAttenuation(this.__ptr, val)
  77. }
  78. LightInfo.prototype.__get_quadraticAttenuation = function() {
  79. return Polycode.LightInfo__get_quadraticAttenuation(this.__ptr)
  80. }
  81. LightInfo.prototype.__set_quadraticAttenuation = function(val) {
  82. Polycode.LightInfo__set_quadraticAttenuation(this.__ptr, val)
  83. }
  84. LightInfo.prototype.__get_intensity = function() {
  85. return Polycode.LightInfo__get_intensity(this.__ptr)
  86. }
  87. LightInfo.prototype.__set_intensity = function(val) {
  88. Polycode.LightInfo__set_intensity(this.__ptr, val)
  89. }
  90. LightInfo.prototype.__get_spotlightCutoff = function() {
  91. return Polycode.LightInfo__get_spotlightCutoff(this.__ptr)
  92. }
  93. LightInfo.prototype.__set_spotlightCutoff = function(val) {
  94. Polycode.LightInfo__set_spotlightCutoff(this.__ptr, val)
  95. }
  96. LightInfo.prototype.__get_spotlightExponent = function() {
  97. return Polycode.LightInfo__get_spotlightExponent(this.__ptr)
  98. }
  99. LightInfo.prototype.__set_spotlightExponent = function(val) {
  100. Polycode.LightInfo__set_spotlightExponent(this.__ptr, val)
  101. }
  102. LightInfo.prototype.__get_shadowsEnabled = function() {
  103. return Polycode.LightInfo__get_shadowsEnabled(this.__ptr)
  104. }
  105. LightInfo.prototype.__set_shadowsEnabled = function(val) {
  106. Polycode.LightInfo__set_shadowsEnabled(this.__ptr, val)
  107. }
  108. LightInfo.prototype.__get_lightViewMatrix = function() {
  109. var retVal = new Matrix4()
  110. retVal.__ptr = Polycode.LightInfo__get_lightViewMatrix(this.__ptr)
  111. return retVal
  112. }
  113. LightInfo.prototype.__set_lightViewMatrix = function(val) {
  114. Polycode.LightInfo__set_lightViewMatrix(this.__ptr, val.__ptr)
  115. }
  116. Duktape.fin(LightInfo.prototype, function (x) {
  117. if (x === LightInfo.prototype) {
  118. return;
  119. }
  120. Polycode.LightInfo__delete(x.__ptr)
  121. })