The code works when executed from the URL box on the page where the Verge3D app is iframed in.
I tried using the Open Web Page (in the same tab, parent frame) puzzle without success.
Status update: I have now solved this issue.
Apparently, the verge3d app must be hosted in the same origin site as the parent page.
How i did it: I hosted the verge3D app on our Azure server (where the website is hosted) and used that as the source for the iframe.
Test your math:
Log in / Register