Corridor renders from Primitive API but not Entity API
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
From #4326
This corridor renders:
``` javascript
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
var redCorridorInstance = new Cesium.GeometryInstance({
geometry: new Cesium.CorridorGeometry({
positions : Cesium.Cartesian3.fromDegreesArray([
-16.41549000000001,28.44423000000001,
-16.41549000000001,28.44423000000001,
-16.41505000000001,28.44430000000001,
-16.41507000000001,28.44430000000001,
-16.41473000000001,28.44460000000001,
-16.41429000000001,28.44452000000001,
-16.41430000000001,28.44453000000001,
-16.41428000000001,28.44452000000001,
-16.41416000000001,28.44434000000001,
-16.41415000000001,28.44434000000001,
-16.41397000000001,28.44408000000001
]),
width : 1,
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.5))
}
});
var primitive = scene.groundPrimitives.add(new Cesium.GroundPrimitive({
geometryInstances: [redCorridorInstance],
appearance: new Cesium.PerInstanceColorAppearance({
closed: true
})
}));
scene.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(-16.41549000000001, 28.44423000000001, 100)
});
```
But this one doesn't
``` javascript
var viewer = new Cesium.Viewer('cesiumContainer');
var redCorridor = viewer.entities.add({
name : 'Red corridor on surface with rounded corners and outline',
corridor : {
positions : Cesium.Cartesian3.fromDegreesArray([
-16.41549000000001,28.44423000000001,
-16.41549000000001,28.44423000000001,
-16.41505000000001,28.44430000000001,
-16.41507000000001,28.44430000000001,
-16.41473000000001,28.44460000000001,
-16.41429000000001,28.44452000000001,
-16.41430000000001,28.44453000000001,
-16.41428000000001,28.44452000000001,
-16.41416000000001,28.44434000000001,
-16.41415000000001,28.44434000000001,
-16.41397000000001,28.44408000000001
]),
width : 1,
material : Cesium.Color.RED.withAlpha(0.5),
outline : true,
outlineColor : Cesium.Color.RED
}
});
viewer.zoomTo(viewer.entities);
```
Contributor guide
Research direction
Start by running the supplied Primitive API and Entity API examples and compare their corridor rendering paths. Investigate the Entity corridor configuration using the provided positions, width, material, and outline settings; done means the Entity API renders the corridor as the Primitive API does.
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
- Clearly specified
- Newbie friendliness
- 45/100