aframe icon indicating copy to clipboard operation
aframe copied to clipboard

Scaling animation cannot handle negative numbers

Open abek42 opened this issue 5 years ago • 3 comments

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.

abek42 avatar Feb 21 '20 23:02 abek42

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;"

mneunomne avatar Jun 15 '20 22:06 mneunomne

This issue remains, tested on both 1.1.0 and 1.2.0

koktavy avatar May 28 '21 18:05 koktavy

Addressed by https://github.com/aframevr/aframe/pull/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.

mrxz avatar Dec 09 '23 15:12 mrxz