「Project Name」を適当に決めて、今回はウィザードなどは使わずにゼロから作るので「Create your own from scratch.」を選択します。
ちなみに、Project IDは「ID.ProjectName」という規則なのですが、これID変更出来ないんでしょうか??登録に利用したメアドの@前がそのまま表示されます。
なんとなく気持ち悪いので画像は編集しつつ次へ進みます。
「Use a blank project.」を選択します。
画面に「Application Created Successfully!」と表示されて、まっさらなプロジェクトが表示されます。
以下で見えているのはエミュレーションモードで、エディタモードへ遷移するには左上にある先ほどの「START NEW」ボタンの左側「EDITOR」ボタンをクリックします。
開いた画面の左側メニューで編集したいファイルを選択すると画面右側にソースが表示されます。
生成されたindex.htmlのソースを見ると、ブランクというわりには、以下のような何やらテンプレ的なものが並んでいます。
<script type="text/javascript" charset="utf-8" src="_appMobi/appmobi_local_bootstrap.js"></script>
<script type="text/javascript" charset="utf-8" src="http://localhost:58888/_appMobi/xhr.js"></script>
<script type="text/javascript">
/* This function runs once the page is loaded, but appMobi is not yet active */
var init = function(){
};
window.addEventListener("load",init,false);
/* This code prevents users from dragging the page */
var preventDefaultScroll = function(event) {
event.preventDefault();
window.scroll(0,0);
return false;
};
document.addEventListener('touchmove', preventDefaultScroll, false);
/* This code is used to run as soon as appMobi activates */
var onDeviceReady=function(){
//Size the display to 768px by 1024px
AppMobi.display.useViewport(768,1024);
//hide splash screen
AppMobi.device.hideSplashScreen();
};
document.addEventListener("appMobi.device.ready",onDeviceReady,false);
</script>
ちなみに上記を削除してリロードしてみると、以下のように怒られます。
コピペを指示されたコードは以下。
<!-- the line below is required for access to the appMobi JS library -->
<script type="text/javascript" charset="utf-8" src="http://localhost:58888/_appMobi/appmobi.js"></script>
<script type="text/javascript" language="javascript">
// This event handler is fired once the AppMobi libraries are ready
function onDeviceReady() {
//use AppMobi viewport to handle device resolution differences if you want
//AppMobi.display.useViewport(768,1024);
//hide splash screen now that our app is ready to run
AppMobi.device.hideSplashScreen();
}
//initial event handler to detect when appMobi is ready to roll
document.addEventListener("appMobi.device.ready",onDeviceReady,false);
</script>
もともと入っていたコードと内容が違う理由は謎です。
エディタを触った感じ、「Ctrl+C」「Ctrl+Z」「Ctrl+S」などのコマンドもそのまま使えて、特に不便は感じませんでした。
ちなみに保存するとこんなポップアップが出てきます。
後は何か書いてみるだけということで、次回は実際に何か作ってみます。
今回はここまでです。
なぜ中途半端なところで終わっているかというと、調子に乗って「three.js」と「Physijs」で物理演算のサンプルを動かそうと試み、そして動かず時間だけが過ぎていき、無かったことにしたからです。。