Hello everyone, I created a custom geometry in cesium, set up a map. After the UV coordinates of the map are changed, I set the map to tile and repeat. Cesium.TextureWrap.REPEAT But it can’t be repeated now. This is my code. Can I help you?
Cesium.Resource.createIfNeeded(imageUrl).fetchImage().then(function (image) {
var vtxfTexture;
var context = self.viewer.scene.context;
if (Cesium.defined(image.internalFormat)) {
vtxfTexture = new Cesium.Texture({
context: context,
pixelFormat: image.internalFormat,
width: image.width,
height: image.height,
source: {
arrayBufferView: image.bufferView
}
});
} else {
vtxfTexture = new Cesium.Texture({
context: context,
source: image
});
}
// image.onload = function () {
// };
vtxfTexture._sampler =new Cesium.Sampler({wrapS:Cesium.TextureWrap.REPEAT,wrapT:Cesium.TextureWrap.REPEAT});
// context.defaultTexture._sampler =new Cesium.Sampler({});
texture = vtxfTexture;
});