Forked from: phi's 爆発エフェクト - tmlib.js View Diff (25) Running Grant - tmlib.js phi Follow 2012-12-13 02:10:02 License: MIT License Fork3 Fav1 View8373 Play Stop Reload Fullscreen Smart Phone Fork tree Readme JavaScript 47 lines HTML 1 lines CSS 1 lines AnimationSprite Test - tmlib.js SpriteSheet, AnimationSprite を使ったテストサンプル. クリック or タッチするとジャンプするよん♪ Links tmlib.js とは 以前セミナーで発表させていただいたスライドです. GitHub tmlib.js は GitHub で管理しています. Documents こちらのドキュメントで機能を把握することができます. 【TechBuzz】tmlib.js hackthon #1 近々ハンズオンやります! みんなで tmlib.js を使ってゲーム作りましょう♪ Running Grant - tmlib.js tmlib.js latest // forked from phi's "AnimationSprite Test - tmlib.js" http://jsdo.it/phi/22lS /* * 定数 */ var SCREEN_WIDTH = 465; var SCREEN_HEIGHT = 465; tm.preload(function() { tm.graphics.TextureManager.add("runningGrant", "http://jsrun.it/assets/n/t/9/m/nt9mU.png"); }); tm.main(function() { var app = tm.app.CanvasApp("#world"); app.resize(SCREEN_WIDTH, SCREEN_HEIGHT); app.fitWindow(); app.background = "black"; var ss = tm.app.SpriteSheet({ image: "runningGrant", frame: { "width":165.75, "height": 292.5, "count": 64, }, animations: { "run": [0, 25, "run"], "jump": [26, 63, "run"], } }); var runningGrant = tm.app.AnimationSprite(165.75, 292.5, ss); runningGrant.position.set(SCREEN_WIDTH/2, SCREEN_HEIGHT/2); runningGrant.gotoAndPlay("run"); app.currentScene.addChild(runningGrant); app.currentScene.update = function(app) { var p = app.pointing; if (p.getPointingStart() == true) { runningGrant.gotoAndPlay("jump"); } }; app.run(); }); <canvas id='world'></canvas> Running Grant - tmlib.js body { background-color: #DDDDDD; font: 30px sans-serif; } ## AnimationSprite Test - tmlib.js SpriteSheet, AnimationSprite を使ったテストサンプル. クリック or タッチするとジャンプするよん♪ ### 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) + こちらのドキュメントで機能を把握することができます. - [【TechBuzz】tmlib.js hackthon #1](http://atnd.org/events/34279) + 近々ハンズオンやります! みんなで tmlib.js を使ってゲーム作りましょう♪ // forked from phi's "AnimationSprite Test - tmlib.js" http://jsdo.it/phi/22lS /* * 定数 */ var SCREEN_WIDTH = 465; var SCREEN_HEIGHT = 465; tm.preload(function() { tm.graphics.TextureManager.add("runningGrant", "http://jsrun.it/assets/n/t/9/m/nt9mU.png"); }); tm.main(function() { var app = tm.app.CanvasApp("#world"); app.resize(SCREEN_WIDTH, SCREEN_HEIGHT); app.fitWindow(); app.background = "black"; var ss = tm.app.SpriteSheet({ image: "runningGrant", frame: { "width":165.75, "height": 292.5, "count": 64, }, animations: { "run": [0, 25, "run"], "jump": [26, 63, "run"], } }); var runningGrant = tm.app.AnimationSprite(165.75, 292.5, ss); runningGrant.position.set(SCREEN_WIDTH/2, SCREEN_HEIGHT/2); runningGrant.gotoAndPlay("run"); app.currentScene.addChild(runningGrant); app.currentScene.update = function(app) { var p = app.pointing; if (p.getPointingStart() == true) { runningGrant.gotoAndPlay("jump"); } }; app.run(); }); <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? ## AnimationSprite Test - tmlib.js SpriteSheet, AnimationSprite を使ったテストサンプル. クリック or タッチするとジャンプするよん♪ ### 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) + こちらのドキュメントで機能を把握することができます. - [【TechBuzz】tmlib.js hackthon #1](http://atnd.org/events/34279) + 近々ハンズオンやります! みんなで tmlib.js を使ってゲーム作りましょう♪ 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/hVw0/js"></script> application art&design canvas javascript library&test smartphones&tablets tmlib.js Discussion Questions on this code? Tags application art&design canvas javascript library&test smartphones&tablets tmlib.js Favorite by Maran.Emil Forked sort by latest page views favorite forked forked: Running Grant - tmlib. masaka_panda 10 1187 50/1/1 application art&design canvas javascript library&test smartphones&tablets tmlib.js forked: Running Grant - tmlib. snowtale_05 00 747 55/1/1 application art&design library&test smartphones&tablets forked: Running Grant - tmlib. teetteet 10 1405 48/1/1 application art&design canvas javascript library&test smartphones&tablets tmlib.js