TenTen Kit

টেনটেনকে যেকোনো ওয়েব পেজ, HTML স্লাইড বা ভিডিওর উপর ভাসমান চরিত্র হিসেবে বসাও। One JS file, no dependencies. Same character and rules as ReelMath: no mouth, ever; it never vanishes in place (it only flies off-screen); eyes glow while it talks.

১. Try it

Target #t1Target #t2
<script src="tenten.bundle.js"></script>
<script>
  const tt = TenTen.create({ size: 140 });
  tt.enter();
  tt.say('হাই! আমি টেনটেন');
  tt.point('#question', { say: 'এই প্রশ্নটা খেয়াল করো' });
  tt.celebrate();
  tt.exit();
</script>

Actions queue in order, and each one returns a Promise, so you can await it. Browsers only play sound after the first click or keypress on the page.

২. Where it works

Any web pageAdd tenten.bundle.js and call TenTen.create(). TenTen floats above everything.
HTML slidesexamples/slides.html: add data-tenten="say:…" on any element and TenTen acts on that slide. Also works with Reveal.js.
Over a video (web)examples/video-overlay.html: tt.sync(video, cues) fires actions at video timestamps and keeps up with seeking.
Video editorsTransparent clips in clips/: .mov (ProRes 4444, Premiere / Final Cut / CapCut / Keynote / PowerPoint), .webm (web), .gif (Google Slides / Canva).
Static designsassets/png/ (transparent 512 px) and assets/svg/ for every mood.
No codingSection ৫: a ready-to-copy prompt for ChatGPT, Claude or Gemini
Minimal embedexamples/minimal.html

৩. API

TenTen.create(opts)Options: size (140), parent (body, or an element/selector such as a video wrapper), sound (true), volume (0.6), draggable, onClick, start ('offscreen' or {x,y}), side ('right'), clock ('auto' or 'manual' + advance(dt))
enter({from,to}) / exit({to})Flies in from the side, or flies off-screen sideways. It never just disappears.
flyTo(target)The target can be an element, a selector, {x,y} in pixels, or {x:'80%',y:'70%'}. It flies in a low arc.
point(target,{say})Flies beside the element (on whichever side has room), looks at it and draws a pulsing ring around it.
say(text,{dur,mood})Shows a speech bubble while the eyes glow. The duration defaults to the length of the text.
think · wow · happy · sleepyShows a ? / ! / squint + blush / z mood for the given duration, then goes back to idle.
setMood(name,dur)idle | happy | think | wow | sleepy
hop · nod · shake · spin · blink · celebrateShort gestures. celebrate adds a sparkle burst and a success sound.
look(dir) · lookAt(target)Moves only the gaze.
followTarget(t) · unfollow()Follows 'mouse' or an element.
play(steps)[['enter'],['say','হাই'],['point','#a'],['exit']]
sync(video,cues)[{ t: 2.5, do: ['say','…'] }]
interrupt()Drops everything still queued, for example when the slide changes. TenTen stays where it is.
mute(bool) · destroy()

৪. Files (share the whole folder)

tenten.bundle.jsOne file with every sound inlined. Use this one.
tenten.jsSame code, but loads sounds from assets/sfx/ next to it.
assets/sfx/*.mp3 · sfx-wav/*.wavpop, whoosh, swoosh, blink, peek, chime, ding, success, tick, sting. Made in-house, so free to use.
assets/svg · assets/pngCharacter stills, one per mood
clips/Transparent animated clips (mov / webm / gif)

৫. কোডিং ছাড়াই: ChatGPT / Claude / Gemini-এর জন্য রেডি প্রম্পট

  1. নিচের Copy বাটনে চাপো।
  2. ChatGPT, Claude বা Gemini-তে পেস্ট করো। শেষের [ ] অংশে লেখো তুমি কী চাও আর তোমার কনটেন্ট দাও।
  3. AI একটা কোড দেবে। সেটা কপি করে Notepad-এ (Mac-এ TextEdit → Format → Make Plain Text) পেস্ট করো, তারপর lesson.html নামে সেভ করো।
  4. ফাইলটা Chrome-এ খোলো। একবার ক্লিক করো, তাহলে সাউন্ডও চালু হবে।

AI চ্যাটের ভেতরের প্রিভিউতে টেনটেন অনেক সময় দেখা যায় না, কারণ সেখানে বাইরের ফাইল লোড হতে দেয় না। ফাইলটা সেভ করে Chrome-এ খুললে ঠিকমতো চলবে।