<a-entity
  id="audioAnalyser"
  bind__audioanalyser="beatDetectionThrottle: menuActive && 5000 || 1000"
  audioanalyser="src: #introSong; fftSize: 64; enableBeatDetection: true; enableLevels: false; enableWaveform: false; beatDetectionThrottle: 5000; unique: true"
  proxy-event="event: audioanalyserbeat; to: #logolight"></a-entity>

<a-entity id="stage">
  <a-entity
    id="audioColumns"
    audio-columns="analyser: #audioAnalyser; height: 28; mirror: 18; scale: 9; thickness: 0.6; separation: 0.55"
    position="0 -19 5"></a-entity>

  <a-entity
    id="stageObj"
    mixin="gameoverAnimation"
    obj-model="obj: #stageNormalObj"
    materials="name: stageNormal"></a-entity>

  <!-- Lasers left. -->
  <a-entity id="leftStageLasers" bind__stage-lasers="enabled: isPlaying">
    <a-entity obj-model="obj: #leftLaserObj" materials="name: stageAdditive" position="-6 2.3 -41"></a-entity>
    <a-entity obj-model="obj: #leftLaserObj" materials="name: stageAdditive" position="-10 0 -40"></a-entity>
    <a-entity obj-model="obj: #leftLaserObj" materials="name: stageAdditive" position="-14 -3 -39"></a-entity>
  </a-entity>

  <!-- Lasers right. -->
  <a-entity id="rightStageLasers" bind__stage-lasers="enabled: isPlaying">
    <a-entity obj-model="obj: #rightLaserObj" materials="name: stageAdditive" position="6 4 -38"></a-entity>
    <a-entity obj-model="obj: #rightLaserObj" materials="name: stageAdditive" position="10 2 -37"></a-entity>
    <a-entity obj-model="obj: #rightLaserObj" materials="name: stageAdditive" position="14 -1.5 -36"></a-entity>
  </a-entity>

  <a-entity id="twister" position="0 0 -35" rotation="90 0 0" bind__twister="enabled: isPlaying"></a-entity>

  <a-entity
    id="stageadditiveobj"
    obj-model="obj: #stageAdditiveObj"
    materials="name: stageAdditive"></a-entity>

  <a-entity id="beams" bind__beams="isPlaying: isPlaying"></a-entity>

  <a-entity
    id="smoke"
    mixin="gameoverAnimation"
    animation__gameover="property: components.material.material.opacity; to: 0; startEvents: gameoverDISABLE"
    animation__rotate="property: rotation; to: 0 360 0; easing: linear; loop: true; dur: 200000"
    obj-model="obj: #smokeObj"
    material="src: #atlasImg; shader: flat; transparent: true; depthWrite: false"
    position="0 1.4 0"></a-entity>

  <a-entity light="type: directional; intensity: 3" position="0 10 10"></a-entity>

  <a-entity id="logo" bind__visible="menuActive || isVictory" position="0 6 -7.5" rotation="90 0 0">
    <a-entity id="logoGodraysObj" obj-model="obj: #logoGodraysObj" materials="name: logoadditive"></a-entity>
    <!-- <a-entity id="logoBody" obj-model="obj: #logoObj" materials="name: logo"></a-entity> -->
    <!-- <a-entity id="logoFrontU" obj-model="obj: #logofrontUObj" materials="name: logo" logoflicker="delay: 1200" bind__logoflicker="active: menuActive || isVictory"></a-entity> -->
    <a-entity id="logoGlowObj" obj-model="obj: #logoGlowObj" materials="name: logoadditive"></a-entity>
  </a-entity>

  <a-entity id="logosparks" bind__visible="menuActive || isVictory" particleplayer="src: #logoSparksJSON; scale: 1.4; pscale: 0.35; count: 10; interpolate: true; dur: 1000; on: logoflicker; animateScale: true; initialScale: 1.5 1.5 1.5; finalScale: 0.3 0.3 0.3" position="-2.8 5.5 -7.2"></a-entity>

  <a-entity
    id="floor"
    data-saber-particles
    geometry="primitive: plane; width: 3; height: 3"
    rotation="-90 0 0"
    material="shader: floorShader; normalMap: #floorNormalsImg; envMap: #floorEnvImg; hitLeft: -999 0 0; hitRight: -999 0 0"
    raycastable-game
    stepback></a-entity>

  <a-entity
    id="songProgressRing"
    bind__song-progress-ring="enabled: isPlaying && challenge.isBeatsPreloaded"
    bind__visible="isPlaying && challenge.isBeatsPreloaded"
    geometry="primitive: plane; width: 0.1; height: 0.1"
    material="shader: ring; progress: 0; transparent: true; radiusInner: 0.5; color: #ABABAB"
    position="0 0.1 -1.5"
    rotation="-45 0 0">
  </a-entity>
</a-entity>
