when working with a scene that has some objects deleted, new objects that are placed sometimes spawn an unexpected object. when saving these cities, they don't reload as expected.
as newly placed objects are given an id of 'object' + document.getElementById('city').childElementCount;, if a scene has deleted items then newly created items might have the same ID as an object already on the scene, resulting in this odd behavior.
a fix would be to generate a near-random UUID for each newly created object. this will break the rudimentary undo feature which needs an overhaul anyway.
when working with a scene that has some objects deleted, new objects that are placed sometimes spawn an unexpected object. when saving these cities, they don't reload as expected.
i think this is due to the mechanism of assigning an ID to newly placed objects: https://github.com/kfarr/aframe-city-builder/blob/master/lib/builder-controls.js#L185
as newly placed objects are given an id of
'object' + document.getElementById('city').childElementCount;
, if a scene has deleted items then newly created items might have the same ID as an object already on the scene, resulting in this odd behavior.a fix would be to generate a near-random UUID for each newly created object. this will break the rudimentary undo feature which needs an overhaul anyway.