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

feature: blink words to load more? #169

Open
ycgambo opened this issue Dec 2, 2020 · 2 comments
Open

feature: blink words to load more? #169

ycgambo opened this issue Dec 2, 2020 · 2 comments
Labels

Comments

@ycgambo
Copy link

ycgambo commented Dec 2, 2020

here is what I try to do by using jquery:

var func = (v) => {
    $(v).css('opacity', 0)
    setTimeout(()=> {
        $(v).text(parseInt(Math.random() * 100))
        $(v).css('opacity', 1)
        setTimeout(func.bind(this, v), 3000 + Math.random() * 3000)
    },5000)
}

$('svg text').each((k, v) => {
    $(v).css('transition', 'opacity 5s cubic-bezier(0.4, 0, 0.2, 1) 0s')
    setTimeout(func.bind(this, v), Math.random() * 10000)
})

GIF 12-2 21-30-05

@ycgambo
Copy link
Author

ycgambo commented Dec 2, 2020

words has different lengths and font-sizes.
the code above will actually cause a text overlap.
I hope someone will introduce a good way to blink them in appropriate position.

@ycgambo ycgambo changed the title feature: blink works to load more? feature: blink words to load more? Dec 2, 2020
@jasondavies
Copy link
Owner

The current implementation only places a static set of words in one go: it can't deal with adding new words and placing them dynamically. Might be interesting for a future version.

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

No branches or pull requests

2 participants