It used structured light: project a static pattern of infrared dots and then measure parallax using an infrared camera a couple inches from the projector to calculate depth. It worked well, but can't be miniaturized as it relies on a large offset between projector and camera. Orbbec make similar cameras today, e.g. https://orbbec3d.com/product-astra-pro
Modern depth cameras, like the LiDAR Scanner in iPhones and iPads, use a different technique: time-of-flight (ToF), which shoots laser pulses and measures the time taken to reflect back to infer depth. Apple leads the field here, because they're the first to integrate a "direct" ToF sensor into mobile devices, which has a number of advantages over the "continuous wave" ToF found in Android phones.