😹tsneko
tsneko is a js library which adds a neko to your website ~ A cat that chases the cursor on your screen
Idea and assets stolen from webneko.net
States
- Still
- Alert
- Run
- Itch
- Scratch
- Yawn
- Sleep
Styles
You can find different neko styles in example/assets/
directory.
🚀Example
You can run a demo locally:
npm installnpm run example
Navigate to http://127.0.0.1:8080 or http://localhost:8080 to see a live demo
🛠️Installation and Usage
Webpage
If you simply want to add it to your 🕸️webpage🕸️:
<!-- then -->
Node
If you want to use it in your node project:
Use the node package manager npm
npm install tsneko
Import:
CommonJS
const tsneko = ;
ES6 modules
;
Use:
// You can also use the neko class only (without drawing it on the screen)let neko = tsneko; neko; // to update the state nekostatex nekostatey; // to get neko positionnekoimg; // to get the image // You can actually try to embed it into an electron app// see src/web.ts for browser implementation
📑Documentation
The code is well documented using typedoc
The documentation is hosted using github pages here
To generate documentation locally:
npm run doc:gen
To host it locally
npm run doc:host
Then navigate to localhost:3228 in your web browser
🎉Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
! I would be glad if some of you javascript tryhards could kindly setup webpack or npm scripts
License
⚠️Warning⚠️
code stinks
although it shouldn't matter to you if you only want to use it