So I’m working on a pretty simply (in terms of functionality) app that just loads a model and places a UniversalCamera in it to move around. The user can switch between the universal camera and arc rotate camera to get different views of the model. I have collision detection and a height constraint that updates the universal camera each frame to make sure the camera stays at the same height when moving around. I disabled these functions for the purpose of comparison with the babylon sandbox. Otherwise, I have no post processes in my code, and only have a directional light and HDR image for lighting. I have the same exact setup in the sandbox (the default sandbox lighting and environment setup, plus an added directional light in the sandbox).
I added a freecamera into the sandbox and am moving around and noticed that the frame rate and performance seems to be SIGNIFICANTLY better in the sandbox than in my app. I can’t seem to find anything in my code that blatantly gets called each frame to otherwise hinder performance.
I’ve been trying to dig into the sandbox code to find out how its set up but it seems to be just a UI container for the Inspector. Where should I look to find the code that runs the sandbox? The Inspector? The engine functions called by the inspector?
Basically, does the sandbox perform any scene optimizations by default? I’m trying to figure out what settings I may be missing/that I might have set in a superfluous manner that would affect performance. Thanks!
FYI. I’m using the same device and same browser (chrome) and same model and lighting for comparison between my app and the sandbox.