{"id":21304993,"url":"https://github.com/maximilianmairinger/spreadoffset","last_synced_at":"2025-03-15T19:26:40.358Z","repository":{"id":57367932,"uuid":"228867914","full_name":"maximilianMairinger/spreadOffset","owner":"maximilianMairinger","description":"Spread missing offset properties to keyframes with interpolated values","archived":false,"fork":false,"pushed_at":"2019-12-18T17:51:21.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-23T20:06:02.953Z","etag":null,"topics":["animation","distribute","interpolate","keyframes","missing","offset","spread"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/spread-offset","language":"TypeScript","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/maximilianMairinger.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":"2019-12-18T15:23:18.000Z","updated_at":"2019-12-18T17:51:23.000Z","dependencies_parsed_at":"2022-08-23T19:40:48.274Z","dependency_job_id":null,"html_url":"https://github.com/maximilianMairinger/spreadOffset","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/maximilianMairinger%2FspreadOffset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FspreadOffset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FspreadOffset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FspreadOffset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximilianMairinger","download_url":"https://codeload.github.com/maximilianMairinger/spreadOffset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243779639,"owners_count":20346750,"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":["animation","distribute","interpolate","keyframes","missing","offset","spread"],"created_at":"2024-11-21T16:16:34.915Z","updated_at":"2025-03-15T19:26:40.326Z","avatar_url":"https://github.com/maximilianMairinger.png","language":"TypeScript","readme":"# Spread offset\n\nSpread missing offset properties to keyframes with interpolated values.\n\nThis is a similar implementation to the programatical offset interpolatgion used in the native `ELement.prototype.animate()` method. Useing keyframes parsed and not parsed by spread offset in an `animation` will result in the same results. This is just usefull for customt tween animation engines or if youd like to inject something at a spesific offset prior to running an `animation`.\n\n## Example\n\nOffsets must be given in incrementing sequence, spanning between 0 .. 1.\n\n```js\nimport spreadOffset from \"spread-offset\"\n\nlet r = spreadOffset([\n  {value: \"val\"},\n  {value: \"val\"},\n  {value: \"val\"},\n  {value: \"val\"}\n])\n\n// results to\n\nr = [\n  {value: \"val\", offset: 0},\n  {value: \"val\", offset: 0.333333333333},\n  {value: \"val\", offset: 0.666666666666},\n  {value: \"val\", offset: 1}\n]\n```\n\nSpread offset respects existing offset declarations, and interpolates around them.\n\n```js\nlet r = spreadOffset([\n  {value: \"val\"},\n  {value: \"val\"},\n  {value: \"val\", offset: 0.5},\n  {value: \"val\"}\n])\n\n// results to\n\nr = [\n  {value: \"val\", offset: 0},\n  {value: \"val\", offset: 0.25},\n  {value: \"val\", offset: 0.5},\n  {value: \"val\", offset: 1}\n]\n```\n\n\n## Conribute\n\nAll feedback is appreciated. Create a pull request or write an issue.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianmairinger%2Fspreadoffset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximilianmairinger%2Fspreadoffset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianmairinger%2Fspreadoffset/lists"}