The DOMPointReadOnly interface's z property holds the depth coordinate, z, for a read-only point in space.
DOMPointReadOnly
z
MDN Reference