So my code for the renderer is:
renderer = new THREE.WebGLRenderer({ antialias: true, canvas: drawingSurface, alpha: false });
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.render(scene, camera);
The code for the loader is
var loader = new THREE.GLTFLoader();
loader.load( 'models/desk colorised.gltf', function ( gltf ) {
gltf.scene.scale.set( 2, 2, 2 );
scene.add( gltf.scene );
}, undefined, function ( error ) {
console.error( error );
} );
and then I am adding the ambient light as such:
function addLight(){
var ambientLight = new THREE.AmbientLight( 0xcccccc );
scene.add( ambientLight );
};
Now it seems to work when the the light is DirectionalLight but not when AmbientLight - it just gives a black object.
Thanks