var xpos = 8, maxPos = -200, start = 200;
const newPosition = object.position.x - xpos; //object это три д модель
if (newPosition < maxPos) {
object.position.x = start;
}
else {
object.position.x = newPosition;
}