Translate a picked storage slot into the on-disk element index the
per-element string/image CSRs are keyed by.
Identity is the safe default: with no published map, a stamp of the wrong
type, or a slot outside the map, the slot is returned unchanged. This never
throws and never returns a sentinel — picking runs on the hover path and
must not become a source of exceptions.
Parameters
mainNode: Object3D
The picked node's main (visual) object.
slot: number
The element index the pick buffer reported.
Returns number
The on-disk element index, or slot when no map applies.
Translate a picked storage slot into the on-disk element index the per-element string/image CSRs are keyed by.
Identity is the safe default: with no published map, a stamp of the wrong type, or a slot outside the map, the slot is returned unchanged. This never throws and never returns a sentinel — picking runs on the hover path and must not become a source of exceptions.