利用Tweener製作動畫 – 貝茲曲線
在看過前面一篇Tweener基礎篇之後,應該會發現我們的動畫元件雖然可以依照不同的模式移動,但是在路徑上還依然是保持直線移動,而這一篇文章就要來示範如何讓元件利用貝茲曲線來產生移動路徑,至於甚麼是貝茲曲線?大家可以參考維基百科上面的說明,這邊就不贅述了。
在Tweener的官方網站裡有提供一個貝茲曲線產生器的Flash動畫讓大家下載,不過由於官方示範這個貝茲曲線產生器所使用的是舊版本的Tweener Class,所以在程式碼範例上有些缺失,馬老師這邊提供我修改過且進行中文化後的範例供大家下載
![Tweener 貝茲曲線產生器 螢幕截圖 Tweener 貝茲曲線產生器 螢幕截圖](http://cloudlab.tw/wp/wp-content/uploads/1/2011/10/tweener_bezier1-300x271.jpg)
範例中Add Bezier Point是增加節點,Remove Point是刪除節點,利用這些功能並拖曳上面的範例曲線,就可以製作出你想要移動的路徑,接下來請先把「需要先被匯入與執行的Tweener」三行指令放置在程式碼的最前面,接著再把「Tweener動畫指令」貼上即可!這樣一來以後連製作這樣的路徑也會變得很方便了!
整個動畫的程式碼如下,也提供利用此效果製作的動畫檔給大家參考:
import caurina.transitions.Tweener import caurina.transitions.properties.CurveModifiers CurveModifiers.init() Tweener.addTween(ball, {x:475, y:80, _bezier:[{x:150, y:43}, {x:71, y:206.5}], time:1, transition:"linear"});
希望這個範例對大家有所幫助,如果還有疑問,也可以在這邊回應唷~
There, he greets a series of walk-in clients — often women — who have been wronged in one way or another.
In Jodo Do Tigrinho online slots, every spin is a step towards victory! Incredible graphics, exciting themes and many bonuses await you. Fortune favors the brave – try your hand and discover the world of winnings with Tigrinho!
he has a good point https://toruswallet.org
Cryptocurrency trading service bitqt with AI is automation and efficiency. Artificial intelligence monitors market dynamics, reduces risks and optimizes transactions. The perfect solution for beginners and professionals.
online slots Jodo Do Tigrinho are a unique combination of excitement and pleasure. Discover a variety of themes, bonus games and jackpots. Play comfortably, enjoying the well-thought-out interface and the chance to hit the jackpot!
Best Indian pharmacy: Indian Cert Pharm – Indian Cert Pharm
online pharmacy india: indian pharmacy – Indian Cert Pharm
indian pharmacy: Indian pharmacy international shipping – Online pharmacy
Mexican Easy Pharm: п»їbest mexican online pharmacies – mexican mail order pharmacies
First, there should be many extra checker gamers.
buying prescription drugs in mexico online: Mexican Easy Pharm – best online pharmacies in mexico
Mexican Easy Pharm: mexican border pharmacies shipping to usa – buying prescription drugs in mexico online
купить диплом в ижевске
купить в челябинске аттестат
https://mexicaneasypharm.com/# Mexican Easy Pharm
cheap canadian pharmacy online
Mexican Easy Pharm: Mexican Easy Pharm – medication from mexico pharmacy
I couldn’t refrain from commenting. Very well written.
Indian pharmacy international shipping: Indian Cert Pharm – Best online Indian pharmacy
canadian 24 hour pharmacy: Canadian Md Pharm – reputable canadian pharmacy
buying prescription drugs in mexico: Mexican Easy Pharm – Mexican Easy Pharm
mexico drug stores pharmacies: Mexican Easy Pharm – Mexican Easy Pharm
купить аттестат в новосибирске
Mexican Easy Pharm: Mexican Easy Pharm – Mexican Easy Pharm
купить диплом ссср о высшем образовании
canada drugstore pharmacy rx: Canadian Md Pharm – canadapharmacyonline legit
дизайнер интерьера цена за услуги москва https://dizayn-interera213.ru
pharmacies in mexico that ship to usa: mexican online pharmacies prescription drugs – Mexican Easy Pharm
indian pharmacy: Online pharmacy – Online medicine
online canadian drugstore: canadian pharmacy world – vipps canadian pharmacy
canadian pharmacy online store https://canadianmdpharm.online/# canadianpharmacyworld com
top 10 online pharmacy in india