Fix ar-hit-test component not working since A-Frame 1.6.0 #5680
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Description:
Testing on https://aframe-xr-starterkit.glitch.me/ AR mode where we had the shadow of the piano in A-Frame 1.5.0
with a message at the bottom "Scanning environment, finding surface."
It doesn't work since A-Frame 1.6.0 because of commit 77af389 that changed the order of setting the
ar-modestate so that particular check in thear-hit-testcomponentaframe/src/components/scene/ar-hit-test.js
Lines 273 to 275 in 388eb8c
broke because
ar-modestate is not set at the time thissessionstartlistener is called.Changes proposed:
The fix is here to change
this.el.sceneEl.renderer.xr.addEventListener('sessionstart'to
this.el.addEventListener('enter-vr'similar to what we do in the
reflectionorhide-on-enter-arcomponents.