LoginSignup
5
1

More than 3 years have passed since last update.

【超簡単!】Three.jsでUIを作る(1)

Last updated at Posted at 2020-12-17

text2.gif

僕の大好きな、「Experiments with Google」が制作した「Assisted Melody」のWebアプリケーションがUIがWebGLで制作されていました。こんなUI簡単に実装したいですよね..。

探しても、この辺りの情報をまとめてくれている人がいなかったので自分で作ることにしました。

sample01. マウスの位置を取得する + ただのシンプル四角形を描く

UIを作る前にここから学びましょう。
マウスのy座標に合わせて回転スピードが変わる四角形を作りました。

コード内に解説は全て書いたので、読んでください。
text3.gif

See the Pen ThreeJS: Plane Geometry + MousePosition by やまかず / Kazuyuki Yamamoto (@yamkaz) on CodePen.

次:【超簡単!】Three.jsでUIを作る(2)
次回は複数並べた四角形と、それをスクロールに合わせて移動します。

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1