{"id":22421994,"url":"https://github.com/rephidock/rephidock.atomicanimations","last_synced_at":"2025-03-27T05:21:53.883Z","repository":{"id":232221653,"uuid":"763101446","full_name":"Rephidock/Rephidock.AtomicAnimations","owner":"Rephidock","description":"Classes for simple animations that accept delegates","archived":false,"fork":false,"pushed_at":"2024-05-21T21:02:05.000Z","size":253,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T15:39:40.634Z","etag":null,"topics":["animation","easing","tween"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rephidock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-02-25T15:07:54.000Z","updated_at":"2024-05-28T19:05:15.364Z","dependencies_parsed_at":"2024-04-08T18:41:28.363Z","dependency_job_id":"bf531f5b-f7db-4dc6-ba3b-5062210b11ae","html_url":"https://github.com/Rephidock/Rephidock.AtomicAnimations","commit_stats":null,"previous_names":["rephidock/rephidock.atomicanimations"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rephidock%2FRephidock.AtomicAnimations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rephidock%2FRephidock.AtomicAnimations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rephidock%2FRephidock.AtomicAnimations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rephidock%2FRephidock.AtomicAnimations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rephidock","download_url":"https://codeload.github.com/Rephidock/Rephidock.AtomicAnimations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245786460,"owners_count":20671760,"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","easing","tween"],"created_at":"2024-12-05T17:10:37.556Z","updated_at":"2025-03-27T05:21:53.857Z","avatar_url":"https://github.com/Rephidock.png","language":"C#","readme":"# Rephidock.AtomicAnimations\n\n[![GitHub License Badge](https://img.shields.io/github/license/Rephidock/Rephidock.AtomicAnimations)](https://github.com/Rephidock/Rephidock.AtomicAnimations/blob/main/LICENSE) [![Nuget Version Badge](https://img.shields.io/nuget/v/Rephidock.AtomicAnimations?logo=nuget)](https://www.nuget.org/packages/Rephidock.AtomicAnimations)\n\nBasic callback-based user-controlled animations and coroutines written in vanilla C#.\n\n\n\n## Quick summary\n\nThe package provides:\n- Animation 'atoms', which mutate `float` values via addition or overwriting using callbacks.\n- `AnimationRunner` and `AnimationQueue` to run given animations.\n- Waves for animations that can be interpreted as moving waves (curves).\n- Coroutines – animations based on `IEnumerable\u003cT\u003e`, allowing for state and logic.\n\nThis package does *not* create additional clocks or threads to be transparent about control flow. Use the `Update(TimeSpan deltaTime)` to provide time flow to animations, runners and queues.\n\nAdditionally queues and coroutines account for excess time since each atom finishes for better accuracy when chaining animations together.\n\n\n\n## Contents\n\nThe package provides the following animations out of the box:\n\n| Animation                        | Summary                                                     |\n| -------------------------------- | ----------------------------------------------------------- |\n| `Shift1D`, 2D, 3D, 4D            | Changes 1 to 4 values by adding differences between updates |\n| `Move1D`, 2D, 3D, 4D             | Changes 1 to 4 values by setting values directly            |\n| `.Waves.WaveEase`                | Calls an update delegate with a moving Wave (curve)         |\n| `.Coroutines.CoroutineAnimation` | Structures others animations, timing, state and logic       |\n\nTo control the easing of values use the static methods in the `Easing` class. All easing functions are normalized.\n`EasingCurve` delegate is included.\n\n\nUse a queue or a runner to execute multiple animations.\nAnimations can be added to both during their runtime (fire-and-forget).\n\n| Runner            | Summary                                                                  |\n| ----------------- | ------------------------------------------------------------------------ |\n| `AnimationRunner` | Runs animations in parallel. Starts animations the moment they are added |\n| `AnimationQueue`  | Runs animations in series. Supports `Lazy\u003cAnimation\u003e`                    |\n\n\nFor creating animations from scratch you can use the following classes in the `.Base` namespace:\n\n| Abstract Class   | Summary                                                 |\n| ---------------- | ------------------------------------------------------- |\n| `Animation`      | Base class for all animations                           |\n| `TimedAnimation` | `Animation` with a known Duration                       |\n| `Ease`           | `TimedAnimation` with defined easing and progress value |\n\n\n### `.Waves` namespace\n\nThe `.Waves` namespaces allows for animations that can be interpreted as a moving wave.\n\nUse the `WaveBuilder` to scale and join multiple `EasingCurve`s together, forming a more complex `Wave`. The waves do not have to start and end at the same value and extend infinitely out of bounds as flat lines.\n\nThe `WaveEase.CreateRunthrough` will create an animation atom that moves a given wave through a span of known width calling a delegate with a `ShiftedWave` each update.\n\n\n### `.Coroutines` namespace\n\nThe `CoroutineAnimation` allows for building more complex animations. It is based on `IEnumerable\u003cCoroutineYield\u003e`, which can hold state and logic if made using a custom iterator/generator.\n\nA single `CoroutineYield` holds either\n- an animation that is to play the moment it is returned or \n- a separate delay instruction\n\nThe following delays are possible:\n- (static) `CoroutineYield.WaitPrevious`: Waiting for the previous animation to finish\n- (static) `CoroutineYield.Join`: Waiting for all previous animations to finish\n- (static) `CoroutineYield.Sleep`: Waiting for a delay of specified time\n- `CoroutineYield.WaitUntil`: Waiting until a timestamp (since the animation has begun)\n- `CoroutineYield.WaitUntilPredicate`: Waiting until a condition is satisfied\n- (static) `CoroutineYield.Suspend`: Suspending an update without influencing the flow of time\n\nThis allows mixing both serial and parallel execution.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frephidock%2Frephidock.atomicanimations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frephidock%2Frephidock.atomicanimations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frephidock%2Frephidock.atomicanimations/lists"}