Famous/engine

removeScene does not remove the selector from Compositor

Open

#377 建立於 2015年7月2日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)JavaScript (1,750 star) (262 fork)batch import
help wanted

描述

in FamousEngine.removeScene, there is no reference to the Compositor. For embedded uses (like in an existing Angular app), the selector may come and go as the user navigates the app. Therefore it is important to be able to destroy and recreate the Scene as necessary.

Currently, the Compositor will never create a new Context for a selector that's already been used. When the Scene is removed from the FamousEngine, it also needs to remove the selector from the Compositor. When a Scene / selector is removed from the Compositor, the Compositor should take care of cleaning-up and releasing any existing resources (ie. ElementCache).

This will probably require an additional command type in Commands which is handled by the Compositor directly.

貢獻者指南

removeScene does not remove the selector from Compositor · Famous/engine#377 | Good First Issue