I am having trouble smoothing out/optimizing my animations for a large mesh scene. I looked at the Optimizing your Scene doc and it mentioned using scene.getAnimationRatio() but that’s all it said, not how or where to use it.
I looked at some playground examples and I’m a bit confused as to when and where to use it, and also what it returns. I understands that it returns 1 for 60fps, but it then returns higher if you are running below 60fps? I also saw examples where the scene.getAnimationRatio() was multiplied by .003 and .001, for instance.
If I want to smooth out my animations, I’m a bit confused as to whether I should apply it to the frameRate in the Animation() constructor as such:
this.animCameraRotation = new Animation(
‘animCameraRotation’,
‘rotation’,
60 * this.scene.getAnimationRatio(),
Animation.ANIMATIONTYPE_VECTOR3,
Animation.ANIMATIONLOOPMODE_CONSTANT
);
or to the speedRatio as such (does speedRatio get multiplied with the frameRate to speed it up? Where does speed Ratio come in?):
this.scene.beginDirectAnimation(
this.arcCamera,
this.arcCamera.animations,
0,
100,
false,
2 * this.scene.getAnimationRatio(),
() => {
});
Or would I multiply the total frames by it
(ie frame: 0 → frame: 180 * this.scene.getAnimationRatio())
Or would I multiply it to a combination of both or all?
Basically, if I want to have my camera move from point A to point B, but have the animation be smoothed and optimized based on the current frame rate of the device, how should I set the Animation up?
I feel like I am taking up forum space with this simple question, but I’m having a difficult time searching the docs and examples to delineate between some of these attributes and how they affect the smoothness of the animation. Many examples do it differently.
Thanks in advance!