このページのトップへ
ボール落としアニメーション

ボール落としアニメーション

ボールが迷路の中を落ちていくボール落としアニメーションを作成し、言葉の中のIの文字を点描しましょう。

中級.png

上級

3K

出版された:

August 11, 2021

酒を楽しむ少女

によって

アンカー 1
開発者を雇う

説明例

In this example we created an effect of balls falling through a maze and bouncing into their correct places of dotting the letter I’s in our words. We have three different animations:

 

  1. The animation of the maze itself.

  2. The animation of the right ball.

  3. The animation of the left ball.

コード例

タブ1

.

タブ2

.

タブ3

.

このコードによる解決は複雑になる可能性がある。

どのように構築したか


ページ要素


In our site we added the following page elements:

  • Group 1: A text element and 2 pink vector images for the initial text and the 2 balls.

  • Group 2: 12 vector images to create the maze.

  • Group 3: A text element for the final text and 2 black vector images where the balls will fall to.



コード


We define three timeline animation constants:

  1. maze_tl: The animation of the maze.

  2. left_ball_tl: The animation of the left ball.

  3. right_ball_tl: The animation of the right ball.


In the $w.onReady() function we declare all the elements we want to animate. We then manually order the maze child elements for the maze animation. The maze animation uses a loop that goes through the different wheels of the maze. After building the maze animation, we make sure to time the balls animation when the maze animation ends. For the balls animation, we perform calculations and then build separate ball paths for the left and right balls. The balls animation includes the exact computations of the horizontal and vertical journey each ball has to take in order to get to its final destination.

使用したAPI

コード以外の例。

コード以外の例。

関連記事

記事リンク

開発者を雇う

Veloソリューションは強力なツールですが、自力で構築するのは困難です。経験豊富なVelo開発会社に構築をお任せください。

関連例

これは役に立ったか?

はい

|

いいえ

ご意見ありがとう!

ベクター画像アニメーション

ベクター画像アニメーション

ボールが動き、あなたの言葉のOの文字の代わりになるアニメーションを作成します。

中級.png

初心者

砂時計アニメーション

砂時計アニメーション

Wix Animations APIを使って、砂時計を自動的に、またはボタンクリックで反転させましょう。

中級.png

上級

太陽系アニメーション

太陽系アニメーション

Wix Animations APIを使って、シンプルな太陽系アニメーションを作成しましょう。

中級.png

上級

テキスト・マイクロインタラクション

テキスト・マイクロインタラクション

Wix Animations APIを使って、3つのテキスト要素に異なるマイクロインタラクションを作成しよう。

中級.png

中級

カスタムボタンアニメーション

カスタムボタンアニメーション

Wix Animations APIを使って、時計回りに回転し、クリックすると色が変わるカスタムボタンを作成しましょう。

中級.png

初心者

アンカー2
ページ下