Hello there,
I am developing a Javascript app using ArcGIS Online JSAPI 4.13 on latest version of Chrome browser. I have a polyline drawn on 3D scene view, i would animate the view around the line in bird eyes view mode. I have done it with view.goTo(target, options) easily but debugging on Chrome showing some render performance issues that fps gets very low. So I switched to try out to control the camera manually, I see the FPS got better if in case I don't reset the view center at every requestAnimationFrame loop but in such situation the animation gone undetermined, if I do reset the view center to target point the view animated as expected. See my code snippet below.
I have 3 questions would like to ask:
1. Is this true the view.goTo(target, options) will slow down render FPS in comparison with props.view.camera manually update?
2. Why reset view center at every animation frame causing FPS dropped? and this leads to the third question
3. Why do I need to update the view center at every animation loop in order to get animated view as expected, isn't camera's heading, tilt, position update enough to calculate view perspective?
Any hint would be much appreciated, I got stuck on this few days
Thanks
Yen
Solved! Go to Solution.
Hi Yen,
view.goTo should not be slower than manually updating the camera. Could you please provide a sample app to demonstrate this problem?
Generally it is expected that Chrome will state 60 fps while the view stays the same since nothing (new) is rendered. As soon as the view is changed a FPS drop is expected depending on your machine's capacity since now every frame actually needs to be rendered.
Best,
Veronika
Hi Yen,
view.goTo should not be slower than manually updating the camera. Could you please provide a sample app to demonstrate this problem?
Generally it is expected that Chrome will state 60 fps while the view stays the same since nothing (new) is rendered. As soon as the view is changed a FPS drop is expected depending on your machine's capacity since now every frame actually needs to be rendered.
Best,
Veronika
Thank Veronika for the answer. It helped me to finger out the problem neither because of camera update nor view.goto, indeed the cumulated polyline graphic rendering frames overtime caused FPS dropped.