msavva / WebSceneStudio

1 stars 3 forks source link

Selection State is Broken #67

Open gilbo opened 12 years ago

gilbo commented 12 years ago

The state of what is currently selected and the accompanying renderstate fields on model instances are not well encapsulated/protected. This leads to a number of problems and should probably be resolved by hardening this component.

Known symptoms:

  1. While dragging an object, if the escape key is pressed before the mouse button is released, then the object will become unselectable. This is probably because the object becomes unpickable.
  2. The renderstate is used for logic (i.e. pickable/selectable) and not just appearance. Because the renderstate is also serialized with the scene, this leads to the possibility of scene corruption as documented by issue #54

Proposed Fix: refactor model instance state and selection system to conform with FSM approach to state management.