Animation gets stuck in RequestRenderMode
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
Link to [Sandcastle](https://sandcastle.cesium.com/#c=lVRNc9owEP0rCidn6ojQTA4xhDYh6cdMO8kEppc6B1laQBNZciUZSjr5713JxiWUQ8uBYXff2337IbjRzpOVhDVYckk0rMkEnKxL+i36krzHoz0x2jOpwea9lPzKNSEWftTg/ANoAfarEZARb2vI9cvxMNe5bpJSx0EDFVDUi+nSrD9YVoK7BzsFbrTAmoEUCQo84YqVFTrnTLngDT63ZtW9cdJLo3dCueZRfGXcAN2t7AmzHn8xfUbn1pQ3sLAA7spatvkEcrH0Lvl+cnFBz1NydpqSwSl+UnIyCN/BcfoY1HeZ3/5n5i7PXuJQL7oej3ekKxwoFmgnBdpjj+AoEyKJI66M2gRM1kw8OJoxuCy2nTbetRR+mZHz1iyZByuZyjrlRhlLH25vWkAc8sx8tKbWImvMGHpJu+3lesq04Mx5BUHQzBhVMHtde280XsXMLBYKyCRwpV6Eq5jXmscdJceN3u0yj+KPYXCFbui2LfpKCAK3uKjhn+pv7+Jg/b3DOdq1D6jphovYV9R3zSU0Mx92I2p2yJm+0jLMHGnC8LrEPVJuAT23CoKFcoVc5b1A6xAL8G34evNZIMQ3HSKMsqrCVzVZSiWSP/mbqu1On7ThT6aOee4KB3bFCgVJe0pcYTS84PAuVUrwFXdpQgFXF45bWSCBqRqVj9uNdSjq4acPjx4FYmN5b8I0aWMZmuQNidTh/nt/NqacmWTvpgOkl/ZGzm8UjJszJOS9LCtjPamtSijteygrhfldv6j5E+AUXSQG6Ki/Sx3hPIkUlwf+ncIROYeRea3UVD5jv+NRH/F/UZVhAk/3bgVWsU2ALQfjL42TUjrqo3mY2a3qVfw3)

### Preconditions:
- requestRenderMode is set to `true`,
- the clock is not animating,
- terrain is loaded
Noticed in an application built on version 1.53 and verified in version 1.70
### Description:
When the property of the entity changes, it is not possible to start the animation before a new frame has been rendered, as `viewer.clockViewModel.canAnimate` is set to `false` (see the text display below the toolbar).
The frozen state ends (and visualization updates) if
- the camera is moved,
- a different time is selected via clicking on the timeline,
- `requestRender()` is called
but *not* by clicking on the "play" button.
This does not happen, if the clock is already animating while changing state.
I have checked this for `clampToGround` and `position` (see example), but I guess this might hold for any change of state?
Is this intended behaviour?
Of course, calling `requestRender()` when updating an entity is mandatory for static visualization anyway, but I noticed this when playing around with entities in the console and clicked the animation button, instead of calling the function.
Contributor guide
Research direction
Start with the linked Sandcastle reproduction and inspect the RequestRenderMode handling around viewer.clockViewModel.canAnimate, entity changes, and the play button. Reproduce the frozen state with a non-animating clock and terrain loaded; done when clicking play starts animation and updates visualization without requiring camera movement, timeline interaction, or an explicit requestRender().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100