I created a Box volume through primitive API and added a “SpecularMap” type material to it, but it just won’t work. But when I created another Cylinder volume through the same way using primitive API and added the same SpecularMap material, it worked fine. What’s the reason and how could I use SpecularMap material for the Box volume created by primitive API? It seems strange…
fabricSpecularMap = {
type:“SpecularMap”,
uniforms:{
channel: “r”
},
components: {
specular: ‘1.0’
}
}
var Box = scene.primitives.add(
new Cesium.Primitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: box1,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
},
id : ‘box1’
}),
appearance: new Cesium.MaterialAppearance({
material: new Cesium.Material({
fabric: fabricSpecularMap
})
})}
) )