var appearance = new Cesium.MaterialAppearance({
translucent: false,
renderState: {
depthMask: true,
blending: Cesium.BlendingState.ALPHA_BLEND,
},
flat: true
});
appearance.material = new Cesium.Material({
fabric: {
type: ‘Image’,
uniforms: {
image: ‘./static/images/wall.png’,
// image: “./static/images/riverNormal.jpg”,
color: color
},
}
});
console.warn(appearance)
let geometry = new Cesium.GeometryInstance({
geometry: Cesium.BoxGeometry.fromDimensions({
dimensions: options.dimensions,
vertexFormat: Cesium.VertexFormat.POSITION_AND_ST,
}),
})
let obj = options.viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances: geometry,
appearance: appearance,
modelMatrix: toWorldmat
}));
let handler = new Cesium.ScreenSpaceEventHandler();
handler.setInputAction((event) => {
let ray = viewer.camera.getPickRay(event.endPosition);
let picked = viewer.scene.pickFromRay(ray, [tileset]);
console.warn(picked)}
``
``
i want to pick Boxgemoetry with transparent image,i event set depthmask=true,but i cannot pick Boxgemoetry sensitively