3D Camera based on linear-mode gain-modulated avalanche photodiodes