Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make scene optional in constructors #42

Open
Gugustinette opened this issue Dec 20, 2024 · 0 comments
Open

feat: make scene optional in constructors #42

Gugustinette opened this issue Dec 20, 2024 · 0 comments

Comments

@Gugustinette
Copy link
Contributor

Gugustinette commented Dec 20, 2024

Right now, Fibbo classes are taking the FScene as an explicit required parameter :

new FRectangle(scene, {...options})

The scene parameter could be part of the options and become optional.
By default, when creating a scene, it will be attached to a global object (globalThis) and used if no scene is provided in options.
If a scene parameter is provided through options, it will be used instead of the global one.

That way, components can be created as below :

new FRectangle({...options})
@Gugustinette Gugustinette moved this to Todo in Fibbo Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant