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

modularization convention discussion #3

Open
cyan33 opened this issue Dec 1, 2017 · 0 comments
Open

modularization convention discussion #3

cyan33 opened this issue Dec 1, 2017 · 0 comments

Comments

@cyan33
Copy link
Owner

cyan33 commented Dec 1, 2017

Along the way I'm working around with javascript packages, I noticed that it looks like the best practice is using closures instead of Class when handling modularization.

So in our game framework, I also took this approach, in which case, most of the game components like canvasUtils, drag n drop, AI, should export something like createXX(). But for some of the base class like Sprite and Particle, the intuitive way is to use class. So I think I should just mix them up.

But like you can see, everything inside the src/component folder uses class, while other modules outside uses closure.

Just to clarify things up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant