aframe
aframe copied to clipboard
Scaling animation cannot handle negative numbers
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.
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;"
This issue remains, tested on both 1.1.0 and 1.2.0
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.