Instance.remove() should not assume the location of the object3D in the scenegraph
Summary
When removing an object from the instance (be it an entity or a regular object), the instance assumes that this object has a fixed location in the scene graph (i.e it is directly a child of scene in the case of entities for example).
However, we should not assume that, as we want to let users move the object freely in the scene graph for various purposes (for example grouping some entities under their own Group).
Steps to reproduce
- Add an entity to the instance.
- Move the
entity.object3dsomewhere else, for example in a sub-group. - Delete the entity from the instance with
Instance.remove().
Expected behaviour:
The entity is entirely removed from the scenegraph.
Actual behaviour:
The entity's root element remains in the scenegraph.
Informations
- Giro3D version: 0.39
- Browser (Firefox, Chrome, Opera, Safari...) and version: N/A
- OS (Linux, MacOS, Windows...) N/A