How to just lock the mouse?

In the example for mouse pointer lock, it uses controls as well, which confuses me. I want the lock only, not the movement. code: `

Cave Game const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement);
  const texture = new THREE.TextureLoader().load("grass.jpg");
  const geometry = new THREE.BoxGeometry();
  const material = new THREE.MeshBasicMaterial({ map: texture });
  const cube = new THREE.Mesh(geometry, material);
  scene.add(cube);

  camera.position.z = 5;
  camera.position.y = 2;

  const animate = function () {
    requestAnimationFrame(animate);

    renderer.render(scene, camera);
  };
  animate();
</script>
`

You don’t really need three or any controls to do that - there’s a Pointer Lock API built into the browser.