CoreMotionEvent.js 822 B

123456789101112131415161718192021222324252627282930
  1. require('Polycode/Event')
  2. function CoreMotionEvent() {
  3. if(arguments[0] != "__skip_ptr__") {
  4. this.__ptr = Polycode.CoreMotionEvent()
  5. }
  6. Object.defineProperties(this, {
  7. 'amount': { enumerable: true, configurable: true, get: CoreMotionEvent.prototype.__get_amount, set: CoreMotionEvent.prototype.__set_amount}
  8. })
  9. }
  10. CoreMotionEvent.prototype = Object.create(Event.prototype)
  11. CoreMotionEvent.prototype.__get_amount = function() {
  12. var retVal = new Vector3()
  13. retVal.__ptr = Polycode.CoreMotionEvent__get_amount(this.__ptr)
  14. return retVal
  15. }
  16. CoreMotionEvent.prototype.__set_amount = function(val) {
  17. Polycode.CoreMotionEvent__set_amount(this.__ptr, val.__ptr)
  18. }
  19. Duktape.fin(CoreMotionEvent.prototype, function (x) {
  20. if (x === CoreMotionEvent.prototype) {
  21. return;
  22. }
  23. Polycode.CoreMotionEvent__delete(x.__ptr)
  24. })