Yoni Binstock
Yoni Binstock

Reputation: 241

Getting 'Cannot read property 'slice' of undefined' while using GLTF models with aframe-ar.js

I've used 2D images fine to appear and without any errors in the console, but when attempting to use a gltf model, nothing shows up and I get the following error 'Cannot read property 'slice' of undefined at aframe.min.js:121'.

This is where I got the model - https://sketchfab.com/models/294e79652f494130ad2ab00a13fdbafd

And this is the documentation I was trying to follow - https://aframe.io/blog/arjs/

<html>
<head>
  <meta aframe-injected="" name="viewport"
        content="width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui">
  <meta name="apple-mobile-web-app-capable" content="yes">


  <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>

  <script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script>


</head>

<body>
<a-scene embedded arjs>

  <a-assets>

    <a-asset-item id="drone" src="busterDrone/busterDrone.gltf"></a-asset-item>

  </a-assets>


  <a-marker preset="hiro">

    <!--why doesn't this work?-->
    <a-entity gltf-model="#drone"></a-entity>

</a-marker>


</a-scene>


</body>
</html>

Upvotes: 2

Views: 806

Answers (1)

Jerome Etienne
Jerome Etienne

Reputation: 387

this seems related to a-frame more than AR.js

Upvotes: 1

Related Questions