update method

dynamic update(
  1. dynamic renderer,
  2. dynamic scene
)

Implementation

update(renderer, scene) {
  if (parent == null) updateMatrixWorld(false);

  var currentRenderTarget = renderer.getRenderTarget();
		var currentToneMapping = renderer.toneMapping;
		var currentXrEnabled = renderer.xr.enabled;

		renderer.toneMapping = NoToneMapping;
  renderer.xr.enabled = false;

  var generateMipmaps = renderTarget.texture.generateMipmaps;

  renderTarget.texture.generateMipmaps = false;

  renderer.setRenderTarget(renderTarget, 0);
  renderer.render(scene, cameraPX);

  renderer.setRenderTarget(renderTarget, 1);
  renderer.render(scene, cameraNX);

  renderer.setRenderTarget(renderTarget, 2);
  renderer.render(scene, cameraPY);

  renderer.setRenderTarget(renderTarget, 3);
  renderer.render(scene, cameraNY);

  renderer.setRenderTarget(renderTarget, 4);
  renderer.render(scene, cameraPZ);

  renderTarget.texture.generateMipmaps = generateMipmaps;

  renderer.setRenderTarget(renderTarget, 5);
  renderer.render(scene, cameraNZ);

  renderer.setRenderTarget(currentRenderTarget);

		renderer.toneMapping = currentToneMapping;
  renderer.xr.enabled = currentXrEnabled;

  renderTarget.texture.needsPMREMUpdate = true;
}