SimplePolylineGeometry fails crossing IDL if colors specified
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
DeveloperError: All attribute lists must have the same number of attributes.
Error in `GeometryPipeline.wrapLongitude`. It doesn't add to the `color` attribute of the `SimplePolylineGeometry` when it adds to the `position` attribute.
Sandcastle example:
```
var positions = [Cesium.Cartesian3.fromDegrees(-74.0, 40.0), Cesium.Cartesian3.fromDegrees(179, 30)];
viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.SimplePolylineGeometry({
colors: [Cesium.Color.RED], // this line causes the problem
positions : positions
})
}),
appearance : new Cesium.PerInstanceColorAppearance({
flat : true,
renderState : {
depthTest : {
enabled : true
},
lineWidth : Math.min(2.0, viewer.scene.maximumAliasedLineWidth)
}
})
}));
```
Contributor guide
Research direction
Start by tracing GeometryPipeline.wrapLongitude and SimplePolylineGeometry for how position and color attributes are handled when a polyline crosses the International Date Line. Reproduce the supplied Sandcastle example, then verify that wrapping keeps all attribute lists the same length and that the colored geometry renders without the DeveloperError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100