Skip to content

NavidK0/clippy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

34525c6 · Mar 25, 2024

History

9 Commits
Mar 25, 2024
Mar 25, 2024
Feb 19, 2024
Mar 25, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Mar 25, 2024
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 20, 2024

Repository files navigation

Clippy

Fork of a fork of a fork of a fork of the original clippy.js by https://www.smore.com/

clippy-agents

Usage

NPM / Webpack

import clippy from "clippy"

clippy.load({
  name: agentName,

  // allowDrag: false,
  // allowDoubleClick: false,
  // enableSounds: false,

  onSuccess: (agent) => {
    window[agentName] = agent;

    // Do something with the agent
    agent.show();

    // Move it instantly to start it from somewhere
    agent.moveTo(100, 100, 0);
  },
});

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

Original Projects and Forks

About

Fork of clippyjs and clippyts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages