How to limit x axis rotation

Here is my pen…I can limit vertical rotation but cannot limit horizontal rotation…how can I do that?

Also I want to add control about camera move up and down…I saw a script about it…They call that movement pedestal…In my script users can make pan with two fingers but cannot make up/down camera move…

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

makc3d it is ok…thanks

what about camera pedestal movement? with two fingers on mobile or mouseRightButton I can make pan…but cannot move my cam up and down with same behavior…