Giter Club home page Giter Club logo

Comments (8)

akira-cn avatar akira-cn commented on May 28, 2024 1

flubber优化算法的确更好一些,但也复杂得多。我当年在MSRA实习的时候就是研究这个,当时较好的做法其实是做多边形的相容三角剖分然后morphing,毕设就做的这个,这个项目里面有些当年研究过的paper。

这个项目虽然有些情况过渡不是很好,不过代码小,实现简单,我用在spritejs里了:https://github.com/spritejs/sprite-core/blob/master/src/helpers/path/index.js

还是要感谢作者 @dntzhang

如果要进一步优化的话可以看一下后续打算怎么做,有时间我可以帮忙一起弄。

from pasition.

dntzhang avatar dntzhang commented on May 28, 2024

但是 flubber 不支持 stroke 模式

from pasition.

Rowandjj avatar Rowandjj commented on May 28, 2024

@dntzhang 其实是支持的,我刚看了下。。。

from pasition.

dntzhang avatar dntzhang commented on May 28, 2024

是吗?那就说明它的算法更优 = =!

from pasition.

dntzhang avatar dntzhang commented on May 28, 2024

这里其实是有很大优化空间,而且后续想把颜色 lerp 也加上~~

from pasition.

dntzhang avatar dntzhang commented on May 28, 2024

path + color 同时运动

from pasition.

Rowandjj avatar Rowandjj commented on May 28, 2024

很多svg属性都可以lerp。比如transform、width、height等

from pasition.

dntzhang avatar dntzhang commented on May 28, 2024

赞啊! 很棒~ @akira-cn

主要是会有很多条件分支需要独立优化。目前使用的是无脑对齐shape和curves数量并旋转判定最短距离然后计算插值。

from pasition.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.