This repository was archived by the owner on Jun 16, 2020. It is now read-only.
Conversation
styfle
reviewed
Jul 29, 2018
| // Set slider button animation duration | ||
| anim_slider_button.setAttribute('dur', style.getPropertyValue('--animation-duration')); | ||
|
|
||
| play_button.setAttribute('display', 'none'); |
There was a problem hiding this comment.
play_button.style.display = 'none';
pause_button.style.display = 'inline';
styfle
reviewed
Jul 29, 2018
| terminal.unpauseAnimations() | ||
| screen.unpauseAnimations() | ||
| play_button.setAttribute('display', 'none') | ||
| pause_button.setAttribute('display', 'inline') |
styfle
reviewed
Jul 29, 2018
| } else { | ||
| terminal.pauseAnimations() | ||
| screen.pauseAnimations() | ||
| play_button.setAttribute('display', 'inline') |
styfle
reviewed
Jul 29, 2018
| timer.textContent = timer_from_ms(current_time) + "/" + timer_from_ms(animation_duration) | ||
| } | ||
|
|
||
| setInterval(update_timer, "100ms") |
styfle
reviewed
Jul 30, 2018
| var screen = terminal.getElementById('screen'); | ||
| var slider_1 = terminal.getElementById('slider_1'); | ||
| var anim_slider_button = document.getElementById('anim_slider_button'); | ||
| var style = getComputedStyle(terminal); |
There was a problem hiding this comment.
Maybe use window.getComputedStyle here for consistency?
There was a problem hiding this comment.
Also, you don't need to create the style variable here. Instead you can do this:
var dur = window.getComputedStyle(terminal).getPropertyValue('--animation-duration');
var animation_duration = parseInt(dur) / 1000;
// ...then later below...
anim_slider_button.setAttribute('dur', dur);
styfle
reviewed
Jul 30, 2018
| var timer = terminal.getElementById('timer') | ||
|
|
||
| function timer_from_ms(t) { | ||
| minutes = Math.floor(t / 60); |
styfle
reviewed
Jul 30, 2018
| return parseInt(matrix.m41) | ||
| } | ||
|
|
||
| track_begin = getTranslateX(terminal.getElementById('track')) |
Owner
Author
|
Thanks! |
styfle
approved these changes
Aug 2, 2018
Color theme and font used in the animation can now be set by modifying one of the CSS style elements of the template. --font and --theme CLI options have been removed in favor of --template
nbedos
added a commit
that referenced
this pull request
Aug 3, 2018
Add support for SVG templates: templates make it possible to add a terminal window frame to the animation, as well as custom Javascript code Remove static configuration file: animation styling (color theme and font) is now done by modifying the template Replace --font and --theme CLI options by --template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #53 for SVG templates discussion