menu

πŸ‘©β€πŸš€ <model-viewer>

Archive of discussions about <model-viewer>, now replaced by https://github.com/google/model-viewer/discussions

Channels
Team

Uncaught TypeError: Cannot set property 'MinimumRenderScale' of undefined

November 19, 2020 at 10:02pm

Uncaught TypeError: Cannot set property 'MinimumRenderScale' of undefined

November 19, 2020 at 10:02pm
Hi, I am having trouble with setting the static property 'MinimumRenderScale' to 1. I have tried the variations of = 1 (1) '1' Nothing seems to be changing the outcome, I get an error stating "Uncaught TypeError: Cannot set property 'MinimumRenderScale' of undefined". Please help me
My code is this:
<html> <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<script> const ModelViewerElement = customElements.get('model-viewer'); ModelViewerElement.minimumRenderScale = '1'; </script>
</html>

November 19, 2020 at 11:43pm
Hello I am happy to report that I have fixed my issue. My iframe needed this at the start of it: <meta name="viewport">
like-fill
1
  • reply
  • like