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

Make better use of ES6 #2

Open
3 tasks
stevehoover opened this issue Nov 21, 2020 · 12 comments
Open
3 tasks

Make better use of ES6 #2

stevehoover opened this issue Nov 21, 2020 · 12 comments

Comments

@stevehoover
Copy link
Owner

stevehoover commented Nov 21, 2020

The JS syntax I was using is a bit obsolete. Some things that could be cleaned up:

  • Remove all ;.
  • No need for the function keyword. E.g. initEach: function () { becomes initEach() {.
  • For object properties assigned to variables of the same name, a shorthand is permitted, so, e.g. return {objects: {rect: rect, shadow: shadow}}; becomes return {objects: {rect, shadow}}
@Alchemist1411
Copy link
Contributor

Sir, can I give it a try and if yes please brief me about this.

@stevehoover
Copy link
Owner Author

That would be great, Deepak. For each example, edit in Makerchip, make the 3 itemized changes above, and make sure the example still produces the same VIZ without errors in the console.log. Clear?

@stevehoover
Copy link
Owner Author

You can fork and commit changes (through the github web interface, if you like), then submit a merge request w/ upstream master.

@Alchemist1411
Copy link
Contributor

Sir, can you tell me what is the file location. So, that I can do it with github web interface

@stevehoover
Copy link
Owner Author

You can do this for all .tlv files that have \viz_alpha code. (A few have been updated.)

@stevehoover
Copy link
Owner Author

BTW, I was just working with life_sv_viz.tlv, so I cleaned that one up. You might find merge conflicts if you edit that one, so git checkout life_sv_viz.tlv if you did.

@Alchemist1411
Copy link
Contributor

Sir, I created a PR. Please check

@stevehoover
Copy link
Owner Author

stevehoover commented Dec 24, 2020 via email

@Alchemist1411
Copy link
Contributor

No Problem sir, BTW Merry Christmas

@Alchemist1411
Copy link
Contributor

Sir, created a PR. Please check

@stevehoover
Copy link
Owner Author

stevehoover commented Dec 28, 2020 via email

@Alchemist1411
Copy link
Contributor

Alchemist1411 commented Dec 29, 2020 via email

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

No branches or pull requests

2 participants