Famous / Famous/engine

removeScene does not remove the selector from Compositor

Open
#377 1 comment 0 reactions 0 assignees View on GitHub
help wanted
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.