Created
July 29, 2019 16:12
-
-
Save andijakl/1ed4150b39ddd3ea1e480d45806358cd to your computer and use it in GitHub Desktop.
Check for AR platform support with the internal ArSystem class of 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
// Amazon Sumerian AR System | |
// ------------------------------------------------------------------- | |
// Retrieve the ArSystem of Amazon Sumerian. Note that this is only | |
// available if running on a platform that supports AR. | |
// So, you can't really test your code on the PC. | |
this.arSystem = this.internalWorld.getSystem('ArSystem'); | |
if (!this.arSystem) { | |
// No AR system is found - cancel further initialization. | |
// This usually happens on the computer so far. For testing, | |
// you can remove the return statement and continue execution | |
// to get a bit farther. | |
console.log("No AR system found"); | |
return; | |
} | |
console.log("Initializing AR anchoring"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment