Comments (8)
It should be fixed now, below is an example which will log the time it takes to finish the loop. It may differ slightly but it will be generally the same for every loop.
Example:
https://jsfiddle.net/v5uzLrpb/
from typewriterjs.
@tameemsafi It seems to be happening again, even on the example you provided. With each loop the time between loops increases a bit.
from typewriterjs.
@haggen I have taken a look and I don't see the problem in the example above. Yes it does increase/decrease slightly but that is expected due to using window.requestAnimationFrame
. However, it does not exponentially increase so there does not seem to be any issues. If you are experiencing an issue then please provide a way for me to reproduce the error so that I can fix it.
from typewriterjs.
Click (tested on Chrome 75) and open your console. https://h9ht9.csb.app/
To see the source: https://codesandbox.io/s/typewriter-effect-loop-delay-bug-h9ht9
from typewriterjs.
@haggen Thank you but it seems you are using the console.time
function incorrectly. You need to run the console.time("typewriter loop")
when it starts and then run console.timeEnd("typewriter loop")
when it has completed. Please can you try that? It seems to work fine for me.
from typewriterjs.
@tameemsafi Thank you for your quick response! :)
I'm not using it incorrectly. I'm using it to measure exactly what I want to measure, which is the time between loops--as opposed to timing the whole procedure. That's what increases with each loop.
Just look at the result and you'll notice it rather easily. It:
- Clears, writes Banana and pauses for 1 second
- Clears, writes Apple and pauses for 1 second
- Clears, writes Grape and pauses for 1 second
- Starts over, but every time this step is reached it adds an additional pause that is increasingly longer each time
from typewriterjs.
@haggen I have now published v2.10.0
please let me know if you are still seeing the issue.
from typewriterjs.
That was fast, @tameemsafi 😄 Thank you! It looks fixed now!
from typewriterjs.
Related Issues (20)
- Bug when deleting chars in subsequent run, even on the main site HOT 3
- How long is the time interval between letters when the delay option is set to 0? HOT 1
- TypewriterJS not working in a next.js app router HOT 1
- Typo HOT 2
- Add `map` files HOT 1
- Typewriter paused when tab/window is not active HOT 1
- Feature Request: Method to ClearAll immediately. HOT 7
- Can I attach a css class to it? When I add a class to the parent element to set a custom font, it doesn't work. HOT 1
- Issue with iPhone & RTL HOT 2
- Can i change de delay value meanwhile the effect is active?
- [Feature request] Add option to skip typing certain tags
- Font Size for style wrapper not working
- TypeScript: Type Error when injecting graphemeSplitter on stringSplitter `option` as per the documented demo
- Doesnt work with emojis HOT 1
- Why does it delete the text??
- Feature Request - Add Option for Wrapper to Get Height of Fully Typed Content
- Safari does not connect scripts / apply opentype font features / kerning to text created with createTextNode HOT 1
- CDN version is broken
- How to completely stop the typing using React
- How to display initial text?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typewriterjs.