2
0

Rotation.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. function Rotation() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.Rotation()
  4. }
  5. Object.defineProperties(this, {
  6. 'pitch': { enumerable: true, configurable: true, get: Rotation.prototype.__get_pitch, set: Rotation.prototype.__set_pitch},
  7. 'yaw': { enumerable: true, configurable: true, get: Rotation.prototype.__get_yaw, set: Rotation.prototype.__set_yaw},
  8. 'roll': { enumerable: true, configurable: true, get: Rotation.prototype.__get_roll, set: Rotation.prototype.__set_roll}
  9. })
  10. }
  11. Rotation.prototype.__get_pitch = function() {
  12. return Polycode.Rotation__get_pitch(this.__ptr)
  13. }
  14. Rotation.prototype.__set_pitch = function(val) {
  15. Polycode.Rotation__set_pitch(this.__ptr, val)
  16. }
  17. Rotation.prototype.__get_yaw = function() {
  18. return Polycode.Rotation__get_yaw(this.__ptr)
  19. }
  20. Rotation.prototype.__set_yaw = function(val) {
  21. Polycode.Rotation__set_yaw(this.__ptr, val)
  22. }
  23. Rotation.prototype.__get_roll = function() {
  24. return Polycode.Rotation__get_roll(this.__ptr)
  25. }
  26. Rotation.prototype.__set_roll = function(val) {
  27. Polycode.Rotation__set_roll(this.__ptr, val)
  28. }
  29. Duktape.fin(Rotation.prototype, function (x) {
  30. if (x === Rotation.prototype) {
  31. return;
  32. }
  33. Polycode.Rotation__delete(x.__ptr)
  34. })