resetView()

This function resets the camera view to the initial state.


Parameters:

  • action: "resetView"

Example

<div class="vrxs-embed-wrapper">
  <iframe id="vrxsIframe"
          src="https://viewer.vrxs.de/embedded-model/ModelID?autoplay=true&controls=false&btn_start=false&enable_viewer_api=true"
          frameborder="0" allow="fullscreen" mozallowfullscreen="true" webkitallowfullscreen="true">

  </iframe>
</div>

<script type="text/javascript">
  const iframe = document.getElementById("vrxsIframe").contentWindow;

  function resetView() {
    iframe.postMessage({action: "resetView"}, "*");
  }

</script>
<button onclick="resetView()">
  Reset View
</button>