There is no need to include the Babylon Viewer script, since you’re creating your own viewer anyway. Your code structure could be simplified too, to ensure that everything is running when supposed to. I recommend checking out the code structure here: Getting Started - Chapter 1 - Setup Your First Web App | Babylon.js Documentation (babylonjs.com)