I've been diving into three.js and came across an interesting example. The developer starts by creating a canvas element and then connects the renderer to that specific canvas.
<canvas id="c">
</canvas>
const renderer = new THREE.WebGLRenderer({canvas});
Next, the developer grabs the canvas element and saves it as a variable using canvas = renderer.domElement;
Can someone explain the distinction between canvas.width
and canvas.clientWidth
for me?