template - tmlib.js x three.js phi Follow 2013-03-01 11:02:51 License: MIT License Fork16 Fav0 View16441 Play Stop Reload Fullscreen Smart Phone Fork tree Readme JavaScript 47 lines HTML 1 lines CSS 1 lines template - tmlib.js x three.js tmlib.js x three.js のテンプレート 『3D ゲームも簡単に作れる! tmlib.js x three.js(WebGL) で 3D プログラミング出来るようにしてみた!!』 Links tmlib.js とは 以前セミナーで発表させていただいたスライドです. GitHub tmlib.js は GitHub で管理しています. Documents こちらのドキュメントで機能を把握することができます. 『Global Game Jam 2013 【新宿会場】with tmlib.js』やります!! よかったらぜひご参加下さい. template - tmlib.js x three.js tmlib.js latest Three.js r55 /* * constant */ var SCREEN_WIDTH = 465; // 画面幅 var SCREEN_HEIGHT = 465; // 画面高さ var SCREEN_CENTER_X = SCREEN_WIDTH/2; // 画面中央X座標値 var SCREEN_CENTER_Y = SCREEN_HEIGHT/2; // 画面中央Y座標値 /* * main */ tm.main(function() { // アプリケーション var app = tm.three.ThreeApp("#world"); // リサイズ app.resize(SCREEN_WIDTH, SCREEN_HEIGHT); // 画面にフィット app.fitWindow(); // メインシーンに切り替える app.replaceScene(MainScene()); // 実行 app.run(); }); /* * scene */ var MainScene = tm.createClass({ // three.js 用シーンを継承 superClass: tm.three.Scene, init: function() { // 親を初期化 fov: 視野角, aspect: 縦横比 this.superInit(60, SCREEN_WIDTH/SCREEN_HEIGHT); // Cube を生成 var elm = tm.three.CubeElement(); this.add( elm ); // カメラセットアップ this.camera.position.set(100, 100, 250); this.camera.lookAt({ x: 0, y: 0, z: 0 }); } }); <canvas id='world'></canvas> template - tmlib.js x three.js body { background-color: #DDDDDD; font: 30px sans-serif; } ## template - tmlib.js x three.js tmlib.js x three.js のテンプレート 『[3D ゲームも簡単に作れる! tmlib.js x three.js(WebGL) で 3D プログラミング出来るようにしてみた!!](http://tmlife.net/programming/javascript/3d-game-tmlibjs-threejs-webgl.html)』 ### Links - [tmlib.js とは](http://www.rvl.io/phi/tmlibjs) + 以前セミナーで発表させていただいたスライドです. - [GitHub](https://github.com/phi1618/tmlib.js) + tmlib.js は GitHub で管理しています. - [Documents](http://phi1618.github.com/tmlib.js/docs/index.html#!/api) + こちらのドキュメントで機能を把握することができます. - [『Global Game Jam 2013 【新宿会場】with tmlib.js』やります!!](http://atnd.org/events/36121) + よかったらぜひご参加下さい. /* * constant */ var SCREEN_WIDTH = 465; // 画面幅 var SCREEN_HEIGHT = 465; // 画面高さ var SCREEN_CENTER_X = SCREEN_WIDTH/2; // 画面中央X座標値 var SCREEN_CENTER_Y = SCREEN_HEIGHT/2; // 画面中央Y座標値 /* * main */ tm.main(function() { // アプリケーション var app = tm.three.ThreeApp("#world"); // リサイズ app.resize(SCREEN_WIDTH, SCREEN_HEIGHT); // 画面にフィット app.fitWindow(); // メインシーンに切り替える app.replaceScene(MainScene()); // 実行 app.run(); }); /* * scene */ var MainScene = tm.createClass({ // three.js 用シーンを継承 superClass: tm.three.Scene, init: function() { // 親を初期化 fov: 視野角, aspect: 縦横比 this.superInit(60, SCREEN_WIDTH/SCREEN_HEIGHT); // Cube を生成 var elm = tm.three.CubeElement(); this.add( elm ); // カメラセットアップ this.camera.position.set(100, 100, 250); this.camera.lookAt({ x: 0, y: 0, z: 0 }); } }); <canvas id='world'></canvas> body { background-color: #DDDDDD; font: 30px sans-serif; } use an iframe compat browser, deer Play on jsdo.it games Author Share ブログに埋め込む QR Tag Download Complete! Description What kind of game? ## template - tmlib.js x three.js tmlib.js x three.js のテンプレート 『[3D ゲームも簡単に作れる! tmlib.js x three.js(WebGL) で 3D プログラミング出来るようにしてみた!!](http://tmlife.net/programming/javascript/3d-game-tmlibjs-threejs-webgl.html)』 ### Links - [tmlib.js とは](http://www.rvl.io/phi/tmlibjs) + 以前セミナーで発表させていただいたスライドです. - [GitHub](https://github.com/phi1618/tmlib.js) + tmlib.js は GitHub で管理しています. - [Documents](http://phi1618.github.com/tmlib.js/docs/index.html#!/api) + こちらのドキュメントで機能を把握することができます. - [『Global Game Jam 2013 【新宿会場】with tmlib.js』やります!!](http://atnd.org/events/36121) + よかったらぜひご参加下さい. Control Device Smartphone Controllerjsdo.it WebSocket Controller» Mouse Keyboard Touch Device Fullscreen Activated Inactivated jsdo.it games から削除する Submit Author phi ゲームプログラマやりながら執筆してる27歳. phina.js(tmlib.js) というライブラリ作ってます. 著書「enchant.js スマートフォンゲーム開発講座」 『日本国民全員プログラマ化計画』進行中 Math/JavaScript/HTML5/CSS3/Python/C/C++/C#/Java Blog http://phiary.me Tweet Default Panel Auto play Screenshot Readme JavaScript HTML CSS Size Width: px Height: px code <script type="text/javascript" src="http://jsdo.it/blogparts/4U6h/js"></script> application art&design canvas library&test three.js tmlib.js Discussion Questions on this code? Tags application art&design canvas library&test three.js tmlib.js Forked sort by latest page views favorite forked forked: template - tmlib.js x dodompa45 00 638 48/1/1 application art&design canvas library&test three.js tmlib.js tmlibでthree.jsを使う emadurandal 00 690 48/1/1 application art&design canvas library&test three.js tmlib.js forked: template - tmlib.js x kjunichi 00 735 51/1/1 application art&design canvas library&test three.js tmlib.js forked: template - tmlib.js x daishi.hmr 00 1038 61/1/1 application art&design canvas library&test three.js tmlib.js 1 2 3 4NEXT>>