-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Add speed control variable #81
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great so far.
I think it would be more intuitive to do the duration
way instead of speed
, though. If using speed without taking into account the width, the same speed will be slow on narrow images and fast on wide images. If duration
is used, it is more intuitive since it makes sense regardless of the width. Feel free to let me know what you think. :)
@DenverCoder1 I don't mind changing it to duration, I assume instead of doing (50/speed) we would then be able to just echo $duration s and it would just work theoretically which is an easy change to make unless there is more to it than that that I am missing as I am just thinking about it. It might be more intuitive for time you are right. I think an improvement to this even would be switching the dur to use milliseconds instead of seconds which I think can only be ints from lightly reading over the documentation in which case I think I will change speed to duration everywhere, and then in dur=echo part I will do $dur*1000 to get it into milliseconds which will allow for more fine control like 5.5 seconds or 3.23 seconds. Thoughts? |
Yeah, that sounds good. If using duration as parameter, I think all you'd need is just to echo the duration instead of (50/speed) like you said. I think it would be fine to even have the duration parameter be in milliseconds (default 5000) and just to echo $duration with ms. Either way is fine. |
521b66f
to
7e76a7f
Compare
Updated with the duration variable. Also updated the tests so that they should be passing now (still didn't get composer, but from what I can tell should be good) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍
I've tested it and it seems to work. I have just a few minor suggestions
Thanks for the clarifications! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for the contribution 🎉
Description
Added a speed variable to control the speed of "typing". On demo it is called "Print Speed" as shown in the screenshot. Default value is 10 which is equivalent to the previous static value of 5 seconds.
Fixes #12
Type of change
How Has This Been Tested?
Spent half an hour trying to set up composer on linux and windows and didn't get it working. So manually tested with live deployment here on Heroku
Checklist:
Screenshots