applyLookTo method

void applyLookTo(
  1. Scene scene
)

Applies the environment, sky, exposure, and tone mapping to scene.

Implementation

void applyLookTo(Scene scene) {
  // A sky-lit look has no static [environment]; its sky bakes the scene
  // environment over the next frames. Keep the previously baked environment
  // until then, so re-applying a sky-lit look (an editor edit, or the volume
  // blend each frame) does not briefly drop to the default environment.
  if (environment != null || skyEnvironment == null) {
    scene.environment = environment;
  }
  scene.skybox = skybox;
  scene.skyEnvironment = skyEnvironment;
  scene.sunLight = sunLight;
  scene.toneMapping = toneMapping;
  scene.agxWhite = agxWhite;
  scene.agxContrast = agxContrast;
  scene.environmentIntensity = environmentIntensity;
  scene.environmentTransform.setFrom(environmentTransform);
  scene.exposure = exposure;
}