How to use a image patch as texture for a wall of a house

1. A concise explanation of the problem you’re experiencing.

I created a simple outline of a house:

As seen in the image, its not really the result one would want to show the walls of a house.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

I created it with the following code, looping over a geosjon polygon outer ring.

for (let j = 0; j < coordinates.length-1; j++) {

let flatten1 = .concat.apply(, [coordinates[j], coordinates[j+1]]);

var material = new Cesium.ImageMaterialProperty({

image: ‘/src/demos/hus/content/B543_mork_885x885-300x300.png’,

repeat: new Cesium.Cartesian2(5.0, 5.0)

});

var wall_1 = this._dataSource.entities.add({

id: j.toString(),

wall: {

positions: Cesium.Cartesian3.fromDegreesArrayHeights(flatten1),

material: material

}

});

}

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I want to create a 3d visualization of a house.

4. The Cesium version you’re using, your operating system and browser.

Latest from npm and chrome.

Anyone have any input on better ways to use a image patch as the texture for the wall. The current implementation above also would need one to calcualte the repease property to get nice results. Is there not a better way?

Added a demo site: http://pksorensen-demos.azurewebsites.net/demos/hus?flag1=false&flag2=true

You may have better uv’s using another entity type, but if you’re willing to dive a bit deeper into the lower levels of the Cesium API, primitives will give you more control.

Thanks,
Gabby