AttributeBinding.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. function AttributeBinding() {
  2. Object.defineProperties(this, {
  3. 'name': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_name, set: AttributeBinding.prototype.__set_name},
  4. 'vertexData': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_vertexData, set: AttributeBinding.prototype.__set_vertexData},
  5. 'attribute': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_attribute, set: AttributeBinding.prototype.__set_attribute},
  6. 'enabled': { enumerable: true, configurable: true, get: AttributeBinding.prototype.__get_enabled, set: AttributeBinding.prototype.__set_enabled}
  7. })
  8. }
  9. AttributeBinding.prototype.__get_name = function() {
  10. return Polycode.AttributeBinding__get_name(this.__ptr)
  11. }
  12. AttributeBinding.prototype.__set_name = function(val) {
  13. Polycode.AttributeBinding__set_name(this.__ptr, val)
  14. }
  15. AttributeBinding.prototype.__get_vertexData = function() {
  16. var retVal = new VertexDataArray()
  17. retVal.__ptr = Polycode.AttributeBinding__get_vertexData(this.__ptr)
  18. return retVal
  19. }
  20. AttributeBinding.prototype.__set_vertexData = function(val) {
  21. Polycode.AttributeBinding__set_vertexData(this.__ptr, val.__ptr)
  22. }
  23. AttributeBinding.prototype.__get_attribute = function() {
  24. var retVal = new ProgramAttribute()
  25. retVal.__ptr = Polycode.AttributeBinding__get_attribute(this.__ptr)
  26. return retVal
  27. }
  28. AttributeBinding.prototype.__set_attribute = function(val) {
  29. Polycode.AttributeBinding__set_attribute(this.__ptr, val.__ptr)
  30. }
  31. AttributeBinding.prototype.__get_enabled = function() {
  32. return Polycode.AttributeBinding__get_enabled(this.__ptr)
  33. }
  34. AttributeBinding.prototype.__set_enabled = function(val) {
  35. Polycode.AttributeBinding__set_enabled(this.__ptr, val)
  36. }
  37. Duktape.fin(AttributeBinding.prototype, function (x) {
  38. if (x === AttributeBinding.prototype) {
  39. return;
  40. }
  41. Polycode.AttributeBinding__delete(x.__ptr)
  42. })