Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/navidk0/clippy
Fork of clippyjs and clippyts
https://github.com/navidk0/clippy
Last synced: about 1 month ago
JSON representation
Fork of clippyjs and clippyts
- Host: GitHub
- URL: https://github.com/navidk0/clippy
- Owner: NavidK0
- License: other
- Created: 2024-02-19T01:25:57.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-25T21:00:42.000Z (10 months ago)
- Last Synced: 2024-03-25T22:23:55.109Z (10 months ago)
- Language: TypeScript
- Size: 11.4 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Clippy
> Fork of a fork of a fork of a fork of the original clippy.js by https://www.smore.com/
![clippy-agents](https://user-images.githubusercontent.com/3016806/223058578-e4123bc3-0f4b-4913-a15d-d04e8be04525.png)
## Usage
### NPM / Webpack
```ts
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:
```js
// 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
- [pi0 for the original clippyJS implementation](https://github.com/pi0/clippyjs)
- The [Clippy.JS](http://smore.com/clippy-js) project by [Smore](http://smore.com)
- The awesome [Cinnamon Software](http://www.cinnamonsoftware.com/) for
developing [Double Agent](http://doubleagent.sourceforge.net/)
the program we used to unpack Clippy and his friends!
- Microsoft, for creating clippy :)### Original Projects and Forks
- https://github.com/pi0/clippyjs
- https://github.com/lizozom/clippyts