Jose
Jose
I'm using A-Frame 0.6.0 and it's working with A-Kojic's suggestion.
@arpit2050 That's been the problem. It seems that the code that is correct comes from npm.
@TitikshaDaga Yes the CDN isn't working. What we've done is to download the package via npm and add it to our .js file.
@TitikshaDaga Sure! Ask me anything. First step: Install it with NPM `npm install aframe-click-drag-component` Second, you have to import it using Webpack or Browserify: `import registerClickDrag from 'aframe-click-drag-component'; ` Third:...
@TitikshaDga: In home.ts, don't include A-Frame, since you're already loading it from the center Do the following: home.ts `import registerClickDrag from 'aframe-click-drag-component'; registerClickDrag(window.AFRAME);
(I'm sorry. I'm on mobile right now. It's not center it's CDN)
Try: import registerClickDrag from 'aframe-click-drag-component'; document.addEventListener('DOMContentLoaded', () => { registerClickDrag(window.AFRAME); } OR: import registerClickDrag from 'aframe-click-drag-component'; document.addEventListener('loaded', () => { registerClickDrag(window.AFRAME); }
@TitikshaDaga Are you including home.ts after A-Frame is loaded?
Include it before the closing body tag: //index.html ` //home.html
:/. The body tags just go stripped. (I'm still on mobile). Include the home.js file before the closing body tag in index.html