Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaling animation cannot handle negative numbers #4490

Open
abek42 opened this issue Feb 21, 2020 · 3 comments
Open

Scaling animation cannot handle negative numbers #4490

abek42 opened this issue Feb 21, 2020 · 3 comments

Comments

@abek42
Copy link

abek42 commented Feb 21, 2020

Description:
Attempting to scale to -1 from 1 only completes till 0.001 and stops there.
Potential duplicate of #4263 but now with example code.

  • A-Frame Version: >1.0.0
  • Platform / Device: Win10/Firefox 73.0.1
  • Reproducible Code Snippet or URL: https://judicious-morocco-9avsv2b5p.glitch.me/scaleAnimBug.html
    Click once to reveal letter 'E' made out of blocks
    Click second time to attempt scale to -1 1 1
    Expected result: A mirrored 'E'.
    Actual result: Thin sliver with scale.x = 0.001

Thanks.

@mneunomne
Copy link

mneunomne commented Jun 15, 2020

Experiencing the same issue, following animation property set entity with scale "0 1 1" instead of "-1 1 1"
animation__enter_scale="property: scale; from: -1 1 0.5; to: -1 1 1.0; dur: 500; startEvents: show; dir: alternate;"

@koktavy
Copy link

koktavy commented May 28, 2021

This issue remains, tested on both 1.1.0 and 1.2.0

@mrxz
Copy link
Contributor

mrxz commented Dec 9, 2023

Addressed by #5404. It seems the animation component tries to prevent zero values by capping at an epsilon. This (unintentionally?) prevented negative scales, but this is no longer needed. So once the check is removed negative scales should work.

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

No branches or pull requests

4 participants