Greensock Tweenlite transformations

拟墨画扇 提交于 2019-12-13 05:21:42

问题


I'm using tweenlite library to rotate, move and zoom image. The problem is, that I get 3D transformations on image, but I would like to have 2D transformations. If tweenlite detects that there is browser which doesn't support 3D, he will do 2d. How can I force him to always do 2D? It must be some setting. Or just disable 3D. (3d inside svg doesn't work in any IE browser)

This is ok:

transform="matrix(0.1082 0 0 0.1082 97 58)"

This is what I don't wont to have:

transform: matrix3d(0.1082, 0, 0, 0, 0, 0.1082, 0, 0, 0, 0, 1, 0, 53.5881, 48.8135, 0, 1);


回答1:


I think what you are looking for is called force3D. Navigate to this link I shared and look for section named force3D on this page.

Currently, force3D defaults to a value of auto which means it will automatically decide when to use transform3d and when not to.

Also, there is a way to set it globally instead of appending it into every tween:

CSSPlugin.defaultForce3D = false;

Hope this helps.



来源:https://stackoverflow.com/questions/33882563/greensock-tweenlite-transformations

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!