開発環境
- macOS Sierra - Apple (OS)
- Emacs (Text Editor)
- JavaScript (プログラミング言語)
- three.js (JavaScript Library)
- Safari (Web Browser)
3D Game Programming for Kids: Create Interactive Worlds with JavaScript (Chris Strom(著)、Pragmatic Bookshel)の Chapter 3(Project: Making an Avatar)の Make Our Avatar Flip! を取り組んでみる。
コード(Emacs)
var isFlipping = true; var animate = function () { requestAnimationFrame(animate); if (isCartwheeling) { avatar.rotation.z = avatar.rotation.z + 0.05; } if (isFlipping) { avatar.rotation.y = avatar.rotation.y + 0.05; } renderer.render(scene, camera); }
0 コメント:
コメントを投稿