<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"…
- User
REPLACE THE LIPS WITH MOVING EFFECT OF EYES AND EYE BROWS
- Assistant
REPLACE THE LIPS WITH MOVING EFFECT OF EYES AND EYE BROWS
To replace the lips animation with moving eyes and eyebrows in your ASCII art, you need to modify the frames to reflect changes in the eye and eyebrow areas instead of the lips. Below is the updated HTML and JavaScript code implementing the eye and eyebrow animation.
HTML and JavaScript Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Eyes and Eyebrows ASCII Animation</title>
<style>
pre {
font-family: monospace;
white-space: pre;
font-size: 10px;
line-height: 12px;
}
</style>
</head>
<body>
<pre id="face">
.' .*' `*. `. ; / .' .*'`-.
.' .' \ \ : / .*' `-.
/ / , ', -. `.
/ / _.._ : '. .-*""*-. `. \
/ .' .-' `-. '/ .' `-. \ \
, ,' .' .*""*-.\,: ,.-*"*-. `. .
/ .' .' ` ` `. `.
' / / `. \ . `
, . / \ \ ` ;
: , \ : \ ` :
; . \ . \ \ |
| ' : , . \ ; ;:
|: ; ` \ : ;|
|| | ; . ; ; ;;
;: | | ` ; | ||
L.\ | | .d$$s. .s$$b.. ; : |.:J
/ __`'; | *' `*Tb._ _.dP*' `* | | :__ \
..' .`.: | `*Ts' `sP*' ; | '. `,,
; / , ; .+s**s. `. .s**s+. :_;-.' \ :
: , /:; : \ *ss* \ ; / *ss* / +: \ . ;
.` : : , .+s$$$s+. .+s$$$s+. .* ; ; ',
\ *. ;*d$P*"$$$T$b ,+**+, d$P*"$$$T$b* .* /
\ ; ::$; +:$$$:$$;* *:$; +:$$$:$$; : /
: T$b._$$$d$P T$b._$$$d$P ;
`._.; ; `*T$$$P*' `*T$$$P*' :._.'
; : ' | `.
: \ :. , : `. \
\ `._ `*.__.*' ' \ \
</pre>
<pre id="eyes1" style="display: none;">
.' .*' `*. `. ; / .' .*'`-.
.' .' \ \ : / .*' `-.
/ / , ', -. `.
/ / _.._ : '. .-*""*-. `. \
/ .' .-' `-. '/ .' `-. \ \
, ,' .' .*""*-.\,: ,.-*"*-. `. .
/ .' .' ` ` `. `.
' / / `. \ . `
, . / \ \ ` ;
: , \ : \ ` :
; . \ . \ \ |
| ' : , . \ ; ;:
|: ; ` \ : ;|
|| | ; . ; ; ;;
;: | | ` ; | ||
L.\ | | .d$$s. .s$$b.. ; : |.:J
/ __`'; | *' `*Tb._ _.dP*' `* | | :__ \
..' .`.: | `*Ts' `sP*' ; | '. `,,
; / , ; .+s**s. `. .s**s+. :_;-.' \ :
: , /:; : \ *ss* \ ; / *ss* / +: \ . ;
.` : : , .+s$$$s+. .+s$$$s+. .* ; ; ',
\ *. ;*d$P*"$$$T$b ,+**+, d$P*"$$$T$b* .* /
\ ; ::$; +:$$$:$$;* *:$; +:$$$:$$; : /
: T$b._$$$d$P T$b._$$$d$P ;
`._.; ; `*T$$$P*' `*T$$$P*' :._.'
; : ' | `.
: \ :. , : `. \
\ `._ `*.__.*' ' \ \
</pre>
<pre id="eyes2" style="display: none;">
.' .*' `*. `. ; / .' .*'`-.
.' .' \ \ : / .*' `-.
/ / , ', -. `.
/ / _.._ : '. .-*""*-. `. \
/ .' .-' `-. '/ .' `-. \ \
, ,' .' .*""*-.\,: ,.-*"*-. `. .
/ .' .' ` ` `. `.
' / / `. \ . `
, . / \ \ ` ;
: , \ : \ ` :
; . \ . \ \ |
| ' , . \ ; ;:
| ; ` \ : ;|
|| | ; . ; ; ;;
;: | | ` ; | ||
L.\ | | .d$$s. .s$$b.. ; : |.:J
/ __`'; | *' `*Tb._ _.dP*' `* | | :__ \
..' .`.: | `*Ts' `sP*' ; | '. `,,
; / , ; .+s**s. `. .s**s+. :_;-.' \ :
: , /:; : \ *ss* \ ; / *ss* / +: \ . ;
.` : : , .+s$$$s+. .+s$$$s+. .* ; ; ',
\ *. ;*d$P*"$$$T$b ,+**+, d$P*"$$$T$b* .* /
\ ; ::$; +:$$$:$$;* *:$; +:$$$:$$; : /
: T$b._$$$d$P T$b._$$$d$P ;
`._.; ; `*T$$$P*' `*T$$$P*' :._.'
; : ' | `.
: \ :. , : `. \
\ `._ `*.__.*' ' \ \
</pre>
<pre id="eyes3" style="display: none;">
.' .*' `*. `. ; / .' .*'`-.
.' .' \ \ : / .*' `-.
/ / , ', -. `.
/ / _.._ : '. .-*""*-. `. \
/ .' .-' `-. '/ .' `-. \ \
, ,' .' .*""*-.\,: ,.-*"*-. `. .
/ .' .' ` ` `. `.
' / / `. \ . `
, . / \ \ ` ;
: , \ : \ ` :
; . \ . \ \ |
| ' O , . \ ; ;:
|O ; ` \ : ;|
|| | ; . ; ; ;;
;: | | ` ; | ||
L.\ | | .d$$s. .s$$b.. ; : |.:J
/ __`'; | *' `*Tb._ _.dP*' `* | | :__ \
..' .`.: | `*Ts' `sP*' ; | '. `,,
; / , ; .+s**s. `. .s**s+. :_;-.' \ :
: , /:; : \ *ss* \ ; / *ss* / +: \ . ;
.` : : , .+s$$$s+. .+s$$$s+. .* ; ; ',
\ *. ;*d$P*"$$$T$b ,+**+, d$P*"$$$T$b* .* /
\ ; ::$; +:$$$:$$;* *:$; +:$$$:$$; : /
: T$b._$$$d$P T$b._$$$d$P ;
`._.; ; `*T$$$P*' `*T$$$P*' :._.'
; : ' | `.
: \ :. , : `. \
\ `._ `*.__.*' ' \ \
</pre>
<pre id="eyes4" style="display: none;">
.' .*' `*. `. ; / .' .*'`-.
.' .' \ \ : / .*' `-.
/ / , ', -. `.
/ / _.._ : '. .-*""*-. `. \
/ .' .-' `-. '/ .' `-. \ \
, ,' .' .*""*-.\,: ,.-*"*-. `. .
/ .' .' ` ` `. `.
' / / `. \ . `
, . / \ \ ` ;
: , \ : \ ` :
; . \ . \ \ |
| ' , . \ ; ;:
| ; ` \ : ;|
|| | ; . ; ; ;;
;: | | ` ; | ||
L.\ | | .d$$s. .s$$b.. ; : |.:J
/ __`'; | *' `*Tb._ _.dP*' `* | | :__ \
..' .`.: | `*Ts' `sP*' ; | '. `,,
; / , ; .+s**s. `. .s**s+. :_;-.' \ :
: , /:; : \ *ss* \ ; / *ss* / +: \ . ;
.` : : , .+s$$$s+. .+s$$$s+. .* ; ; ',
\ *. ;*d$P*"$$$T$b ,+**+, d$P*"$$$T$b* .* /
\ ; ::$; +:$$$:$$;* *:$; +:$$$:$$; : /
: T$b._$$$d$P T$b._$$$d$P ;
`._.; ; `*T$$$P*' `*T$$$P*' :._.'
; : ' | `.
: \ :. , : `. \
\ `._ `*.__.*' ' \ \
</pre>
<script>
// Store the frames with eye and eyebrow movements
const eyes = [
document.getElementById('eyes1').innerHTML,
document.getElementById('eyes2').innerHTML,
document.getElementById('eyes3').innerHTML,
document.getElementById('eyes4').innerHTML
];
const faceElement = document.getElementById('face');
function animateEyes() {
let frame = 0;
function updateEyes() {
faceElement.innerHTML = eyes[frame % 4];
frame++;
// Random pause to simulate natural blinking
const pause = Math.random() < 0.2 ? 800 : 200;
setTimeout(updateEyes, pause);
}
updateEyes();
}
animateEyes();
</script>
</body>
</html>
Explanation of Changes:
Modified Frames:
lips1 to lips4 with eyes1 to eyes4.Eye Movements:
eyes1): Original face with eyes open.eyes2): Removed the colon characters : representing eyes to simulate closed eyes.eyes3): Replaced colons : with capital letter O to simulate eyes wide open.eyes4): Same as eyes2 to continue the blinking effect.JavaScript Adjustments:
lips to eyes to reflect the new animation.animateLips() to animateEyes().setTimeout to simulate natural blinking rather than talking.Animation Logic:
eyes array, updating the innerHTML of the face element with each frame.Result:
When you run this code in a browser, you will see the ASCII art face with moving eyes and eyebrows. The eyes will appear to blink and occasionally widen, providing a dynamic effect focused on the eyes and eyebrows instead of the lips.
Feel free to customize the frames further to achieve different expressions or movements by modifying the characters in the ASCII art. This way, you can create a variety of animations for the eyes and eyebrows.
Not yet included in a published release.