Babylonjs Viewer without navbar

Hi, I wanted to have clean and nice viewer by excluding navbar. How I can achieve this? because I did not find any documentation on it. I can hide logo and hide some buttons in the navabr. But I don’t want to use navbar and to extend it. just clean viewer nothing else.
Currently , I’m using this

<babylon
      model.title="titleOfFile"
      model.url="urlOfFile"
      templates.viewer.params.enable-drag-and-drop="true"
      templates.nav-bar="null/false/hide"
    >
    </babylon>

templates.nav-bar=“null/false/hide” nothing is working… when I changed this to templates.nav-bar.html="" then the navi is gone but my model is not being showed up.
Kindly help me in this regard. so that I can get rid of navbar without disturbing model perfectly

What you can do is set the navbar html to nothing. This way it will not be rendered:

<babylon
      model.title="titleOfFile"
      model.url="urlOfFile"
      templates.viewer.params.enable-drag-and-drop="true"
      templates.nav-bar.html="<div/>"
    >
    </babylon>

A Pen by Raanan Weber (codepen.io)

2 Likes

Thanks. One quick question… how we can use tag
<clear-color r="0" g="0" b="0"></clear-color>
as attribute? in <babylon>