playcanvas / playcanvas/engine
Refactor framework/anim
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
- currently the anim functionality lives on a framework level, but I think some parts of it should be separated and moved to lower level (scene, or possibly even core).
Specifically, I think the evaluator subfolder should be part of scene, but most likely even core, as majority of it is just a core math implementation. Few dependencies would need to be removed, for example:
- AnimEvaluator should probably not use binder at all. It should only blend animations and store them on outputs, and the caller of this should then pass those outputs into the binder, instead of evaluator doing it, and then calling update on it as well.
Also, anim-state-graph.js should probably move to parsers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the framework/anim directory, especially its evaluator subfolder and anim-state-graph.js, and trace how AnimEvaluator uses binder and updates outputs. Map the dependencies and callers before deciding which pieces can move to scene or core and whether anim-state-graph.js belongs in parsers; the refactor is done when those boundaries and caller responsibilities are separated without breaking animation behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100