In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to achieve model entity highlighting in Cesium development. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
When selecting the model object of Cesium, you need to highlight the effect, by setting the highlight color to the surface or periphery of the model to achieve the effect of highlighting the model.
When the Entity entity looks up or clicks Entity, get the object, and then cover the surface of the model with a layer of color by changing the color of model in Entity. The specific effect is as shown below:
Highlight the model in red and use the color class of Cesium in the order that R\ G\ B\ An is transparent and the range is 0-1, so there needs to be a conversion of values in the middle when using color values in the range of 0-255. Entity.model.color = new Cesium.Color (1.0,0,0,1.0); if the model is not highlighted, you can set the model color to empty or white: entity.model.color = null; or entity.model.color = new Cesium.Color (1.0,1.0,1.0,1.0) When set in this way, although the transparency setting is opaque, you can still see the model, so that the highlighting effect is not obvious when the model is small or dark. At this point, you can set the colorBlendMode of the model to replace mode, so that the model is replaced with color.
Entity.model.colorBlendMode = Cesium.ColorBlendMode.REPLACE
The effect is as follows:
If you don't think this replacement works well, you can set contours around the model:
Entity.model.silhouetteColor = new Cesium.Color (1.0,0,0,1.0); entity.model.silhouetteSize = 2.0. The effect is as follows:
Thank you for reading! This is the end of the article on "how to achieve model entity highlighting in Cesium development". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.