Skip to content

Restore AnimatorAvatar fixes from Claude#18248

Merged
sebavan merged 11 commits intoBabylonJS:masterfrom
regnaio:claude-core-src-animations
Apr 7, 2026
Merged

Restore AnimatorAvatar fixes from Claude#18248
sebavan merged 11 commits intoBabylonJS:masterfrom
regnaio:claude-core-src-animations

Conversation

@regnaio
Copy link
Copy Markdown
Contributor

@regnaio regnaio commented Apr 7, 2026

Please see @Popov72 's comment here: #18234 (comment)

I accidentally removed some of the fixes from Claude, and this PR looks to restore them. Thank you for your help!

gbz and others added 11 commits April 3, 2026 15:57
- Fix inverted toString separator logic in Animation (comma on first item instead of subsequent)
- Fix missing .length in AnimationGroup.toString (printed array object instead of count)
- Guard against division by zero in AnimatorAvatar proportionRatio calculation
- Fix vertical axis auto-detection comparing only 2 of 3 axes in AnimatorAvatar
- Throw Error instead of string literal in PathCursor.move
- Remove dead duplicated RegisterTargetForLateAnimationBinding from animatable.core.ts
- Change == to === in ElasticEase.easeInCore for strict equality consistency
- Rename shadowed loop variable in AnimatorAvatar._fixAnimationGroup
- Replace verbose manual iterator patterns with for-of loops in AnimatorAvatar
- Add audit summary document

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The project's tsconfig does not enable --downlevelIteration, so
for-of on Set<T> causes TS2802. Restored the original manual
iterator pattern (.keys() / .next() / .done).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switching back to for-of to identify which build command
requires the manual iterator pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The UMD build (packages/public/umd/babylonjs/tsconfig.build.json)
targets ES5, which doesn't support for-of on Set without
--downlevelIteration. The manual iterator pattern is required.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Documents that the verbose iterator pattern is required because the
UMD build targets ES5 and for-of on Set needs --downlevelIteration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion artifacts

- Restore RegisterTargetForLateAnimationBinding as exported public API
- Fix @internal JSDoc on ElasticEase.easeInCore (was accidentally removed)
- Remove claude/ directory from tracked files
- Remove all inline "Claude explanation" comments from production code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep only the i→j rename for the inner loop variable that shadowed the
outer loop's i. Revert the vertical axis auto-detection and division-by-zero
guard changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sebavan sebavan enabled auto-merge (squash) April 7, 2026 20:35
@sebavan
Copy link
Copy Markdown
Member

sebavan commented Apr 7, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 7, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 7, 2026

Snapshot stored with reference name:
refs/pull/18248/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18248/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18248/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/18248/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18248/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18248/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18248/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/18248/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 7, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 7, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 7, 2026

@sebavan sebavan merged commit 555b715 into BabylonJS:master Apr 7, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants