title: Move Camera Along Path Based On Scroll Position In Embedded Aframe.io Scene
body: <p>I've had trouble finding a solution for this in Aframe because I guess it’s an odd use case. I'm wanting to make an embedded Aframe scene as the background of a webpage and have the camera animate along a path as a user scrolls down the page.</p>
  <p>I've created a scene, animated the camera movement using the alongpath component and have fixed it as the background of a webpage, but I cannot figure out what I need to do to pair scroll position to the camera path. I'm attaching a video of the scene I currently have with the animation path.</p>
  <p>I did manage to connect in to the camera controls from some JS on a demo page here. <a href="https://robbiegreen.com/hq/" rel="nofollow noreferrer">https://robbiegreen.com/hq/</a> I honestly have no idea how I pulled that off. It’s only controlling the Z position though. Sorry in advance for the bloat, I’m testing part of it on Elementor + WP install that I need to clean up, but I’m building scenes and such locally. Here is a glitch of what I have:</p>
  <p><a href="https://glitch.com/edit/#!/aframe-alongpath-scroll" rel="nofollow noreferrer">https://glitch.com/edit/#!/aframe-alongpath-scroll</a></p>
  <p>This is a good example at what I would love to do: <a href="https://codepen.io/motionharvest/pen/WNQYJyM" rel="nofollow noreferrer">https://codepen.io/motionharvest/pen/WNQYJyM</a> <code>&lt;HTML&gt;</code></p>
  <p>I love stuff I’ve seen in three.js but Aframe is so much more approachable even if it’s not the exact use case. I’m in way over my head when it comes to JS or anything programming related. I feel like I’m slowly starting to grasp at a few straws though.</p>