Fixes #12831

Include a new example in the viewport API doc.