Image material being applied to wall incorrectly?

Hi,

I’m trying to create a wall where an image is applied along the entire extent. This works when there are two positions defined but not when three or more positions are defined. I couldn’t find any information in the documentation describing how an image is applied to a wall, so I’m not sure if this is a bug or not.

Here’s a Sandcastle example that demonstrates the problem.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var material = new Cesium.ImageMaterialProperty({

image: ‘…/images/Cesium_Logo_overlay.png’,

repeat: new Cesium.Cartesian2(1.0, 1.0)

});

var wall_1 = viewer.entities.add({

id: ‘wall_1’,

name: ‘Two-position wall’,

wall: {

positions: Cesium.Cartesian3.fromDegreesArray([

-110.0, 38.0,

-109.0, 38.0]),

maximumHeights: [ 10000.0, 10000.0 ],

minimumHeights: [ 0.0, 0.0 ],

material: material

}

});

var wall_2 = viewer.entities.add({

id: ‘wall_2’,

name: ‘Three-position wall’,

wall: {

positions: Cesium.Cartesian3.fromDegreesArray([

-110.0, 39.0,

-109.5, 39.0,

-109.0, 39.0]),

maximumHeights: [ 10000.0, 10000.0, 10000.0 ],

minimumHeights: [ 0.0, 0.0, 0.0 ],

material: material

}

});

viewer.zoomTo(wall_2);

``

Hmm, yeah it looks like the texture coordinates are incorrect.
I’ve created an issue here: https://github.com/AnalyticalGraphicsInc/cesium/issues/2872

It should be an easy fix, I’ll try to take a look at it shortly.

Thanks!

-Hannah

A fix for this was just merged into master: https://github.com/AnalyticalGraphicsInc/cesium/pull/2873

-Hannah