In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces you how to achieve the effect of Cesium left-click model, the content is very detailed, interested friends can refer to, hope to be helpful to you.
In the Cesium example, there is a 3D Tiles Feature Picking, mouse over the model, will display a check box on the model, a name label appears next to the model, click on the model in 3dtiles, the box will be highlighted, and the details of the model will pop up.
Directly take over to use the code, found that this click effect, according to the actual situation of the model (3dtile) code modification, the mouse click to the model is b3dm format, Cesium has a detailed file format description, but some parts of the file need to be omitted, so, resulting in not every 3dtile layer is the same.
The b3dm file format can be found at https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/TileFormats/Batched3DModel/README.md
In the actual code, the following changes are made. The complete code refers to the URL at the beginning of the article, and only the key code is explained below:
If (Cesium.defined (highlighted.feature)) {
/ / at this code, it is necessary to judge whether the attribute of color exists in feature according to the model, otherwise the setting will not be successful.
Highlighted.feature.color = highlighted.originalColor
Highlighted.feature = undefined
}
/ / determine whether the color attribute exists in feature according to the model, otherwise the setting will not be successful
PickedFeature.color = Cesium.Color.LIME
/ / to determine whether there are attributes of name, which are related to b3dm's batch Table and feature Table, you need to see whether there are these in the b3dm model.
Var featureName = pickedFeature.getProperty ('name')
SelectedEntity.name = featureName
SelectedEntity.description = 'Loading'
Viewer.selectedEntity = selectedEntity
SelectedEntity.description =.
Both MOUSE_MOVE and LEFT_CLICK have corresponding code that needs to be modified at the same time.
On the Cesium left-click model effect on how to share here, I hope the above content can be of some help to 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.