issues
search
dndplayer
/
dnd-player
An online virtual DND playground to support online groups.
https://dnd-player.com
Other
1
stars
0
forks
source link
Refactor map storage structure to flatten objects
#26
Closed
chrisella
closed
5 years ago
chrisella
commented
5 years ago
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
Benefits: