Skip to content

Instantly share code, notes, and snippets.

@andijakl
Created July 29, 2019 16:12
Show Gist options
  • Save andijakl/1ed4150b39ddd3ea1e480d45806358cd to your computer and use it in GitHub Desktop.
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
// 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