Hey, I’m totally new to Babylon.js and at the moment I’m just trying to get the Viewer to load a model and auto-play the animation, using pure js. I’ve been trying to dig around the documents and API but can’t find a complete list of methods and properties for the Viewer.
For instance, what are all the options for the initial configuration of the viewer when initialising via JS (Configuring The Viewer - Babylon.js Documentation)? Also, how do I apply a my configuration to the viewer during initialisation?
I’m not quite sure about all the options; there might not be a place where that’s exhaustively documented, so unfortunately you might need to read the interface definition for a list of all the options. As for how to auto-play examples, there is a demo about that:
It doesn’t use pure JS, but the approach should be similar. The link for the live animation example appears to be broken, so I’ll put up a PR to fix that in a moment. For now, though, here’s the link to the live demo of the example:
Haven’t tried it myself, but from the code it looks like you can pass a ViewerConfiguration object as an optional constructor argument. Does that work?
The interface definition source is helpful, thanks. Seems like there isn’t a contructor argument to auto-play the model animation? I’m looking for a JS equivalent of <animation auto-start="true"></animation> as in the UFO example.