GPUDrawOptions.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. function GPUDrawOptions() {
  2. Object.defineProperties(this, {
  3. 'depthTest': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_depthTest, set: GPUDrawOptions.prototype.__set_depthTest},
  4. 'depthWrite': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_depthWrite, set: GPUDrawOptions.prototype.__set_depthWrite},
  5. 'linePointSize': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_linePointSize, set: GPUDrawOptions.prototype.__set_linePointSize},
  6. 'alphaTest': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_alphaTest, set: GPUDrawOptions.prototype.__set_alphaTest},
  7. 'backfaceCull': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_backfaceCull, set: GPUDrawOptions.prototype.__set_backfaceCull},
  8. 'depthOnly': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_depthOnly, set: GPUDrawOptions.prototype.__set_depthOnly},
  9. 'forceMaterial': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_forceMaterial, set: GPUDrawOptions.prototype.__set_forceMaterial},
  10. 'blendingMode': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_blendingMode, set: GPUDrawOptions.prototype.__set_blendingMode},
  11. 'scissorBox': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_scissorBox, set: GPUDrawOptions.prototype.__set_scissorBox},
  12. 'enableScissor': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_enableScissor, set: GPUDrawOptions.prototype.__set_enableScissor},
  13. 'drawColor': { enumerable: true, configurable: true, get: GPUDrawOptions.prototype.__get_drawColor, set: GPUDrawOptions.prototype.__set_drawColor}
  14. })
  15. }
  16. GPUDrawOptions.prototype.__get_depthTest = function() {
  17. return Polycode.GPUDrawOptions__get_depthTest(this.__ptr)
  18. }
  19. GPUDrawOptions.prototype.__set_depthTest = function(val) {
  20. Polycode.GPUDrawOptions__set_depthTest(this.__ptr, val)
  21. }
  22. GPUDrawOptions.prototype.__get_depthWrite = function() {
  23. return Polycode.GPUDrawOptions__get_depthWrite(this.__ptr)
  24. }
  25. GPUDrawOptions.prototype.__set_depthWrite = function(val) {
  26. Polycode.GPUDrawOptions__set_depthWrite(this.__ptr, val)
  27. }
  28. GPUDrawOptions.prototype.__get_linePointSize = function() {
  29. return Polycode.GPUDrawOptions__get_linePointSize(this.__ptr)
  30. }
  31. GPUDrawOptions.prototype.__set_linePointSize = function(val) {
  32. Polycode.GPUDrawOptions__set_linePointSize(this.__ptr, val)
  33. }
  34. GPUDrawOptions.prototype.__get_alphaTest = function() {
  35. return Polycode.GPUDrawOptions__get_alphaTest(this.__ptr)
  36. }
  37. GPUDrawOptions.prototype.__set_alphaTest = function(val) {
  38. Polycode.GPUDrawOptions__set_alphaTest(this.__ptr, val)
  39. }
  40. GPUDrawOptions.prototype.__get_backfaceCull = function() {
  41. return Polycode.GPUDrawOptions__get_backfaceCull(this.__ptr)
  42. }
  43. GPUDrawOptions.prototype.__set_backfaceCull = function(val) {
  44. Polycode.GPUDrawOptions__set_backfaceCull(this.__ptr, val)
  45. }
  46. GPUDrawOptions.prototype.__get_depthOnly = function() {
  47. return Polycode.GPUDrawOptions__get_depthOnly(this.__ptr)
  48. }
  49. GPUDrawOptions.prototype.__set_depthOnly = function(val) {
  50. Polycode.GPUDrawOptions__set_depthOnly(this.__ptr, val)
  51. }
  52. GPUDrawOptions.prototype.__get_forceMaterial = function() {
  53. return Polycode.GPUDrawOptions__get_forceMaterial(this.__ptr)
  54. }
  55. GPUDrawOptions.prototype.__set_forceMaterial = function(val) {
  56. Polycode.GPUDrawOptions__set_forceMaterial(this.__ptr, val)
  57. }
  58. GPUDrawOptions.prototype.__get_blendingMode = function() {
  59. return Polycode.GPUDrawOptions__get_blendingMode(this.__ptr)
  60. }
  61. GPUDrawOptions.prototype.__set_blendingMode = function(val) {
  62. Polycode.GPUDrawOptions__set_blendingMode(this.__ptr, val)
  63. }
  64. GPUDrawOptions.prototype.__get_scissorBox = function() {
  65. var retVal = new Rectangle()
  66. retVal.__ptr = Polycode.GPUDrawOptions__get_scissorBox(this.__ptr)
  67. return retVal
  68. }
  69. GPUDrawOptions.prototype.__set_scissorBox = function(val) {
  70. Polycode.GPUDrawOptions__set_scissorBox(this.__ptr, val.__ptr)
  71. }
  72. GPUDrawOptions.prototype.__get_enableScissor = function() {
  73. return Polycode.GPUDrawOptions__get_enableScissor(this.__ptr)
  74. }
  75. GPUDrawOptions.prototype.__set_enableScissor = function(val) {
  76. Polycode.GPUDrawOptions__set_enableScissor(this.__ptr, val)
  77. }
  78. GPUDrawOptions.prototype.__get_drawColor = function() {
  79. var retVal = new Color()
  80. retVal.__ptr = Polycode.GPUDrawOptions__get_drawColor(this.__ptr)
  81. return retVal
  82. }
  83. GPUDrawOptions.prototype.__set_drawColor = function(val) {
  84. Polycode.GPUDrawOptions__set_drawColor(this.__ptr, val.__ptr)
  85. }
  86. Duktape.fin(GPUDrawOptions.prototype, function (x) {
  87. if (x === GPUDrawOptions.prototype) {
  88. return;
  89. }
  90. Polycode.GPUDrawOptions__delete(x.__ptr)
  91. })