-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
是否支持rotate3d,perspective等3d变换 #28
Comments
现在spritejs是2d库,3d是不支持的,rotateX和translateX支持,因为rotate和translate的值是数组[x, y] |
rotateX,rotateY也是不支持的吧,我看attrjs里rotate参数只有一个是控制z轴的 |
哦,对,rotateX、rotateY不支持,translateX、translateY是支持的 |
还有个问题,就是与css3 keyframe渲染不一致的问题,同样的参数下 |
我知道你的意思了,SpriteJS的动画标准是Web Animations API 这个本来就和css3的keyframes是不一样的 https://code.h5jun.com/yunuy/edit?html,css,js,output 你可以看这个例子,这是原生的web animations api的效果,和spriteJS一致,和css3的keyframes-animation是不一致的 |
那有什么办法实现像css3 keyframe 那样的效果吗?如果用spritejs的话应该如何配置出那种效果 |
这个有好多种实现方式的,比如最简单的是: https://code.h5jun.com/bocin/edit?js,output animation.finished 和 transition 都返回 promise,很容易实现这种序列的动画 |
我知道原因了,web animation api 是支持给每一段keyframe配置easing属性的,而spriejs是不支持的, |
这个特性我在下一版本加上 |
赞 |
已经加上啦 |
看到attrjs源码里只有translate、rotate、scale、skew、和matrix的2d变换,那么像rotate3d、translate3d、skew3d、perspective等或者rotateX,translateY等该如何实现,是只能引入threejs这样的库吗
The text was updated successfully, but these errors were encountered: