3DTile polygons slow when using a function to define color
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
Using a function to specify the color of polygons in 3Dtiles slows everything down.
When using a function as color style, it isn't possible anymore to move the view fluidly.
I tried
`color: {
evaluateColor: function (feature, result) {
return Cesium.Color.clone(Cesium.Color.BLUE, result);
}
}`
and
`color: {
conditions : [
['true', 'color("blue")']
]
}`
There is no problem when using directly a color:
`color: 'color("blue")'`
Sandcastle example: https://sandcastle.cesium.com/#c=dVNNb9swDP0rRC5xgFTqEAwF2rTYlqxDgQ4b1qy7+KLITKxNlgJKcj+C/PfRVhK0K6aLTfI98omkWkXQGnxAgktw+AAzDCY14r73FUPdmzPvojIOaTiGbemAT0Qidn0n35oK6fxA1IQq4i9PtlpkSDEq3W50UbrStVxtjV77qq+XC4uDR3T2V/6zDD46AyrS9QIfIzOGrMs5NXwJWFmzruM8kYrGOwaditO3CYqsQEq4Rx09wWQOC2MxgCIEfNwgmQb5mhaUqyDWCCtPjYpgAoS0/M0siB50rTg1GJchKSZC0ee95qSN52QVcrNsGENAPO9DfOoYN+FcyrWJdVoK7RuZO/blTk6qk9hJkZEQj9aJ4zvLTuN1LyTIrHyuosqt7GEYX08ufybzRQ4WW0hkj+O58e4HBp9Io1iRbz4GxtxUxfuzydkI+jHtpxI0OhQb7oqJpsUgVFUV+4q5l3tDhPhk8f8i7rpwsV8b7a3nZdliq2ziRZlle5Wc7qdXrHh9uKVjIAzJxtFh37pDyCF3rNFRhbbeYfHK9en25+cj/6Kn73b9Dg7Gg2mv9ion/WCajafYdagQQkZsNpZFBblM+g/fTIfQJZjKA2lamRZMdVkO/nkY5QC0VSFwZJWsvTPPWA6uppLxr2jWq8q49bcWyaqnDlK/u7rNTiHEVLL5lhW9t0tFLzL+BQ
Contributor guide
Research direction
Start with the linked Sandcastle example and compare the direct color style with the evaluateColor and conditions cases while monitoring view fluidity. Trace the 3D Tiles polygon color evaluation path to identify why function-based styling causes the slowdown. Done means function-based color styling preserves the shown color without making navigation noticeably less fluid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100