removeScene does not remove the selector from Compositor
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 249
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.