Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking outside of entered website to release fails, accesses obsolete interact property #10

Closed
deathcap opened this issue Feb 16, 2015 · 0 comments
Labels

Comments

@deathcap
Copy link
Member

Load a voxel world with voxel-webview enabled, then use .web to "enter" the website (mouse interaction, GH-1). Click outside of the website in an attempt to return back to the game. Crashes on self.game.interact.request():

  window.addEventListener('click', this.onClick = function(ev) {
    // click anywhere outside of iframe to exit TODO: what if it fills the entire screen? (alternate escape hatch)
    // (we won't receive click events for the iframe here)
    // TODO: register on WebGL canvas element instead?
    //  tried this.game.view.renderer.domElement but didn't receive events

    if (document.getElementById('voxel-webview').parentElement.parentElement.style.zIndex === '0') {
      document.getElementById('voxel-webview').parentElement.parentElement.style.zIndex = '-1';
      self.game.interact.request();
    }
  });

need to replace with new alternative to relinquish control. New bug in 0.2.0, worked in 0.1.0 (three.js-based)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant