Is it possible to change the background color of the scene from the gui controls?

Yes, it is. Try it like in the following fiddle: https://jsfiddle.net/dwe0cxfz/

Full code:

let camera, scene, renderer;

const params = {
  color: '#ffffff'
};

init();
animate();

function init() {

  camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.01, 10);
  camera.position.z = 1;

  scene = new THREE.Scene();
  scene.background = new THREE.Color( params.color );

  renderer = new THREE.WebGLRenderer();
  renderer.setSize(window.innerWidth, window.innerHeight);
  document.body.appendChild(renderer.domElement);

  const gui = new dat.GUI();
  gui.addColor(params, 'color').onChange(function(value) {

    scene.background.set( value );

  });

}

function animate() {

  requestAnimationFrame(animate);
  renderer.render(scene, camera);

}
1 Like

thank you very much now it works !