この文章は、日経BP社から出版されている「HTML5ゲーム開発の極意」の付録PDFを元に、参照しやすいようmarkdown形式に書き起こした、個人的メモです。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createjs.Graphics.prototype.dashedLineTo = function( x1 , y1 , x2 , y2 , dashLen ){ | |
this.moveTo( x1 , y1 ); | |
var dX = x2 - x1; | |
var dY = y2 - y1; | |
var dashes = Math.floor(Math.sqrt( dX * dX + dY * dY ) / dashLen ); | |
var dashX = dX / dashes; | |
var dashY = dY / dashes; | |
var q = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timeline = new createjs.Timeline([], { start: 0 }, { paused: true }); | |
var timeline2 = new createjs.Timeline([], { start: 0 }, { paused: true }); | |
timeline.addTween( | |
createjs.Tween.get(ellipse).to({ x: 100 }, 500, createjs.Ease.cubicOut), | |
createjs.Tween.get(ellipse2).to({ y: 100 }, 500, createjs.Ease.cubicOut).call(function(){ | |
timeline2.gotoAndPlay('start'); | |
}) | |
); | |
timeline2.addTween( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windowsの場合、事前にcwRsyncを導入しておく。 | |
ただし、インストール直後は鍵ファイルのパーミッションについて警告が表示されるため、以下の記事を参考に、/etc/fstabに設定を行う。 | |
https://www.itefix.net/content/permissions-filesdirectories-are-clutteredmixed | |
http://d.hatena.ne.jp/hatecotton/20101016/1287185095 | |
また、SSH関連の設定を保存するため、以下のディレクトリを作成しておくこと。 | |
C:\cwRsync_5.5.0_x86_Free\home\(ユーザ名) | |
※knife-solo が動作するのは、chefDK1.2.22 までのようです。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
コマンドプロンプトで、以下のようにcmd ファイルを生成する。 | |
echo @php "%~dp0(モジュール名).phar" %* > (モジュール名).cmd | |
例えば、phpunit.phar の場合: | |
echo @php "%~dp0phpunit.phar" %* > phpunit.cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sahara | |
vagrant-cachier | |
vagrant-hostmanager | |
vagrant-vbguest | |
vagrant-omnibus | |
vagrant-winnfsd | |
vagrant-teraterm |
この文章は、日経BP社から出版されている「HTML5ゲーム開発の極意」の付録PDFを元に、参照しやすいようmarkdown形式に書き起こした、個人的メモです。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 平行光源の光の強さは、光源の方向のみに依存するので、各頂点の明るさは、法線 n と、光源の方向 l の内積(の関数)になります。 | |
* 反射光の光の強さは、ライトベクトルと視線への反射ベクトルのハーフベクトルと面法線の内積で計算します。 | |
* 環境光は計算量が多いので、単に色を乗せるだけで済ませます。 | |
※ライトベクトルおよび視線の反射ベクトルは、モデルの回転に対する逆行列を掛けることで正しく表示されます。 | |
ライトが固定して、ポリゴンが回る=ポリゴンを固定して、ライトを逆方向に回す | |
``` | |
<script id="vs" type="x-shader/x-vertex"> | |
attribute vec3 position; // 頂点属性:頂点座標位置 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(User)/.vagrant.d/boxes/ の配下にあるawslinuxのディレクトリ内で、box.ovf を編集すれば治る。 | |
「amzn-ami-hvm-201609120170119-x86_64-gp2-201702041905-guest-******」のように延々と続くIDが3箇所ほど記述されており、 | |
Windowsでは長すぎてエラーになるため、「****-guest」の辺りで切って、短くしてやると起動する。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.ochiaimitsuo.com/2400/ |
OlderNewer