playcanvas / playcanvas/engine

Invalid Anim curves counting

Open
#6,150 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: animation
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

When Anim Evaluator removes a clip during rebinding, it tries to decrease the curves counter:

image

However, it is an AnimTarget that doesn't have such property:

image

I think it is expected to reduce it on the related element of this._outputs[] instead:

image

As a result, we get an AnimTarget with NaN curves and output target object does not decrease the counter:

image

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 in the Anim Evaluator rebinding path where a clip is removed, and inspect how the related element of this._outputs[] tracks its curves counter versus the AnimTarget. Reproduce the removal case and verify that the AnimTarget does not become NaN and the output target counter decreases correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.