White-light interferometry is an established and proven method for precise measurement of the shape of objects. Shape of objects with both smooth and rough surface can be measured. However, white-light interferometry suffers from some limitations. One of them is that the measured object must be mechanically moved relative to the measuring device during the measurement. We present an optical 3D sensor based on white-light interferometry that can measure the shape of objects without the mechanical movement of the object. Instead of the object, the reference plane moves and scans the shape of the object. A part of the imaging system is an electrically tunable lens that ensures that the measured part of the object is sharply imaged during the whole measuring procedure. The movement of the reference plane is done by the movement of reference mirror or by use of fiber optic modulation interferometer.