You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when viewer mapMode2D set to MapMode2D.ROTATE. And the positions to create polyline include height, then the polyline dose not work. test code :
const viewer = new Cesium.Viewer("cesiumContainer", {mapMode2D: Cesium.MapMode2D.ROTATE});
viewer.scene.mode = 2;
// when set height, polyline dose not work
let positions = Cesium.Cartesian3.fromDegreesArrayHeights([100, 10, 100, 110, 10,100, 120, 20, 100]);
// when height = 0, it work
let positions2 = Cesium.Cartesian3.fromDegreesArray([100, 10, 110, 10, 120, 20]);
const line = new Cesium.GeometryInstance({
geometry: new Cesium.PolylineGeometry({
positions: positions,
width: 2,
vertexFormat:Cesium.PolylineColorAppearance.VERTEX_FORMAT,
}),
attributes:{
color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED)
}
});
let aa = new Cesium.Primitive({
geometryInstances: line,
asynchronous: false,
appearance: new Cesium.PolylineColorAppearance({
translucent: true,
}),
show: true
});
viewer.scene.primitives.add(aa);
Reproduction steps
...
Sandcastle example
No response
Environment
Browser: chrome
CesiumJS Version: 1.125
Operating System: windows 11
The text was updated successfully, but these errors were encountered:
I believe we're already tracking it in #4620. I'm going to close your issue to keep the discussion in one place. If you have any further input on this, please post it there instead.
What happened?
when viewer mapMode2D set to MapMode2D.ROTATE. And the positions to create polyline include height, then the polyline dose not work. test code :
const viewer = new Cesium.Viewer("cesiumContainer", {mapMode2D: Cesium.MapMode2D.ROTATE});
viewer.scene.mode = 2;
// when set height, polyline dose not work
let positions = Cesium.Cartesian3.fromDegreesArrayHeights([100, 10, 100, 110, 10,100, 120, 20, 100]);
// when height = 0, it work
let positions2 = Cesium.Cartesian3.fromDegreesArray([100, 10, 110, 10, 120, 20]);
const line = new Cesium.GeometryInstance({
geometry: new Cesium.PolylineGeometry({
positions: positions,
width: 2,
vertexFormat:Cesium.PolylineColorAppearance.VERTEX_FORMAT,
}),
attributes:{
color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED)
}
});
let aa = new Cesium.Primitive({
geometryInstances: line,
asynchronous: false,
appearance: new Cesium.PolylineColorAppearance({
translucent: true,
}),
show: true
});
viewer.scene.primitives.add(aa);
Reproduction steps
...
Sandcastle example
No response
Environment
Browser: chrome
CesiumJS Version: 1.125
Operating System: windows 11
The text was updated successfully, but these errors were encountered: