How to limit x axis rotation

It is the same:

	// How far you can orbit vertically, upper and lower limits.
	// Range is 0 to Math.PI radians.
	controls.minPolarAngle = 0; // radians
	controls.maxPolarAngle = Math.PI; // radians

	// How far you can orbit horizontally, upper and lower limits.
	// If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ].
	controls.minAzimuthAngle = - Infinity; // radians
	controls.maxAzimuthAngle = Infinity; // radians