Comments (10)
会 %360 啊。所以处理一下~~
from phytouch.
没明白你意思 是 if(this.img.rotateZ % 360){
this.img.rotateZ += 45
}
能具体写写吗?
from phytouch.
仔细试了一把。感觉是 transition+matrix3d的坑,看下要不要chrome团队提issue~~
from phytouch.
@dntzhang 你好!我也遇到了一样的问题,观察了一下生成的矩阵,发现出现2e-15
、3e-15
之类的值时,会逆向旋转。
有点不太理解这段代码,不知道是不是有问题:
_rounded: function (value, i) {
i = Math.pow(10, i || 15);
// default
return Math.round(value * i) / i;
},
我改成这样子以后,2e-15
之类的值返回0
,rotateZ就没问题了,但是rotataY还是有问题
_rounded: function (value) {
return Math.abs(value) < 1e-14 ? 0 : value
},
from phytouch.
收到,多谢。我看下 ~ @imyzf
from phytouch.
另外我发现如果%360
就不会有2e-15
出现
rotateZ = 1890
[0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
rotateZ = 1980
[-1, -2e-15, 0, 0, 2e-15, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
结合transition
,从1890度到1980度会逆向旋转
from phytouch.
怎么样,最后这个问题有解决吗 , 还是无解?
from phytouch.
没有解决。规避的方式是操作rotate属性的时候不要和css transition 一起使用~~,和 js 定时器或者requestAnimationFrame 一起使用是ok的。要去翻 webkit 源码了~~
from phytouch.
同样遇到这个问题
from phytouch.
不要和transition一起使用
from phytouch.
Related Issues (20)
- 旋转属性 如何设定 三个方向都可以转动
- ios12.1 滑动异常
- alloyTouch.stop()不起作用怎么办
- AlloyTouch升级0.2.6后产生的问题 HOT 1
- FullPage怎么去阻止某一个section的滑动 HOT 1
- change里面打印出了value,显示NaN 就划不动咯 HOT 3
- change的参数会出现NAN?? HOT 7
- GH page does not work anymore HOT 4
- transformjs Object.defineProperty to proxy
- 不支持pc吗 HOT 2
- 我想用js静态设置滑动距离怎么设置 HOT 1
- 怎么设置禁止触摸滑动啊 就是滑动的时候没有效果 HOT 1
- alloyTouch.to(-2000, 30*60*1000,'linear'); 为什么报错了 第三个参数怎么写。。。文档没说明 HOT 2
- 怎么设置初始化对象位置
- 不支持vue吗 HOT 1
- 1.支持桌面浏览器交互,2.支持销毁,GC回收,3.增加typescript类型申明
- 更新npm HOT 1
- 0.2.0版本提示currentY not defined HOT 1
- 0.2.1 vitejs 报错 HOT 3
- 哈哈, bug可真多,吓人
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phytouch.