Showing 3D object with WebGL

I am using WebGL inside a javascript to display a 3D object. On the page you can select the object to be displayed, among several available options and when selecting one, it appears rotating in 3D.
When successively selecting the different objects available to display, they are always displayed correctly, but the problem is that each time a new object is selected, it rotates a little faster than the previous one.
I would need the initial speed, which is correct, to be maintained instead of increasing.
The code I use to display the selected object is this:

   var ps;

   cam = new OrbitCam({closest:5, farthest:100, distance: 20});
   cam.setOrbitPoint([0,0,0]);

   ps = new PointStream();
   ps.setup(document.getElementById('canvas') ,{preserveDrawingBuffer:false});
  
  ps.background([0, 0, 0, 0.8]);
  ps.pointSize(3);
  ps.onRender = render;
  ps.onMouseScroll = zoom;
  ps.onMousePressed = mousePressed;
  ps.onMouseReleased = mouseReleased;

What is missing or incorrect in this code so that the speed is always the same?

Not much to go on, so I’d say everything is missing and there’s no way of determining what is wrong with the code. Is it a puzzle?

The code is made up of small functions that call each other and are distributed in several files, so including all the code here would make the message very extensive and heavy to read. I have included only the code that draws the 3D object.
I have not written this code. I’m just trying to fix the problem that I have commented.
Is there any way to set a rotation speed value of the 3D object every time the code I attached is executed?
Where should the speed be set? In the call to OrbitCam, setOrbitPoint or PointStream?
I appreciate any help, as I have no experience with WebGL

But these things are just classes that someone has written to abstract over an abstraction (ThreeJS) over WebGL. This isn’t some standard JS code using raw WebGL APIs, this is code using plugin libraries for libraries that sit in front on WebGL to make it easier to work with. What do the OrbitCam and PointStream classes do? How do they work? How do they interact?