src/ar-scene.js
/**
 * The render loop, called once per frame. Handles updating
 * our scene and rendering.
 */
The render loop, called once per frame. Handles updating
our scene and rendering.
The render loop called once per frame . Handles updating our scene and rendering .
function update(renderer, arView, camera, vrControls, scene, vrDisplay) {
  renderer.clearColor();
  arView.render();
  camera.updateProjectionMatrix();
  vrControls.update();
  renderer.clearDepth();
  renderer.render(scene, camera);
  vrDisplay.requestAnimationFrame(update.bind(
    null,
    renderer,
    arView,
    camera,
    vrControls,
    scene,
    vrDisplay,
  ));
}
function update ( renderer , arView , camera , vrControls , scene , vrDisplay ) { renderer . clearColor ( ) ; arView . render ( ) ; camera . updateProjectionMatrix ( ) ; vrControls . update ( ) ; renderer . clearDepth ( ) ; renderer . render ( scene , camera ) ; vrDisplay . requestAnimationFrame ( update . bind ( null , renderer , arView , camera , vrControls , scene , vrDisplay , ) ) ; }
The render loop, called once per frame.
The render loop called once per frame .
// Clears color from the frame before rendering the camera (arView) or scene. // Render the device's camera stream on screen first of all. // It allows to get the right pose synchronized with the right frame. // Update our camera projection matrix in the event that // the near or far planes have updated // Update our perspective camera's positioning // Render our three.js virtual scene // Kick off the requestAnimationFrame to call this function // when a new VRDisplay frame is rendered