Adding the touchend event listener through the HTML DOM within Amazon Sumerian.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add an event listener for touch events anywhere on the screen. | |
// Note: the MouseUpAction of Sumerian doesn't provide the coordinates | |
// -> use the HTML DOM event directly. This is accessible through | |
// the Renderer. | |
this.internalWorld.sumerianRunner.renderer.domElement.addEventListener('touchend', performHitTestCallback); | |
// Phones use touch events. To also develop / test on a PC (or on | |
// a mobile device with a mouse attached), you can also register for | |
// mouse events. | |
//this.internalWorld.sumerianRunner.renderer.domElement.addEventListener('mouseup', performHitTestCallback); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment