Aesthetic Puppetry: Animated Detail and Graceful Camera Work – AI Generated Video | Hailuo AI

Generate & Play Hailuo AI video:import { gsap } from "gsap"; // Creating a doll object const doll = { mouth: document.getElementById("mouth"), leftArm: document.getElementById("left-arm"), rightArm: document.getElementById("right-arm"), }; // Function to animate the mouth while speaking function talk(text, callback) { let words = text.split(" "); let i = 0; const interval = setInterval(() => { if (i >= words.length) { clearInterval(interval); if (callback) callback(); return; } gsap.to(doll.mouth, { scaleY: 1.5, duration: 0.1, yoyo: true, repeat: 1 }); i++; }, 300); } // Function to animate the arms function gesture() { gsap.to([doll.leftArm, doll.rightArm], { rotation: 20, duration: 0.5, yoyo: true, repeat: 5 }); } // Telling the story of the three pieces of advice function tellStory() { let story = [ "Never take shortcuts in your life, shorter paths can be dangerous.", "Never be too curious, curiosity can lead to danger.", "Never make decisions when you are angry, you might regret it later." ]; let i = 0; function tellPart() { if (i < story.length) { gesture(); talk(story[i], () => { i++; setTimeout(tellPart, 2000); }); } } tellPart(); } // Starting the story document.getElementById("start-btn").addEventListener("click", tellStory);

Original AI Prompt

Generate & Play Hailuo AI video:import { gsap } from "gsap"; // Creating a doll object const doll = { mouth: document.getElementById("mouth"), leftArm: document.getElementById("left-arm"), rightArm: document.getElementById("right-arm"), }; // Function to animate the mouth while speaking function talk(text, callback) { let words = text.split(" "); let i = 0; const interval = setInterval(() => { if (i >= words.length) { clearInterval(interval); if (callback) callback(); return; } gsap.to(doll.mouth, { scaleY: 1.5, duration: 0.1, yoyo: true, repeat: 1 }); i++; }, 300); } // Function to animate the arms function gesture() { gsap.to([doll.leftArm, doll.rightArm], { rotation: 20, duration: 0.5, yoyo: true, repeat: 5 }); } // Telling the story of the three pieces of advice function tellStory() { let story = [ "Never take shortcuts in your life, shorter paths can be dangerous.", "Never be too curious, curiosity can lead to danger.", "Never make decisions when you are angry, you might regret it later." ]; let i = 0; function tellPart() { if (i < story.length) { gesture(); talk(story[i], () => { i++; setTimeout(tellPart, 2000); }); } } tellPart(); } // Starting the story document.getElementById("start-btn").addEventListener("click", tellStory);

Download

AI-Powered Analysis

The video presents a story through animated puppetry, emphasizing the importance of life lessons and advice.

You Might Also Like