CheckerboardMaterialProperty error

Uneven distribution

entities.add({ wall: { positions: Cesium.Cartesian3.fromDegreesArrayHeights([ 116.537450802126003, 39.934191456263797 ,100, 116.536770862140997, 39.9341955696041 ,100, 116.531079936819006, 39.934245995639799 ,100, ]), material: new Cesium.CheckerboardMaterialProperty({ repeat: new Cesium.Cartesian2(10.0, 2.0), }), }, });

1 Like

@miyuer

Welcome to the community :rocket: :smiley:

Thank you for sending over a screenshot and some preliminary information. It seems like the checkered wall is not being generated evenly. Could you send over a sandcastle demo that showcases the error that you are receiving? This will help me debug your issue and will be useful if we decide to write up the issue on GitHub.

-Sam

thanks a lot . Cesium Sandcastle it seems like the checkered wall is splited by the middle point

1 Like

@miyuer

Thank you for sharing your sandcastle demo with the community! I played around with your demo a bit and was able to get the behavior that you are looking for.

It seems like adding an even number of position values will keep the checkerboard symmetrical. At some point, we need to deep dive into the CheckerboardMaterialProperty documentation. Members like repeat are not described particularly well. It would be much appreciated if you opened up an issue and summited a PR revising the documentation. I would help you out on every step of the process :smiley: :rocket:

In the meantime, here is the Sandcastle demo that I put together.

I would love to hear your overall thoughts!

-Sam

This problem will still occur even if an even number of position points are set, and the same problem arises in GridMaterialProperty , The square seems to be evenly divided by the position points . Cesium Sandcastle