dndplayer/dnd-player

Refactor map storage structure to flatten objects

Closed this issue · 0 comments

  • Move all objects to a map root collection
  • Keep layers collection as this can contain layer specific properties e.g. z-index, name, who can see etc
  • Add new layerId prop to all MapObjects
  • Update the saga update logic to work with new structure

Benefits:

  • Make finding an object with an id in a map MUCH easier
  • updates no longer need to target /map/layers/{layerid}/children/{objectid}, would now just be /map/objects/{objectId}
  • Moving between layers becomes trivial, just update the layerId property