Polyline dash materials are implemented in screenspace, not worldspace. Which means that the length of the dash will always be consistant despite the camera view.
If you’re looking to implement a consistant look such as traffic lines, I would suggest using a textured polygon, such as in this example.
When updating a large amount of entities at once, it’s more performant to queue up changes and send one big event at the end. This way Cesium can process required changes in a single pass. Call viewer.entities.suspendEvents before the viewer.entities.add and call viewer.entities.resumeEvents at the end of the example.
You can also use the lower level Primitive API if performance needs to be optimized further.
What a beautiful solution… I didn’t expect.
I’ll try it soon.
Thank you for your answer.
I’m curious about other similar methods.
‘nearFarScalar’ method is working in polygon.
How about this method?
Can I apply this method to polyline object?