WallGeometry handling positions incorrectly
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
Reported by @primozs
`WallGeometry` is not iterating through these positions correctly, resulting in trying to normalize the zero vector:
``` js
var viewer = new Cesium.Viewer('cesiumContainer');
var dataFail = [{"x":4275839.559924875,"y":1108128.491490115,"z":4587218.256350457},{"x":4275839.560187584,"y":1108128.4915581993,"z":4587218.255867044},{"x":4275839.560187584,"y":1108128.4915581993,"z":4587218.255867044},{"x":4275839.560187584,"y":1108128.4915581993,"z":4587218.255867044},{"x":4275839.560187584,"y":1108128.4915581993,"z":4587218.255867044},{"x":4275839.560187584,"y":1108128.4915581993,"z":4587218.255867044},{"x":4275839.559983776,"y":1108128.4926396976,"z":4587218.25594444}];
var wall = {
wall: {
positions: dataFail,
material: Cesium.Color.fromCssColorString('red').withAlpha(0.2),
outline: true,
outlineColor: Cesium.Color.fromCssColorString('red').withAlpha(0.2)
}
};
viewer.entities.add(wall);
viewer.scene.camera.flyTo({
destination: new Cesium.Cartesian3(4275945.9824068565, 1107800.9025642173, 4587695.880722421),
});
```
Contributor guide
Research direction
Start by tracing WallGeometry's handling of the wall positions in the supplied viewer reproduction. Verify the repeated positions and the zero-vector normalization failure, then confirm the issue is resolved when the example renders without that error.
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
- 35/100