NodeFilter.where constructor
Includes nodes for which predicate returns true.
The predicate is called with each candidate node every frame, so keep it cheap (a set membership test is ideal).
Implementation
const NodeFilter.where(bool Function(Object node) predicate)
: _predicate = predicate,
_layerMask = null;