Created
August 8, 2019 11:18
-
-
Save andijakl/ae0c3e2ff1e971760080d6a98cf8bd4f to your computer and use it in GitHub Desktop.
Remove the event listener for the touch event in 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
// Cleanup. When this script stops, also remove the event listeners. | |
// This is especially important here, as Sumerian doesn't always reliably | |
// clean up all the runtime-registrations when you repeatedly start the scene. | |
ctx.onStop( | |
() => { | |
console.log("Removing touch event listener."); | |
this.internalWorld.sumerianRunner.renderer.domElement.removeEventListener('touchend', performHitTestCallback); | |
// For testing on the PC with a mouse | |
//this.internalWorld.sumerianRunner.renderer.domElement.removeEventListener('mouseup', performHitTestCallback); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment