Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolylineGeometry colorsPerVertex seems broken in 1.6+ #2516

Closed
chris-cooper opened this issue Feb 25, 2015 · 3 comments
Closed

PolylineGeometry colorsPerVertex seems broken in 1.6+ #2516

chris-cooper opened this issue Feb 25, 2015 · 3 comments

Comments

@chris-cooper
Copy link
Contributor

This code shows per-vertex colours in Sandcastle in 1.5 but not in 1.6 or master. Is there an interface change I missed?

var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;

var instance = new Cesium.GeometryInstance({
  geometry : new Cesium.PolylineGeometry({
      positions: Cesium.Cartesian3.fromDegreesArray([
    0.0, 0.0,
    5.0, 0.0,
    5.0, 5.0
  ]),
      width: 5.0,
      vertexFormat: Cesium.PolylineColorAppearance.VERTEX_FORMAT,
      colors:[new Cesium.Color(1,0,0), new Cesium.Color(0,1,0), new Cesium.Color(0,0,1)],
      colorsPerVertex: true,
      ellipsoid: Cesium.Ellipsoid.WGS84  // <- required for Cesium 1.5
    }),
  id : 'object returned when this instance is picked and to get/set per-instance attributes'
});
scene.primitives.add(new Cesium.Primitive({
  geometryInstances : instance,
  appearance : new Cesium.PolylineColorAppearance({})
}));
@mramato
Copy link
Contributor

mramato commented Mar 2, 2015

This was indeed a bug due to a typo. It will be fixed in 1.7.

@pjcozzi
Copy link
Contributor

pjcozzi commented Mar 2, 2015

Fixed in #2529

@pjcozzi pjcozzi closed this as completed Mar 2, 2015
@chris-cooper
Copy link
Contributor Author

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants