2014年9月12日金曜日

enchantとtmlibのタッチイベント

enchant.jsと、tmlib.jsのスプライトでは、発生するタッチイベント名が違う。


 


enchant.js


タッチ開始:ontouchstart


移動:ontouchmove


終了:ontouchend


中止:ontouchcancel


 


【例】



sprite.ontouchstart = (e)->


    console.log('x='+e.x+', y='+e.y) 



 


 


tmlib.js


タッチ開始:onpointingstart


移動:onpointingmove


終了:onpointingend


中止:onpointingcancel


 


【例】 



sprite.onpointingstart =(e)->


    console.log('x='+e.app.pointing.x+'y='+e.app.pointing.y)



 


0 件のコメント:

コメントを投稿

QMK開発環境構築メモ

## Ubuntuコンテナイメージ取得 ```bash docker pull ubuntu:24.04 ``` --- ## コンテナ作成 ```bash docker run -it --name qmk_dev -v [マウント元ディレクトリ]:[マウント先ディレクトリ]...