stride3d / stride3d/stride

[Animation] Messy curve/animation/evaluator API

Open
#449 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Graphics enhancement good first issue
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Github

Version: Latest

Platform(s): Any

Describe the bug
The animation/curve API as it is is not very maintainable and quite restrictive, there's no reason now that generics supports unmanaged and interface type constraints to have two implementation of a class differing in only the generic type they chose, ex : AnimationCurveEvaluatorOptimizedVector3Group / AnimationCurveEvaluatorOptimizedVector4Group.
We can replace 2/3 of the files within /Animations by implementing and adding an IInterpolation interface on our math types and including it as a constraint on our generics requiring that kind of features.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing AnimationCurveEvaluatorOptimizedVector3Group.cs and AnimationCurveEvaluatorOptimizedVector4Group.cs, then inspect the surrounding files in sources/engine/Xenko.Engine/Animations and the relevant math types. Determine the shared interpolation requirements and the scope of an IInterpolation-based generic API. Done means the duplicated evaluator implementations are consolidated without losing the required curve and animation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.