{"id":15386638,"url":"https://github.com/pixelscommander/propeller","last_synced_at":"2025-04-04T20:07:06.006Z","repository":{"id":13170074,"uuid":"15853117","full_name":"PixelsCommander/Propeller","owner":"PixelsCommander","description":"JavaScript library to rotate elements with mouse or touch gestures. Supports inertia and stepwise rotation. Optimized for better performance.","archived":false,"fork":false,"pushed_at":"2018-02-24T17:12:36.000Z","size":177,"stargazers_count":412,"open_issues_count":13,"forks_count":56,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-28T19:05:48.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pixelscommander.com/polygon/propeller/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PixelsCommander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-12T23:18:52.000Z","updated_at":"2024-12-12T21:31:07.000Z","dependencies_parsed_at":"2022-08-25T17:02:14.680Z","dependency_job_id":null,"html_url":"https://github.com/PixelsCommander/Propeller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FPropeller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FPropeller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FPropeller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FPropeller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PixelsCommander","download_url":"https://codeload.github.com/PixelsCommander/Propeller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242671,"owners_count":20907133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:50:01.488Z","updated_at":"2025-04-04T20:07:05.983Z","avatar_url":"https://github.com/PixelsCommander.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Propeller.js](http://pixelscommander.com/polygon/propeller/logo.gif \"JavaScript library to rotate HTML elements by mouse or touch gestures\")\n\nJavaScript library to rotate elements by mouse. Supports inertia and stepwise rotation. It is also compatible with touch devices.\n\n[Lot of demos](http://pixelscommander.com/polygon/propeller/example/jquerygrid.html)\n\n[Spinner game drawn by my doughter](http://pixelscommander.com/polygon/spinner/)\n\n[Project page](http://pixelscommander.com/polygon/propeller/)\n\n![Propeller.js](http://pixelscommander.com/polygon/propeller/example/demo.gif \"JavaScript library to rotate HTML elements by mouse or touch gestures\")\n\n##\nUsage\n\n#### Available on NPM\n    npm install Propeller\n\n#### Easy-to-use as jQuery plugin:\n    $(nodeOrSelector).propeller(options);\n\n#### or zero-dependancy library \n    new Propeller(nodeOrSelector, options)\n\n## Performance\nPropeller uses requestAnimationFrame and GPU compositing for better performance.\n    \n## Options\n- **angle** sets initial angle\n- **inertia** is the most valueble option. It is a number between 0 and 1. 0 means no rotation after mouse was released. 1 means infinite rotation. For this demo we use inertia equals to 0.99.\n- **speed** - initial speed of rotation. It also can be used as property in runtime.\n- **minimalSpeed** - minimal speed of rotation. Works only if propeller have inertia between 0 and 1.\n- **step** allows to set step in degrees for stepwise mode.\n- **stepTransitionTime** enables CSS transition to move from step to step. This makes steps smooth and allows to use CSS transitions easing.\n- **stepTransitionEasing** CSS easing mode for transition when in stepwise mode and stepTransitionTime is more than zero. [A bit more about easing functions](http://www.w3schools.com/cssref/css3_pr_transition-timing-function.asp)\n- **onRotate** callback executed when rotated. You can easily get current angle as **this.angle** inside of callback function.\n- **onStop** callback executed when stopped.\n- **onDragStart** callback executed when start dragging.\n- **onDragStop** callback executed when stop dragging.\n\n## Methods\n- **unbind** unbind listeners to make propeller inactive, this does not stop rotation\n- **bind** bind listeners after they were unbinded\n- **stop** stop rotation immidiately\n\n## Public properties\n- **angle** current propellers angle.\n- **speed** current speed of rotation. Degrees per frame.\n\n## License\n\nMIT: http://mit-license.org/\n\nCopyright 2014 Denis Radin aka [PixelsCommander](http://pixelscommander.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelscommander%2Fpropeller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelscommander%2Fpropeller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelscommander%2Fpropeller/lists"}