Fork
3
Fav
6
View
11442
  • Play

Fullscreen

Smart Phone

Fork tree

  • Readme
  • JavaScript 105 lines
  • HTML 65 lines
  • CSS 14 lines

gihyo.jp連載「HTML5のCanvasでつくるダイナミックな表現―CreateJSを使う」
第22回「立方体の6面をx軸とy軸で回す
コード2「3次元座標と面および数学計算のクラス定義」および「マウスポインタの位置に応じて立方体をy軸およびx軸で回す


This code creates a cube in the three dimensional space and rotates it around the X and Y axes, corresponding to the position of the mouse pointer. The Matrix2D.transformPoint() method of the EaselJS 0.7 is utilized to rotate coordinates of the vertices. Three classes, Point3D, Face and MathUtils, are defined in the HTML section.

  • EaselJS 0.7.1: Rotating a Cube around the X and Y axes
  • EaselJS 0.7.1: Rotating a Cube around the X and Y axes

play

Complete!

Description What kind of game?

Control Device

jsdo.it websocket controller

Mouse

keyboard

smartphone

Fullscreen

Default Panel

Size

  • Width: px
  • Height: px

code

QR Code

Discussion

Questions on this code?

Tags

Favorite by

Forked

sort by