Skip to content

Some fun code. You can rotate a smiley with your finger or mouse.

License

Notifications You must be signed in to change notification settings

blaumeise20/rotating-smiley

Repository files navigation

Rotating smiley

This is a smiley you can rotate with your mouse or finger.

Try it out

To run this app, you have to install the dependencies first:

npm install

To start the app, run this:

npm start

It will start a server at http://localhost:3050 (you can specify the port in the PORT env variable). Open the URL and enjoy!

Story

You may ask, why I made this. At some point I came across a site with a puzzle. There was a grid of letters and a card with holes, which could be rotated like my smiley now. I just asked myself, how it works, but I didn't do any more research. Then, at some point, I visited my uncle. He is a math teacher at a highschool, so I asked him if he could help me with this. We sat down together, he told me the formulars and calculations, and I wrote it down in JavaScript. The original HTML file I made can be found in original.html. The code you can find in /src is a more beautiful and commented version of my rotating smiley.

Smiley image

The smiley in this app is from Apple's smiley collection. It is a screenshot of the "grinning" smiley, scaled up.

Licence

MIT licence

Copyright (c) 2021 Alvin Ramskogler

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Some fun code. You can rotate a smiley with your finger or mouse.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published