clippy

Clippy

Add Clippy or his friends to any website for instant nostalgia.

Demos

Please be patient for first load. It may take some time as agents are loaded one by one.

clippy-agents

Usage

Demo

Run npm run demo to view the agent demo page.

NPM / Webpack

npm install clippyts
import clippy from "clippyts"

clippy.load("Merlin", (agent: Agent) => {
  // Do anything with the loaded agent
  agent.show();
});

Actions

All the agent actions are queued and executed by order, so you can stack them:

// Play a given animation
agent.play("Searching");

// Play a random animation
agent.animate();

// Get a list of all the animations
agent.animations();
// => ["MoveLeft", "Congratulate", "Hide", "Pleased", "Acknowledge", ...]

// Show text balloon
agent.speak("When all else fails, bind some paper together. My name is Clippy.");

// Move to the given point, use animation if available
agent.moveTo(100,100);

// Gesture at a given point (if gesture animation is available)
agent.gestureAt(200,200);

// Stop the current action in the queue
agent.stopCurrent();

// Stop all actions in the queue and go back to idle mode
agent.stop();

Special Thanks