Add configurable easing curve property to all effects#21
Draft
Add configurable easing curve property to all effects#21
Conversation
Replace hard-coded envelope/easing logic in every effect runner with a configurable AnimationCurve property named easing_curve. - Add EntityCurveExtensions.cs with GetAnimationCurve extension method - Add GetAnimationCurve stub to Entity in CiGameTypeStubs.cs - For all 13 effects: add easing_curve to template properties, read it in TrySchedule, pass to runner Initialize, store in _easingCurve field, and use _easingCurve.Evaluate(progress) in LateUpdate - Default curves exactly replicate the original hard-coded behaviour: - CameraShake: linear decay (0,1)→(1,0) tangents -1 - CameraTilt: sine bell via keyframes at 0/0.5/1 with π tangents - ColorTint/Fog/Hsl/Sepia/Vignette: 20%/80% trapezoid slopes ±5 - Letterbox/PixelGrid/Scanlines/ScreenNoise: 15%/85% trapezoid slopes ±20/3 - ZoomIn/ZoomOut: SmoothStep 20%/80% trapezoid (all tangents 0) - ZoomPulse: triangle peaking at 30%, slopes 10/3 and -10/7 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…urve Co-authored-by: Brollyy <12004018+Brollyy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add property for configuring easing curves in effects
Add configurable easing curve property to all effects
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All effects with time-varying intensity had their envelope shapes hard-coded (linear decay, trapezoid fade-in/out, SmoothStep, sine bell, etc.) with no way for users to change them in the editor.
Changes
Runtime support
Core/EntityCurveExtensions.cs— newGetAnimationCurve(this Entity, string key, AnimationCurve fallback)extension method; used in real game builds where the game'sEntitymay not expose this nativelyStubs/CiGameTypeStubs.cs— matchingGetAnimationCurveinstance method added to the CI stubEntityPer-effect changes (14 effects)
Each effect receives:
["easing_curve"] = DefaultEasingCurve()inCreateTemplate— default keyframes exactly replicate the previous hard-coded shapeentity.GetAnimationCurve("easing_curve", DefaultEasingCurve())read inTrySchedule, passed through toInitialize_easingCurve.Evaluate(progress)replacing all hard-coded envelope math inLateUpdateDefault curves (all backward-compatible)
(0,1)→(1,0)Docs
docs/effects/README.mdupdated witheasing_curveproperty entry for all 14 effects.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.