Greensock Tweenlite转化 [英] Greensock Tweenlite transformations

查看:144
本文介绍了Greensock Tweenlite转化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用tweenlite库来旋转,移动和缩放图像。
问题是,我得到3D变换的图像,
,但我想要有2D变换。
如果tweenlite检测到有浏览器不支持3D,他会做2d。我怎么能迫使他总是做2D?它必须是一些设置。或者只是禁用3D。 (3d in svg在任何IE浏览器中不起作用)

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)

这是确定:

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

我不会有:

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

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

推荐答案

我认为你要找的是 force3D <强>。转到我共享的此链接,然后在此页面上查找名为 force3D 的部分。

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.

目前, force3D 默认值为 ,这意味着它会自动决定何时使用 transform3d ,以及何时不使用。

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;

希望这有帮助。

这篇关于Greensock Tweenlite转化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆