在画布上挥舞着文本 [英] Waving text on canvas
问题描述
如何在画布元素上挥动文字,类似于这个页?
How could I make waving text on a canvas element similar to what is found on this page?
推荐答案
EDIT :@Ben,对您的问题和... 是我的好友! :)
EDIT: @Ben, forget about the downvotes for no reason on your question, and... BE MY GUEST! :)
我从来没有使用< canvas>
在这一点上,没有双线性插值。
I never coded with <canvas>
before, it was very fun. At this point, there is no bilinear interpolation. I might rework it and add more bells and whistles.
如果你想在javascript中实现这样的效果,必须使用< canvas>
标签。
If you want to achieve such an effect in javascript, you'll effectively have to use the <canvas>
tag.
原理在于预先计算
查看旧的 Flipcode Art of Demomaking column:Bitmap Distortion 。这是一个很好的老gem :)关于缓存的段落可能与基于< canvas>
的实现不相关。
Have a look at the old Flipcode Art of Demomaking column: Bitmap Distortion. This is a good old gem :) The paragraph about the cache might not be relevant for a <canvas>
based implementation though.
有很多处理资源,所以这也是一个好主意,看看< a href =http://processingjs.org/ =nofollow noreferrer> Processing.js 。
There are many Processing resources out there, so it's also a good idea to have a look at Processing.js.
这篇关于在画布上挥舞着文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!