{"id":21819569,"url":"https://github.com/halvves/komotion","last_synced_at":"2025-03-21T10:41:09.715Z","repository":{"id":85930572,"uuid":"65831128","full_name":"halvves/komotion","owner":"halvves","description":"Kony animations made easier","archived":false,"fork":false,"pushed_at":"2021-09-02T17:28:53.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-26T07:11:19.633Z","etag":null,"topics":["kony","kony-animations"],"latest_commit_sha":null,"homepage":null,"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/halvves.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-16T15:22:16.000Z","updated_at":"2024-02-26T10:08:00.000Z","dependencies_parsed_at":"2023-05-20T13:00:44.231Z","dependency_job_id":null,"html_url":"https://github.com/halvves/komotion","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/halvves%2Fkomotion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halvves%2Fkomotion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halvves%2Fkomotion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halvves%2Fkomotion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halvves","download_url":"https://codeload.github.com/halvves/komotion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244780202,"owners_count":20509310,"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":["kony","kony-animations"],"created_at":"2024-11-27T16:20:05.544Z","updated_at":"2025-03-21T10:41:09.710Z","avatar_url":"https://github.com/halvves.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Komotion\n\nAt work there have been a few clients who prefer their applications built in the Kony platform. I have been tasked with creating the animations in these projects. Writing simple animations in Kony has seemed a little weird to me. I found myself writing the same code 80% of the time. Komotion is a simple utility to make writing simple animations easier and more sensible (more complex keyframes will still need to directly use the kony animation API).\n\n## Use\n\nUsing Komotion is just a matter of dropping `komotion.js` into your `project/modules/` folder.\n\n## Example\n\nWriting basic from/to animations in Kony can be needlessly complicated:\n```javascript\nfunction myAnimation() {\n  var element = myForm.myFlex.myElement;\n\n  var elTo = kony.ui.makeAffineTransform();\n  elTo.translate(150, 150);\n  elTo.scale(3, 3);\n  elTo.rotate(-55);\n\n  var elFrom = kony.ui.makeAffineTransform();\n  elFrom.translate(0, 0);\n  elFrom.scale(1, 1);\n  elFrom.rotate(0);\n\n  var before = function() {\n    alert('starting animation');\n  };\n\n  var after = function() {\n    alert('animation end');\n  }\n\n  var anim = kony.ui.createAnimation({\n    0: {\n      \"opacity\": 0,\n      \"transform\": elFrom\n    },\n    100: {\n      \"stepConfig\": {\n        \"timingFunction\": [0.445, 0.050, 0.550, 0.950]\n      },\n      \"opacity\": 1,\n      \"transform\": elTo\n    }\n  });\n\n  var config = {\n    \"duration\": 2,\n    \"iterationCount\": 1,\n    \"delay\": 1,\n    \"fillMode\": kony.anim.FILL_MODE_FORWARDS\n  };\n\n  var callbacks = {\n    \"animationStart\": before,\n    \"animationEnd\": after\n  };\n\n  element.animate(anim, config, callbacks);\n}\n```\n\n\nThe same animation written using Komotion:\n```javascript\nfunction myAnimation() {\n  var element = myForm.myFlex.myElement;\n\n  var elTo = komotion.transform([\n    [\"translate\", 150, 150],\n    [\"scale\", 3, 3],\n    [\"rotate\", -55]\n  ]);\n\n  var elFrom = komotion.transform([\n    [\"translate\", 0, 0],\n    [\"scale\", 1, 1],\n    [\"rotate\", 0]\n  ]);\n\n  var before = function() {\n    alert('starting animation');\n  };\n\n  var after = function() {\n    alert('animation end');\n  }\n\n  element.animate(\n    komotion.fromTo([\n      [\"opacity\", 0, 1],\n      [\"transform\", elFrom, elTo]\n    ], \"easeInOutSine\"),\n    komotion.config(1, 2),\n    komotion.cb(before, after)\n  );\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalvves%2Fkomotion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalvves%2Fkomotion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalvves%2Fkomotion/lists"}