Skip to content

Instantly share code, notes, and snippets.

@kalwalt
Created December 8, 2024 18:19
Show Gist options
  • Select an option

  • Save kalwalt/dd57b4d248beb5a273165f65ad086594 to your computer and use it in GitHub Desktop.

Select an option

Save kalwalt/dd57b4d248beb5a273165f65ad086594 to your computer and use it in GitHub Desktop.
marker basic example with the aframe-ar module lib
<!DOCTYPE html>
<html>
<script type="importmap">
{
"imports": {
"aframe": "https://aframe.io/releases/1.6.0/aframe.min.js",
"aframe-ar": "https://raw.githack.com/AR-js-org/AR.js/features-upgrade-three.js/aframe/build/aframe-ar.module.js"
}
}
</script>
<body style="margin : 0px; overflow: hidden;">
<script type="module">
import "aframe";
import "aframe-ar";
</script>
<a-scene embedded arjs>
<a-marker preset="hiro">
<a-entity
position="0 0 0"
rotation="0 0 0"
scale="0.05 0.05 0.05"
gltf-model="../image-tracking/nft/trex/scene.gltf"
></a-entity>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment