1. A video projector device, comprising: a light source; a driver which drives the light source; an optical component which projects visible light from the light source in a field of view; a sensor which senses visible light, the sensor comprises a plurality of pixels; and at least one control circuit associated with the driver and the sensor, the at least one control circuit: to project a frame of pixel data on an object in a frame period, divides the frame period into multiple sub-frames including a gated sub-frame, and causes the video projector device to operate in a projection and sensing mode followed by a projection-only mode, without sensing, during the gated sub-frame, to provide the projection and sensing mode: causes the driver to drive the light source in a pulsed mode in which the light source emits pulses of visible light while causing the sensor to operate in a gated mode so that the plurality of pixels integrate charge from reflections of the pulses of visible light from the object, to provide the projection-only mode, without sensing: causes the driver to drive the light source in a continuous mode in which the light source emits continuous visible light while reading out an integrated charge from the plurality of pixels to obtain light intensity values, and derives depth data regarding the object in the field of view based on the light intensity values, using a time-of-flight principle.