Hiding a collection can prevent cached model resources from loading
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
What I'm doing is adding two of the same model to different primitive collections and then hiding one of the collections as soon as the model enters the ready state. The issue appears to be that the `CachedRendererResources` never becomes ready when the parent collection is hidden and this prevents the second model from appearing.
In the Sandcastle example I was expecting to always see a model, but sometimes none are shown (you might have to run a few times to see it happen). I also added some console logs when the readyPromise triggers and when the issue occurs only one of the log messages appears.
Sandcastle example: https://sandcastle.cesium.com/#c=pVRdb9owFP0rHk9By5ykpa1WKNpE1+6h3dBK+5QXk9yAVcdGthPKJv77rm0yYK20h0lRlPtxzj33A1qmScthDZpcEQlrMgHDm5o+eV+U9wpvT5S0jEvQea8/zGUuW8StlOGWK4nIHWrCtMUvJk9ppVV9DQsNYKIP2ckpTS8Gg/PsY0wGA5qepacX6XlMztI0DYRVIwtPVmhgFu5VCSKSrIaYNFr0ya9cEuKq1i6yL+kTfbVbYavIpxEHuXSvOJgec8+s5i+XHXCmmTSV0rWhwIz9prRdPq5m6oa/QHmjsXLUNdj3NNsglHQE6yXIyDNTlFxupqiBG+hT6wJdPyED9ZNCSaMEUKEWvjHynuQ9wg3xaDfYUIKQrtVCCXG8lqnmNUpqYYIhCAUCxuVSVpa7et6nwTZa+hDaW783v1daYH3NUIp6/mz/9BkflvqKqrhcTLktlj+YXECUxgSfDDe2vwHHnQ0PmE0BEigy2sdViYt0mr60IO0dNxZDej+Z3VJ5RaJ3nmfnCM1k2PnhLWQxjovS5IHVKwHXzLLEt2qSW60aWT7BkhcCji26EPNwso72WGI3SuPHFgTsEg3YGa9BNfaV2n/yHEg++Q/JnZQtDj18b8P1uXF5sXQBNkr74fjCgTmvWao1jq5iwsDQgfCoenFvZOxGwLhr4ROvV3jx7jcSoUILqBB1m2TeFM9gaWFMp2CUHEJHJW8JL6/e+GcghWDGYKRqhHjgPyHvjUcJ5r+CCuVv63sLWrCNS1tm47vgpJSOEjTfRlqlxJzpv5h/Aw
Browser: Firefox, Edge, Chrome
Operating System: Windows
Contributor guide
Research direction
Start with the linked Sandcastle example, which reproduces the issue by adding the same model to two primitive collections and hiding one when the model becomes ready. Investigate why CachedRendererResources may not become ready when its parent collection is hidden. Done looks like a model remains visible in the other collection when the example is run repeatedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100