ModelFeature
A feature of a Model.
Provides access to a feature's properties stored in the model's feature table.
Modifications to a ModelFeature
object have the lifetime of the model.
Do not construct this directly. Access it through picking using Scene.pick.
// On mouse over, display all the properties for a feature in the console log.
handler.setInputAction(function(movement) {
const feature = scene.pick(movement.endPosition);
if (feature instanceof ModelFeature) {
console.log(feature);
}
}, ScreenSpaceEventType.MOUSE_MOVE);
See also
Types
Functions
Returns a copy of the value of the feature's property with the given name.
Returns an array of property IDs for the feature.
Returns a copy of the feature's property with the given name, examining all the metadata from the EXT_structural_metadata and legacy EXT_feature_metadata glTF extensions. Metadata is checked against name from most specific to most general and the first match is returned. Metadata is checked in this order:
Returns whether the feature contains this property.
Sets the value of the feature's property with the given name.