<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>脱兎.dat</title>
	<atom:link href="http://dat.plastica-romantica.com/feed" rel="self" type="application/rss+xml" />
	<link>http://dat.plastica-romantica.com</link>
	<description></description>
	<lastBuildDate>Thu, 25 Jul 2013 13:58:45 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2</generator>
		<item>
		<title>Corona SDKで画像のバリエーションを増やす</title>
		<link>http://dat.plastica-romantica.com/log768.html</link>
		<comments>http://dat.plastica-romantica.com/log768.html#comments</comments>
		<pubDate>Thu, 25 Jul 2013 13:58:45 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[Corona SDK]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=768</guid>
		<description><![CDATA[彩り楽しいってことで、Corona SDKでパターンを生み出す方法を模索中です。 今回は「画像にもsetFillColorは使えるよ」ってことだけをスクショ付でやってみます。 ゾンビ君の画像を用意します。背景透明、塗りは [...]]]></description>
				<content:encoded><![CDATA[<p>彩り楽しいってことで、Corona SDKでパターンを生み出す方法を模索中です。</p>
<p>今回は「画像にもsetFillColorは使えるよ」ってことだけをスクショ付でやってみます。</p>
<p>ゾンビ君の画像を用意します。背景透明、塗りは白です。<br />ゾンビを思い浮かべて描いた以上、これはゾンビでしかありません。</p>
<p><img class="aligncenter size-full wp-image-769" alt="zombie_UntitledSheet-hd" src="http://dat.plastica-romantica.com/wp-content/uploads/2013/07/zombie_UntitledSheet-hd.png" width="232" height="332" /></p>
<p>適当に配置します。</p>
<p><img class="aligncenter size-full wp-image-773" alt="スクリーンショット 2013-07-25 22.20.03" src="http://dat.plastica-romantica.com/wp-content/uploads/2013/07/a8e95845eb2ea5737060b0a14f28374b1.png" width="318" height="480" /></p>
<p>勇ましいです。<br />では着色します。</p>
<pre class="brush: plain; title: ; notranslate">
local body = display.newImage(zombieSheet, 1)
body:setFillColor(100, 100, 100)
</pre>
<p><img class="aligncenter size-large wp-image-775" alt="スクリーンショット 2013-07-25 0.57.40" src="http://dat.plastica-romantica.com/wp-content/uploads/2013/07/d450c86b2adf19571a80488a9e09daff.png" width="321" height="480" /></p>
<p>きちんと画像内だけ着色されています。<br />簡単なことですが、これだけでいろんなパターンができます。</p>
<p><img class="aligncenter size-large wp-image-774" alt="スクリーンショット 2013-07-25 22.32.16" src="http://dat.plastica-romantica.com/wp-content/uploads/2013/07/e27245bb1ca25875f3b2cfa348aa5ceb.png" width="322" height="480" /></p>
<p>ではでは。更なるパターンを求め再び旅に出ます。</p>
<blockquote>
<p>Corona Docs: API &gt; Types &gt; VectorObject &gt; setFillColor <a href="http://docs.coronalabs.com/api/type/VectorObject/setFillColor.html" target="_blank">http://docs.coronalabs.com/api/type/VectorObject/setFillColor.html</a></p>
</blockquote>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log768.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corona SDKでGoogle Play Game Servicesを使ってみた。</title>
		<link>http://dat.plastica-romantica.com/log751.html</link>
		<comments>http://dat.plastica-romantica.com/log751.html#comments</comments>
		<pubDate>Sun, 21 Jul 2013 10:13:23 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[corona]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=751</guid>
		<description><![CDATA[ちょっと前からですが、Corona SDKがプラグインでGoogle Play Game Servicesに対応してます。 Androidでのランキングを簡単に実装する方法でピンとくるものがなかったので、とてもありがたい [...]]]></description>
				<content:encoded><![CDATA[<p>ちょっと前からですが、Corona SDKがプラグインでGoogle Play Game Servicesに対応してます。
Androidでのランキングを簡単に実装する方法でピンとくるものがなかったので、とてもありがたいです。</p>

<p>使ってみるにあたって、いくつかぶつかった点があったのでメモしておきます。
要点としては以下です。</p>

<h3>・リリース前の場合、デバッグ用のキーストアからフィンガープリントを取得、登録すると上手くいった。</h3>

<h3>・デバッグ用のキーストア使ったアプリで認証した状態のGoogleアカウントはリリース用のキーストア使ったアプリだと認証に失敗してしまう？</h3>

<h3>・そもそもGame Centerの代わりではない？</h3>

<p>その他は記事最後の「参考になったサイト」様方に助けて頂きました。<br />
では、それぞれについてです。</p>

<h3>・リリース前の場合、デバッグ用のキーストアからフィンガープリントを取得、登録すると上手くいった。</h3>

<p>最初、リリース用のキーストアでapkファイル作って実機で確認していたのですが、それだとどうもログインに成功しませんでした。  なんでだろとググってたらフィンガープリントが違うんじゃないの？って話があったのですが、たぶんあってるっぽい。  ではではと、試しにデバッグ用のキーストア使って、apk作って、そっちのフィンガープリント取得して登録してってやったら上手くいきました。ちなみにMacでCorona SDK内のデバッグ用のキーストア使ってフィンガープリント取得する方法は以下です。</p>

<p><pre class="brush: plain; title: ; notranslate">
keytool -exportcert -alias androiddebugkey -keystore /Applications/CoronaSDK/Resource¥ Library/Android/debug.keystore -list -v
</pre></p>

<p>なんやかんやでリリース前からリリース用のキーストア使ったアプリも認証させてしまってたので、
その辺してなかったらどうなるのかってのは次回試してみようようと思います。</p>

<h3>・デバッグ用のキーストア使ったアプリでログインした状態のGoogleアカウントはリリース用のキーストア使ったアプリだとログインに失敗してしまう？</h3>

<p>リリース後、デバッグ用アプリで使用していたGoogleアカウントを使ってログインしようとすると失敗してしまいました。もしやと思ってデバッグ用アプリ再度インストール、ログアウトして待つこと数分（直後だとまだ失敗しました）、リリースしたアプリでもログイン出来るようになりました。</p>

<h3>・そもそもGame Centerの代わりではない？</h3>

<p>Coronaのチュートリアルではアプリ起動時にinit後、ログインさせようとしてるんですが、
それ、いざ実機でやってるみると気持ち悪いんですよね。なんか勝手に出てきたぞって感じで。<br />
OSとのフレンドリーさというか方針がGame Centerとは違うんじゃないのかな。<br />
実際、既にリリースされていた対応ゲームいくつか見てみたんですが、ユーザーがログインしようとして初めてログインするのがよくあるタイプな気がしました。</p>

<p>なので自分は起動時はinitのみ、既に過去ログイン済みならばログインも..としました。<br />
これだと大抵の場合、スコア等リクエストするタイミングもGame Centerとは違ってくるだろうし、ちょっとした分岐だけでいいってわけではなさそうです。</p>

<p>最後に、実際に使ってリリースしたゲームはこちらです。</p>

<p>どうぶつのわくせい &#8211; Google Play の Android アプリ<br />
<a href="https://play.google.com/store/apps/details?id=com.plasticaromantica.SafariPlanet&#038;hl=ja" target="_blank">https://play.google.com/store/apps/details?id=com.plasticaromantica.SafariPlanet&amp;hl=ja</a></p>

<p>ではでは。</p>

<p>参考になったサイト</p>

<blockquote>Tutorial: Introducing Google Play Game Services | Corona Labs
<a href="http://www.coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/" target="_blank">http://www.coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/</a></blockquote>

<blockquote>Google Play Game Services login issues &#8211; General Questions/Discussion &#8211; Corona Labs Forums
<a href="http://forums.coronalabs.com/topic/35896-google-play-game-services-login-issues/" target="_blank">http://forums.coronalabs.com/topic/35896-google-play-game-services-login-issues/</a></blockquote>

<blockquote>Android &#8211; Google Play game services のサンプルを動かしてみる &#8211; Qiita [キータ]
<a href="http://qiita.com/t2low/items/b447f6ed913fabd83b61" target="_blank">http://qiita.com/t2low/items/b447f6ed913fabd83b61</a></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log751.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>クックパッド社「第4回 開発コンテスト24」に参加しました。</title>
		<link>http://dat.plastica-romantica.com/log728.html</link>
		<comments>http://dat.plastica-romantica.com/log728.html#comments</comments>
		<pubDate>Sun, 16 Jun 2013 10:02:25 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=728</guid>
		<description><![CDATA[ほぼ１年ぶりの日記です。 クックパッドさんが開催する開発コンテストに参加しました。 課題が発表されてから24時間で開発しようというコンテストです。 エンジニア向け「第4回 開発コンテスト24」開催 友人と自分の２人チーム [...]]]></description>
				<content:encoded><![CDATA[<p>ほぼ１年ぶりの日記です。</p>

<p>クックパッドさんが開催する開発コンテストに参加しました。
課題が発表されてから24時間で開発しようというコンテストです。</p>

<p><a href="http://info.cookpad.com/24contest4" target="_blank">エンジニア向け「第4回 開発コンテスト24」開催</a></p>

<p>友人と自分の２人チームで参加しました。
企画以外の部分、それぞれ何するかは当日決めようと話していましたが、
結局、自分がプログラム、友人はデザイン担当に落ち着きました。</p>

<p>・出来上がったアプリの紹介ページ</p>

<p><a href="http://dat.plastica-romantica.com/tcandle/" target="_blank">達成キャンドル | PLASTICA ROMANTICA</a></p>

<p>お題の「年をとった自分が使うサービス」から何を作るかという相談には
わいわいと大体全体の40%くらいの時間を使ったと思います。
他の方の作品をみても「年をとった自分」の解釈はいろいろあって面白かったです。</p>

<p>年をとることは、ある時を堺に「老い」などネガティブなイメージが前面に来てしまいがちですが、
その中でも日々積み上げているものはあるはず。
積み上げていく様子を楽しく可視化したい。
自分たちも日々達成を積み上げて年をとっていきたいという気持ちで作りました。</p>

<p>・アプリの説明</p>

<p>まず、達成したい目標を登録します。
繰り返しボタンで何度も達成したい目標(毎日の散歩..etc)も登録できます。</p>

<p><img src="http://dat.plastica-romantica.com/wp-content/uploads/2013/06/c6a8d13ebcc554abbf3e4e3e5ecea7da.png" alt="iOSシミュレータのスクリーンショット 2013.06.16 18.25.00" width="320" height="480" class="aligncenter size-full wp-image-733" /></p>

<p>登録した目標はタップすることで
達成ビューに積み上げていくことで出来ます。</p>

<p><img src="http://dat.plastica-romantica.com/wp-content/uploads/2013/06/5b9dfd8e37075ff910dcd2c2e48bbcd4.png" alt="iOSシミュレータのスクリーンショット 2013.06.16 18.31.18" width="320" height="480" class="aligncenter size-full wp-image-734" /></p>

<p>達成したい内容のカテゴリーごとに色分けしてあり、見た目も楽しいです。</p>

<p><img src="http://dat.plastica-romantica.com/wp-content/uploads/2013/06/04f68d67639fb1e842d83ca956a858b8.png" alt="iOSシミュレータのスクリーンショット 2013.06.16 18.31.46" width="320" height="480" class="aligncenter size-full wp-image-735" /></p>

<p>最後に、ケーキアイコンをタップすると、
毎年の積み上げをろうそくの高さとして比べることが出来ます。</p>

<p><img src="http://dat.plastica-romantica.com/wp-content/uploads/2013/06/9efa2bb93278693298cfe5137a03ed24.png" alt="iOSシミュレータのスクリーンショット 2013.06.16 18.31.54" width="320" height="480" class="aligncenter size-full wp-image-736" /></p>

<p>以上、
決められた時間内に脳みそ絞ってひたすらコードを書く体験、かなりエキサイティングでした。
クックパッドさん、友人に感謝です。</p>

<p>ちなみに技術的なことをおまけしておくとアプリ作成にTitaniumを使用しています。
簡単なアニメーションならTitaniumを使った実機上でも思い通り動いて面白かったです。</p>

<p>タイトルは逃してしまいましたが、
せっかく作ったので、近くストアかGithubで公開出来ればと考えています。
ではでは！眠い！</p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log728.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corona SDK 試してみた。</title>
		<link>http://dat.plastica-romantica.com/log708.html</link>
		<comments>http://dat.plastica-romantica.com/log708.html#comments</comments>
		<pubDate>Sun, 01 Jul 2012 15:11:49 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[corona]]></category>
		<category><![CDATA[アプリ]]></category>
		<category><![CDATA[ゲーム]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=708</guid>
		<description><![CDATA[titaniumでアプリ出すと息巻いてたのだけど、注文してたcoronaSDKの本が届いたから少し浮気。今日一日コード書いてみて面白かったので参考になったものをまとめてみます。 届いた本はこちら。 基礎から学ぶ Coro [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://dat.plastica-romantica.com/wp-content/uploads/2012/07/60f64bcb1eacac157adbe7270f659cb2-e1341153282177.png" alt="" title="スクリーンショット 2012-07-01 23.32.26" width="425" height="316" class="aligncenter size-full wp-image-711" />
titaniumでアプリ出すと息巻いてたのだけど、注文してたcoronaSDKの本が届いたから少し浮気。今日一日コード書いてみて面白かったので参考になったものをまとめてみます。</p>

<p>届いた本はこちら。</p>

<table  border="0" cellpadding="5"><tr><td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4863540981/keima0514-22/" target="_top"><img src="http://ecx.images-amazon.com/images/I/515bzGvtpXL._SL160_.jpg" border="0" alt="基礎から学ぶ CoronaSDK" /></a></td><td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4863540981/keima0514-22/" target="_top">基礎から学ぶ CoronaSDK</a><br />坂本俊之 藤川佑介 山本直也 中原智博 <br /><br />シーアンドアール研究所  2012-02-25<br />売り上げランキング : 61143<br /><br /><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4863540981/keima0514-22/" target="_top">Amazonで詳しく見る</a></font><font size="-2"> by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td></tr></table>

<p>titaniumに比べると全然日本語情報がない。試しに使ってみようと思ってググってもなんだかな..だから本から入ってみた。あとは公式ドキュメント。</p>

<blockquote>
  <p>Corona Docs: API <a href="http://docs.coronalabs.com/api/index.html" target="_blank">http://docs.coronalabs.com/api/index.html</a></p>
</blockquote>

<p>エディタはosxのAppStoreに以下の専用エディタがあったので購入。これはちょっとまだ正直しっくりきていなかったりします。良いのだけどね。</p>

<blockquote>
  <p>CoronaComplete <a href="http://coronacomplete.com/" target="_blank">http://coronacomplete.com/</a></p>
</blockquote>

<p>で、coronaSDKは無料じゃstoreにアプリ出せなくて$199~$349/yr(2012/07時点)払わきゃだめ。もちろん、まだお試しだから払ってないんだけど、公式ページに乗ってたサードパーティツールが気になって買ってしまった。</p>

<blockquote>
  <p>:: X-PRESSIVE.COM :: &#8211; PARTICLE CANDY FOR Coronaｮ IPHONE / ANDROID SDK <a href="http://www.x-pressive.com/ParticleCandy_Corona/" target="_blank">http://www.x-pressive.com/ParticleCandy_Corona/</a></p>
</blockquote>

<p>39.95ユーロした。ドルだと思って買ったらユーロだった。そのへんのクッションになってしまうPayPal怖えぇよ、と思い知りました。もちろんPayPalが悪くないのだけど。よく確認しましょう。</p>

<p>で、このparticle candyなんだけど、公式サイトみてもなんかよくわかんない。僕みたいな軟弱者からするとサンプルコードが足りない。こう書いたらこう動くからこれを使ってくれ！ってのが見たい。
それでもやっぱり気になるから買ってみたら、36個くらいサンプルコードが入ってた。サンプルコードが入ってた。自分みたいな人に伝えたいことだったので２度書いてみました。</p>

<p>物理演算を使ったゲームのテンプレートはCoronaSDKに入ってるし、particleもサンプル見ながらやったらすぐだったしで、そんなことなで半日くらいやってたらトップの画像のようなゲームではない何かが出来ました。コードや動画晒す程のものじゃないんで、それはもう少しいじった時にでも。</p>

<p>とりあえず以上！</p>

<h3>おまけ</h3>

<p>標準のapiだとadmodの広告表示出来ないのだけど、以下使って表示出来ました。一応表示まで試してみたのでおまけで紹介です。</p>

<blockquote>
  <p>deniza/Ad-Mediator-for-Corona · GitHub <a href="https://github.com/deniza/Ad-Mediator-for-Corona" target="_blank">https://github.com/deniza/Ad-Mediator-for-Corona</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log708.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC2でDjango+Nginx環境構築するメモ (Amazon Linux AMI 2012.03</title>
		<link>http://dat.plastica-romantica.com/log699.html</link>
		<comments>http://dat.plastica-romantica.com/log699.html#comments</comments>
		<pubDate>Sun, 22 Apr 2012 04:14:01 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=699</guid>
		<description><![CDATA[選択したAMIは&#8221;Amazon Linux AMI 2012.03&#8243; 以下の記事が参考になったのですが、記事の中で使われているAMIはUbuntuなのでapt-getをeasy_installにし [...]]]></description>
				<content:encoded><![CDATA[<p>選択したAMIは&#8221;Amazon Linux AMI 2012.03&#8243;<br />
以下の記事が参考になったのですが、記事の中で使われているAMIはUbuntuなのでapt-getをeasy_installにしてます。<br />
詰まったとこメモしてるだけなので、全体像は偉大なるリンク先参照ください。</p>
<blockquote><p><a href="http://adrian.org.ar/python/django-nginx-green-unicorn-in-an-ubuntu-11-10-ec2-instance">Adrián Deccico » Setting up Django 1.3 + NGinx 1.0.5 + Green Unicorn 0.13 in an Ubuntu 11.10 EC2 instance</a></p></blockquote>
<p>sshでつなげて、いろいろインストールしてDjango用の環境を作る。</p>
<pre class="brush: plain; title: ; notranslate">
sudo easy_install python-pip
sudo pip install pip --upgrade
sudo pip install virtualenv
sudo yum install nginx
virtualenv --no-site-packages django_app
cd django_app
source bin/activate
</pre>
<p>アプリケーション作成して、とりあえずgunicorn_djangoで実行。<br />
#このときEC2のSecurityGroupでport8000を許可してなくて一度つまりました。</p>
<pre class="brush: plain; title: ; notranslate">
pip install django gunicorn
django-admin.py startproject app
cd app
gunicorn_django -b 0.0.0.0:8000
</pre>
<p>これで、PublicDNS:8000にアクセスしたらDjangoのwork画面が見られる。<br />
control+cで終了して次にNginxの設定。</p>
<pre class="brush: plain; title: ; notranslate">
sudo mkdir -p /opt/django/logs/nginx/
mkdir $HOME/django_app/static
mkdir $HOME/django_app/templates
sudo ln -s $HOME/django_app/static /opt/django
sudo mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.backup

#ここでdefault.confを書き換える。設定内容はリンク先記事のwgetで取得したものを参考にしたので省略。
</pre>
<p>DjangoのTEMPLATE_DIRSに作成したディレクトリを追加。<br />
TEMPLATE_なんたらと間違えてて詰まった。ちゃんとDIRSだと確認。<br />
Django触るの初めてだよと言い訳。</p>
<pre class="brush: plain; title: ; notranslate">
vi settings.py

TEMPLATE_DIRS = (
	'/home/ec2-user/django_app/templates',
)
</pre>
<p>urlpatternにテスト用テンプレートのurlを追加。<br />
import direct_to_templateも忘れずに追加。</p>
<pre class="brush: plain; title: ; notranslate">
vi urls.py

from django.conf.urls.defaults import patterns
from django.views.generic.simple import direct_to_template

urlpatterns = patterns('',
	(r'^test_static/$', direct_to_template, {'template': 'test_static.html'}),
)
</pre>
<p>以下のテンプレディレクトリにhtmlを置いておく。端折ってHelloWorldとだけ書いときました。<br />
/home/ec2-user/django_app/templates/test_static.html</p>
<p>Nginxを再起動して、gunicorn_djangoで再度gunicornを動かす。<br />
今回は80番portでアクセス(PublicDNS/test_static/)出来る。SecurityGroupで80番portが許可されているか確認。</p>
<p>最後に自動起動させるためににUpstartに登録する。<br />
/etc/init/以下に.confファイルを置けばいいのだけど、.confファイルの記述ミスってるとそもそもサービスとして認識してくれない。<br />
で、リンク先ではwww-dataってユーザーに実行させてるけど、www-dataにどのくらい権限与えればいいのかよくわかんなかったので、取り急ぎec2-userで実行するよう書いときました。</p>
<pre class="brush: plain; title: ; notranslate">
#!/bin/bash
set -e
LOGFILE=/var/log/gunicorn/django_app.log
LOGDIR=$(dirname $LOGFILE)
NUM_WORKERS=3  #recommended formula here is 1 + 2 * NUM_CORES

USER=ec2-user

cd /home/ec2-user/django_app
source bin/activate
cd app
test -d $LOGDIR || mkdir -p $LOGDIR
exec gunicorn_django -w $NUM_WORKERS \
  --log-level=debug \
  --log-file=$LOGFILE 2&gt;&gt;$LOGFILE \
  --user=$USER
</pre>
<p>以上。</p>
<p>って、ホントはflaskの入った環境欲しいなと思い始めたので、放置してflaskでアプリ組むための環境作ろうと思います。<br />
気が変わってもイメージとっておけるのがEC2の良いところですね。</p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log699.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TitaniumのWebViewでProcessing.jsを使ってみる。</title>
		<link>http://dat.plastica-romantica.com/log677.html</link>
		<comments>http://dat.plastica-romantica.com/log677.html#comments</comments>
		<pubDate>Mon, 30 Jan 2012 14:58:21 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[アプリ]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=677</guid>
		<description><![CDATA[タイトルの通りTitaniumのWebView内でprocessing.jsを動かしてみました。Titanium側からevalJSを使ってprocessingのloopを操作 しています。それだけですが、思ってたより全然 [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://dat.plastica-romantica.com/wp-content/uploads/2012/01/Web.jpg" rel="lightbox[677]"><img src="http://dat.plastica-romantica.com/wp-content/uploads/2012/01/Web-500x327.jpg" alt="" title="WebView" width="500" height="327" class="aligncenter size-large wp-image-686" /></a></p>
<p>タイトルの通りTitaniumのWebView内でprocessing.jsを動かしてみました。<br />Titanium側からevalJSを使ってprocessingのloopを操作 しています。<br />それだけですが、思ってたより全然簡単で驚きました。簡単なリズムゲームとか作ったら楽しそう。<br />webViewでやった方が簡単だから…的記事時々見かけるのなんでかなんとなくわかった気がする。</p>
<p>processingに慣れてないなら普通にjavascriptでやった方がいい気もします。僕は慣れてない方の人です。おいおい！って。</p>
<p>雑なコードは以下。</p>
<p><strong>app.js</strong></p>
<pre class="brush: jscript; title: ; notranslate">
Ti.UI.setBackgroundColor('#000');
var tt = {}
tt.ui = {};
tt.ui.createProcessingView = function() {
	var win = Ti.UI.createWindow();
	var web = Ti.UI.createWebView({top:0,right:0,bottom:0,left:0});
	web.url = '/src/processing.html';
	win.add(web);
	
	var controller = Ti.UI.createView({
		bottom: 0,
		width: Ti.Platform.displayCaps.platformWidth,
		height: 50,
		layout: &quot;horizontal&quot;
	});
	var labelSetting = {
		width: controller.width/2,
		textAlign: &quot;center&quot;,
		backgroundColor: &quot;#FFF&quot;,
		font: {fontSize:16, fontWeight:'bold', fontFamily:'Helvetica'},
		height: controller.height,
		text: &quot;start&quot;
	};
	var startLabel = Ti.UI.createLabel(labelSetting);
	startLabel.text = &quot;start&quot;;
	controller.add(startLabel);
	var stopLabel = Ti.UI.createLabel(labelSetting);
	stopLabel.text = &quot;stop&quot;;
	controller.add(stopLabel);
	win.add(controller);
	
	startLabel.addEventListener(&quot;click&quot;, function() {
		web.evalJS(&quot;startSketch()&quot;);
	});
	stopLabel.addEventListener(&quot;click&quot;, function() {
		web.evalJS(&quot;stopSketch()&quot;);
	});
	
	return win;
}

var wwin = tt.ui.createProcessingView();
wwin.open();
</pre>
<p><strong>processing.html</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Hello Web&lt;/title&gt;
 	&lt;script src=&quot;processing-1.3.6.min.js&quot;&gt;&lt;/script&gt;
 	&lt;style&gt;
 		* { margin:0; padding:0; }
		html, body { width:100%; height:100%; }
		canvas { display:block; }
 	&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;canvas id=&quot;sketch&quot;&gt;&lt;/canvas&gt;
&lt;script type=&quot;application/javascript&quot;&gt;
	function sketchProc(processing) {
		var Ps = processing;
		var width = window.innerWidth;
		var height = window.innerHeight;
		Ps.setup = function(){
			Ps.size(width, height);
			Ps.smooth();
		};
		Ps.draw = function() {
			Ps.background(100);
			Ps.fill(200);
			Ps.noStroke();
			for(var i=0; i&lt;100; i++){
				var c = Ps.random(10, 15);
				Ps.ellipse(Ps.random(width), Ps.random(height), c, c);
			}
		};
	}
	
	var canvas = document.getElementById(&quot;sketch&quot;);
	var processingInstance = new Processing(canvas, sketchProc);

	function startSketch() {
		processingInstance.loop();
	}
	
	function stopSketch() {
		processingInstance.noLoop();
	}
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><span style="text-align: center;">目が悪くなりそうなcanvasなのはお許しをば。<br />テキトーに書き換えて実行しましょ。 </span></p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log677.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>わらったない</title>
		<link>http://dat.plastica-romantica.com/log675.html</link>
		<comments>http://dat.plastica-romantica.com/log675.html#comments</comments>
		<pubDate>Sun, 29 Jan 2012 17:34:36 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[雑文]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=675</guid>
		<description><![CDATA[ネットで見かける「笑った」って、笑ってないですよね。 「ワロタ」とか「www」とかネット上の笑いの表現は東京オリンピックあたりから存在してたみたいに浸透しちゃってるけど、これらって別に「私はパソコンの前で笑ってますよ」っ [...]]]></description>
				<content:encoded><![CDATA[<p>ネットで見かける「笑った」って、笑ってないですよね。</p>
<p>「ワロタ」とか「www」とかネット上の笑いの表現は東京オリンピックあたりから存在してたみたいに浸透しちゃってるけど、これらって別に「私はパソコンの前で笑ってますよ」ってことを伝えようとしているわけじゃないですよね？</p>
<p>衆人環視の中、しかめっ面で「笑った」っていう6バイトの情報をネットの海に吐き捨ててる人なんてザラにいると思うし、むしろ笑えない状況だからこそ、笑いたい欲求を「笑った」っていう文字情報にして発散してるって場合もありますよね。そこで「面白い」と書かずに「笑った」って書く。強引かもだけど、それはきっと「笑いたい」だったりするんじゃない、って。</p>
<p>まぁ、もちろん実際笑ってるから「笑った」って書いてる人もいるだろうし、もしかしたら僕以外の人間はみなそうで、笑ってないのに「笑った」とか書いてるひねくれ者は僕だけかもしれないね。実際わかんない。個室トイレの中で皆逆立ちしてるの知らないのあなただけかもしれない。</p>
<p>話それちゃったけど、「笑った」に限らずネット上の文字って変なエネルギーありますよね。<br />キーボード、タッチパネルを通してエネルギーを込めるのですよ。「よろしくお願いします！」って。</p>
<p> こういうのって全世界共通？平安時代から？ <br />少なくとも日本人なら「マジワロス」の音の響きには何か惹かれるものがある気がするね。</p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log675.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>超欲張りじゃん</title>
		<link>http://dat.plastica-romantica.com/log672.html</link>
		<comments>http://dat.plastica-romantica.com/log672.html#comments</comments>
		<pubDate>Sat, 28 Jan 2012 15:28:26 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[日記]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=672</guid>
		<description><![CDATA[超欲張りじゃんと思って、迷わず手に取りました。＠LAWSON残念ながらダイスキです。こういうの。  でもこのロゴなんて読むんだろ。Cは読むの？デザイン？とかどーでもいいこと気になっちゃって調べたら「ビタミンレモン乳酸菌飲 [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://dat.plastica-romantica.com/wp-content/uploads/2012/01/2012-01-29-12-09-01-504.jpg" rel="lightbox[672]"><img src="http://dat.plastica-romantica.com/wp-content/uploads/2012/01/2012-01-29-12-09-01-504-500x299.jpg" title="2012-01-29 12-09-01-504" width="500" height="250" class="aligncenter  wp-image-673" /></a></p>
<p>超欲張りじゃんと思って、迷わず手に取りました。＠LAWSON<br />残念ながらダイスキです。こういうの。<br /> <br /> でもこのロゴなんて読むんだろ。Cは読むの？デザイン？<br />とかどーでもいいこと気になっちゃって調べたら「ビタミンレモン乳酸菌飲料」 が正式名称でした。<br />潔いね。男前だね。<br />「ピルクル-ビタミンレモン味-」って名前の方が売れそうじゃんとかちょっと思ったけど。</p>
<p>話題のステマじゃないですよ。<br />お金じゃなくて、お金払ってビタミンCもらって書いてます。</p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log672.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>safariでWebGLを有効にするのはまだ面倒。2012/01</title>
		<link>http://dat.plastica-romantica.com/log668.html</link>
		<comments>http://dat.plastica-romantica.com/log668.html#comments</comments>
		<pubDate>Sat, 28 Jan 2012 06:12:36 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[インターネット]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[プログラミング]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=668</guid>
		<description><![CDATA[面倒っていうほどじゃないんだけど。 processing.jsで3dを描く、ちょっとだけ。 &#124; 脱兎.dat 先日、WebGL使った記事書いてみたんだけど、対応してないブラウザに配慮が足りてなかった。 そもそもcanva [...]]]></description>
				<content:encoded><![CDATA[<p>面倒っていうほどじゃないんだけど。</p>
<p><a href="http://dat.plastica-romantica.com/log570.html" target="_blank">processing.jsで3dを描く、ちょっとだけ。 | 脱兎.dat</a></p>
<p>先日、WebGL使った記事書いてみたんだけど、対応してないブラウザに配慮が足りてなかった。</p>
<p>そもそもcanvasタグに対応してないブラウザのためにcanvasタグを飾ってメッセージを入れてあげなきゃなんない。<br />以下の記事が参考になる。</p>
<blockquote>
<p>HTML5 Canvas &amp; Processing JS<br /><a href="http://joeycadle.com/blog/article/1/2012/22/01/html5-canvas-and-processing-js#comments " target="_blank">http://joeycadle.com/blog/article/1/2012/22/01/html5-canvas-and-processing-js#comments </a></p>
</blockquote>
<p>Chromeに誘導しちゃうのね。</p>
<p>それでもなんなのこの記事わけわかんない！って言われたから<br />うちのSafari見てみたらcanvasタグが空き地になってた。<br />canvasタグには対応しているけどWebGLが有効になってないの原因?</p>
<p>safariでWebGLを有効にする方法。(2012/01現在)</p>
<p>1.メニュー「環境設定 &gt; 詳細」より「メニューバーに&#8221;開発&#8221;メニューを表示」をオンに。<br />2.メニュー「開発」より「WebGLを有効にする」をオンに。</p>
<p>以上。<br />いちいち、有効にしてくださいね。ってcanvas外に書くのもcoolじゃないし<br />設定取得する方法とかないのかな。ま、早めにデフォルト有効になることを願ってます。</p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log668.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>必然とブログが書きたくなる１つの方法</title>
		<link>http://dat.plastica-romantica.com/log658.html</link>
		<comments>http://dat.plastica-romantica.com/log658.html#comments</comments>
		<pubDate>Thu, 26 Jan 2012 14:13:29 +0000</pubDate>
		<dc:creator>imaimiami</dc:creator>
				<category><![CDATA[雑文]]></category>

		<guid isPermaLink="false">http://dat.plastica-romantica.com/?p=658</guid>
		<description><![CDATA[「深夜に残念なタイトルの記事をポストする」 たったこれだけです。あなたは次の日の日中気になって仕方なくなります。 「ああ、こうしている間もマスタベーションなんて言葉がブログのトップにでかでかと居座ってる。早く次の投稿しな [...]]]></description>
				<content:encoded><![CDATA[<p>「深夜に残念なタイトルの記事をポストする」</p>
<p>たったこれだけです。<br />あなたは次の日の日中気になって仕方なくなります。</p>
<p>「ああ、こうしている間もマスタベーションなんて言葉がブログのトップにでかでかと居座ってる。早く次の投稿しないと！」</p>
<p>自らを追い込むアスリートのようなストイックさが時として必要になります。<br />以上、皆様が戦略的なブログライフを送れることを願っております。</p>
<p>P.S. 深夜のラブレターにはくれぐれもお気をつけを。</p>
]]></content:encoded>
			<wfw:commentRss>http://dat.plastica-romantica.com/log658.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
