Skip to content

Instantly share code, notes, and snippets.

@fcor
Created June 2, 2020 23:30
Show Gist options
  • Select an option

  • Save fcor/461913f39aa8e420df6019ac5bedc4b6 to your computer and use it in GitHub Desktop.

Select an option

Save fcor/461913f39aa8e420df6019ac5bedc4b6 to your computer and use it in GitHub Desktop.
AR.js NFT gestures
<a-scene
arjs="trackingMethod: best; sourceType: webcam; debugUIEnabled: false;"
embedded
renderer="logarithmicDepthBuffer: true;"
vr-mode-ui="enabled: false"
gesture-detector
id="scene"
>
<a-nft
type="nft"
url="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/trex-image/trex"
smooth="true"
smoothCount="10"
smoothTolerance=".01"
smoothThreshold="5"
raycaster="objects: .clickable"
emitevents="true"
cursor="fuse: false; rayOrigin: mouse;"
>
<a-entity
gltf-model="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
scale="5 5 5"
position="50 150 0"
class="clickable"
gesture-handler="minScale: 0.25; maxScale: 10"
>
</a-entity>
</a-nft>
<a-entity camera></a-entity>
</a-scene>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment