Fixes #12831

Include a new example in the viewport API doc.
Merge pull request #12843 from DeviaVir/patch-1

Fixes #12831