BezierPoint.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function BezierPoint() {
  2. Object.defineProperties(this, {
  3. 'p1': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p1, set: BezierPoint.prototype.__set_p1},
  4. 'p2': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p2, set: BezierPoint.prototype.__set_p2},
  5. 'p3': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p3, set: BezierPoint.prototype.__set_p3}
  6. })
  7. }
  8. BezierPoint.prototype.__get_p1 = function() {
  9. var retVal = new Vector3()
  10. retVal.__ptr = Polycode.BezierPoint__get_p1(this.__ptr)
  11. return retVal
  12. }
  13. BezierPoint.prototype.__set_p1 = function(val) {
  14. Polycode.BezierPoint__set_p1(this.__ptr, val.__ptr)
  15. }
  16. BezierPoint.prototype.__get_p2 = function() {
  17. var retVal = new Vector3()
  18. retVal.__ptr = Polycode.BezierPoint__get_p2(this.__ptr)
  19. return retVal
  20. }
  21. BezierPoint.prototype.__set_p2 = function(val) {
  22. Polycode.BezierPoint__set_p2(this.__ptr, val.__ptr)
  23. }
  24. BezierPoint.prototype.__get_p3 = function() {
  25. var retVal = new Vector3()
  26. retVal.__ptr = Polycode.BezierPoint__get_p3(this.__ptr)
  27. return retVal
  28. }
  29. BezierPoint.prototype.__set_p3 = function(val) {
  30. Polycode.BezierPoint__set_p3(this.__ptr, val.__ptr)
  31. }
  32. Duktape.fin(BezierPoint.prototype, function (x) {
  33. if (x === BezierPoint.prototype) {
  34. return;
  35. }
  36. Polycode.BezierPoint__delete(x.__ptr)
  37. })