-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: Simplify and make Scene more flexible
The `FamousEngine` is supposed to expose an API for adding and removing scenes. While the corresponding methods have been outlined, the Scene class itself doesn't reflect the ability to re-mount the scene to a different selector. * The Scene constructor accepts an updater and a selector * Scene#_globalUpdater is inconsistent with the inherited, Node-specific (theoretically) Node#_updater * The Scene updater is being set as via the constructor (instead of Node#_setUpdater) * The Scene constructor requests the context size * The scene constructor no longer accepts any arguments * The scene itself is not bound to a specific selector, but instead can be mounted to an arbitrary path (just like nodes) * Scene constructor logic has been moved to Scene#mount * Less redundancy * More flexibility: Scene can request size at a later point in time instead of upon instantiation * Scene constructor does not have side effects * Scene updater (Scene#_globalUpdater) can be changed via Dispatch * => FamousEngine#removeScene and FamousEngine#addScene can be implemented
- Loading branch information
1 parent
970b4e2
commit 20a6744
Showing
2 changed files
with
17 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters