Skip to content

Instantly share code, notes, and snippets.

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

  • Save fcor/7698a77d942ae20c6f54b919eac46a60 to your computer and use it in GitHub Desktop.

Select an option

Save fcor/7698a77d942ae20c6f54b919eac46a60 to your computer and use it in GitHub Desktop.
Handle Rotation using gestures on AR.js
handleRotation(event) {
if (isMarkerVisible) {
el.object3D.rotation.y +=
event.detail.positionChange.x * rotationFactor;
el.object3D.rotation.x +=
event.detail.positionChange.y * rotationFactor;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment