EntityRepository
The live, in-memory source of truth for which shapes currently exist. Deliberately separate from com.tcsappdev.worldwinddraw.core.state.DrawEngineState, which only tracks interaction mode — com.tcsappdev.worldwinddraw.core.history.Commands (via HistoryManager) are what mutate this.
Properties
The shapes that exist now, in drawing order (the last is drawn on top of the ones before it, unless a DrawableEntity.zIndex says otherwise). Collect it to follow every change.
Functions
Puts entity after the shapes there are. Not a history step (it cannot be undone).
Makes newEntities, in that order, the shapes that exist, whatever there was before, as ONE change: whoever watches entities sees the old list and then the new one, never the many in-between lists that removing and adding one by one would show (and that would each make the map redraw). What a loaded file or a restored snapshot needs. An empty list clears the repository. Not a history step: it is a command's job to make a change that can be undone, and replacing everything is meant for the host to set the scene (clear the history with it, see HistoryManager.clear).