|
|
@ -335,6 +335,7 @@ function typeWriterConsoleSequential(container, options = {}) { |
|
|
const currentDiv = textDivs[currentDivIndex] |
|
|
const currentDiv = textDivs[currentDivIndex] |
|
|
const originalText = currentDiv.dataset.originalText |
|
|
const originalText = currentDiv.dataset.originalText |
|
|
const isLastDiv = currentDivIndex === textDivs.length - 1 |
|
|
const isLastDiv = currentDivIndex === textDivs.length - 1 |
|
|
|
|
|
const isFirstDiv = currentDivIndex === 0 |
|
|
|
|
|
|
|
|
// Make div visible and prepare for typing
|
|
|
// Make div visible and prepare for typing
|
|
|
currentDiv.style.visibility = 'visible' |
|
|
currentDiv.style.visibility = 'visible' |
|
|
@ -342,7 +343,8 @@ function typeWriterConsoleSequential(container, options = {}) { |
|
|
currentDiv.classList.add('typing-active') |
|
|
currentDiv.classList.add('typing-active') |
|
|
|
|
|
|
|
|
let charIndex = 0 |
|
|
let charIndex = 0 |
|
|
let nextCharTime = performance.now() + 100 // Initial delay
|
|
|
|
|
|
|
|
|
// Add 1 second delay for first div to let cursor blink twice
|
|
|
|
|
|
let nextCharTime = performance.now() + (isFirstDiv ? 1100 : 100) |
|
|
|
|
|
|
|
|
function typeFrame(currentTime) { |
|
|
function typeFrame(currentTime) { |
|
|
if (!isActive) { |
|
|
if (!isActive) { |
|
|
|