Comments (8)
flubber优化算法的确更好一些,但也复杂得多。我当年在MSRA实习的时候就是研究这个,当时较好的做法其实是做多边形的相容三角剖分然后morphing,毕设就做的这个,这个项目里面有些当年研究过的paper。
这个项目虽然有些情况过渡不是很好,不过代码小,实现简单,我用在spritejs里了:https://github.com/spritejs/sprite-core/blob/master/src/helpers/path/index.js
还是要感谢作者 @dntzhang 。
如果要进一步优化的话可以看一下后续打算怎么做,有时间我可以帮忙一起弄。
from pasition.
但是 flubber 不支持 stroke 模式
from pasition.
@dntzhang 其实是支持的,我刚看了下。。。
from pasition.
是吗?那就说明它的算法更优 = =!
from pasition.
这里其实是有很大优化空间,而且后续想把颜色 lerp 也加上~~
from pasition.
path + color 同时运动
from pasition.
很多svg属性都可以lerp。比如transform、width、height等
from pasition.
赞啊! 很棒~ @akira-cn
主要是会有很多条件分支需要独立优化。目前使用的是无脑对齐shape和curves数量并旋转判定最短距离然后计算插值。
from pasition.
Related Issues (6)
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 pasition.