WebGLInputMobile.jslib 766 B

1234567891011121314151617181920212223
  1. var WebGLInputMobile = {
  2. $instances: [],
  3. WebGLInputMobileRegister: function (touchend) {
  4. var id = instances.push(null) - 1;
  5. document.body.addEventListener("touchend", function () {
  6. document.body.removeEventListener("touchend", arguments.callee);
  7. Runtime.dynCall("vi", touchend, [id]);
  8. });
  9. return id;
  10. },
  11. WebGLInputMobileOnFocusOut: function (id, focusout) {
  12. document.body.addEventListener("focusout", function () {
  13. document.body.removeEventListener("focusout", arguments.callee);
  14. Runtime.dynCall("vi", focusout, [id]);
  15. });
  16. },
  17. }
  18. autoAddDeps(WebGLInputMobile, '$instances');
  19. mergeInto(LibraryManager.library, WebGLInputMobile);