Created
March 22, 2020 18:27
-
-
Save kalwalt/10a9e7f46a92dd4f07a0afbfd34c0cb5 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>artoolkit-js example</title> | |
<script src="../dist/ARToolkit.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.addEventListener('load', () => { | |
console.log('init ARToolkit...'); | |
console.log(ARToolkit); | |
var ar = new ARToolkit.ARToolkit(); | |
ar.init() | |
.then(_ => { | |
return artoolkit.loadCamera('../data/camera_para.dat'); | |
}) | |
.then(cameraId => { | |
console.log('Got camera ID', cameraId); | |
}) | |
.catch(err => { | |
console.log('Something went wrong', err); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A simple web example for https://github.com/andypotato/artoolkit5-js Inside the artoolkit5-js create a examples folder and put this example. You need also the file
camera_para.dat
from jsartoolkit5.