<?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>Puchilog Plus</title>
	<atom:link href="http://blog.puchiplus.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.puchiplus.com</link>
	<description>Flash/ActionScript</description>
	<lastBuildDate>Wed, 03 Mar 2010 12:39:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>flickr search</title>
		<link>http://blog.puchiplus.com/2010/03/flickr-search.php</link>
		<comments>http://blog.puchiplus.com/2010/03/flickr-search.php#comments</comments>
		<pubDate>Wed, 03 Mar 2010 12:38:12 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=550</guid>
		<description><![CDATA[http://puchiplus.com/sample/flickr/
たまにAS以外の言語に触れると楽しいです。
rubyでflickrAPIたたいて表示してるだけです。

使ってるjQueryはこつら。
・Create a Thumbnail Gallery with Slick Heading and Caption Effect with jQuery
・How to Create a Visual Image Preloader using jQuery &#171;  Dino Latoga


IEで見るとCSSの角丸がきいてなかったり、ロールオーバー時のキャプションの背景が透過じゃなかったり残念なのでIE以外をお薦めします。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://puchiplus.com/sample/flickr/" target="_blank">http://puchiplus.com/sample/flickr/</a></p>
<p>たまにAS以外の言語に触れると楽しいです。<br />
rubyでflickrAPIたたいて表示してるだけです。</p>
<p>
使ってるjQueryはこつら。<br />
・<a href="http://www.queness.com/post/484/create-a-thumbnail-gallery-with-slick-heading-and-caption-effect-with-jquery" target="_blank">Create a Thumbnail Gallery with Slick Heading and Caption Effect with jQuery</a><br />
・<a href="http://dinolatoga.com/2009/04/26/how-to-create-a-visual-image-preloader-using-jquery/" target="_blank">How to Create a Visual Image Preloader using jQuery &laquo;  Dino Latoga</a>
</p>
<p>
IEで見るとCSSの角丸がきいてなかったり、ロールオーバー時のキャプションの背景が透過じゃなかったり残念なのでIE以外をお薦めします。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2010/03/flickr-search.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jiglib 3D Physics Engine #2</title>
		<link>http://blog.puchiplus.com/2009/10/jiglib-3d-physics-engine-2.php</link>
		<comments>http://blog.puchiplus.com/2009/10/jiglib-3d-physics-engine-2.php#comments</comments>
		<pubDate>Sun, 11 Oct 2009 05:06:30 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JIKKEN]]></category>
		<category><![CDATA[jiglib]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=514</guid>
		<description><![CDATA[
ご覧になるには最新のFlashPlayerが必要です。

// 



package classes
{
	import flash.events.Event;

	import org.papervision3d.view.BasicView;
	import org.papervision3d.materials.WireframeMaterial;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.objects.primitives.Cone;
	import org.papervision3d.objects.primitives.Plane;

	import jiglib.plugin.papervision3d.Papervision3DPhysics;
	import jiglib.plugin.papervision3d.Pv3dMesh;
	import jiglib.geometry.JBox;

	[SWF(width="450",height="300",backgroundColor="#ffffff",frameRate="30")]

	public class Main extends BasicView
	{
		private var rootNode:DisplayObject3D;
		private var physics:Papervision3DPhysics;

		public static const FROOR_SIZE:uint=2000;
		public static const CONE_NUM:uint=5;
		public static const CONE_RADIUS:uint=80;
		public static const CONE_HEIGHT:uint=200;

		public function Main():void
		{
			super(450,300,false);
			init();
		}

		private function init():void
		{
			camera.y=400;
			camera.z=-1500;

			rootNode=new DisplayObject3D  ;
			scene.addChild(rootNode);

			physics=new Papervision3DPhysics(rootNode,9.8);

			var floor:Plane=new Plane(new WireframeMaterial(0),FROOR_SIZE,FROOR_SIZE);
			rootNode.addChild(floor);
			var floorBox:JBox=new JBox(new Pv3dMesh(floor),FROOR_SIZE,1,FROOR_SIZE);
			floorBox.y=-500;
			floorBox.rotationX=90;
			floorBox.movable=false;
			physics.addBody(floorBox);

			for (var i:uint=0; i]]></description>
			<content:encoded><![CDATA[<div style="border: 3px solid #00b2ee; margin: 10px 0pt; width: 450px; height: 300px;">
<div id="jiglib2">ご覧になるには<a title="Adobe Flash Player ダウンロードセンター" href="http://www.adobe.com/go/getflashplayer_jp" target="blank">最新のFlashPlayer</a>が必要です。
</div>
<p><script type="text/javascript">// <![CDATA[
var params = {};
params.wmode="transparent";
swfobject.embedSWF("http://blog.puchiplus.com/img/jikken/jiglib/jiglib_2.swf", "jiglib2", "450", "300", "9.0.0", "http://blog.puchiplus.com/img/expressInstall.swf",  params);
// ]]&gt;</script>
</div>
<p><span id="more-514"></span></p>
<pre name="code" class="actionscript">
package classes
{
	import flash.events.Event;

	import org.papervision3d.view.BasicView;
	import org.papervision3d.materials.WireframeMaterial;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.objects.primitives.Cone;
	import org.papervision3d.objects.primitives.Plane;

	import jiglib.plugin.papervision3d.Papervision3DPhysics;
	import jiglib.plugin.papervision3d.Pv3dMesh;
	import jiglib.geometry.JBox;

	[SWF(width="450",height="300",backgroundColor="#ffffff",frameRate="30")]

	public class Main extends BasicView
	{
		private var rootNode:DisplayObject3D;
		private var physics:Papervision3DPhysics;

		public static const FROOR_SIZE:uint=2000;
		public static const CONE_NUM:uint=5;
		public static const CONE_RADIUS:uint=80;
		public static const CONE_HEIGHT:uint=200;

		public function Main():void
		{
			super(450,300,false);
			init();
		}

		private function init():void
		{
			camera.y=400;
			camera.z=-1500;

			rootNode=new DisplayObject3D  ;
			scene.addChild(rootNode);

			physics=new Papervision3DPhysics(rootNode,9.8);

			var floor:Plane=new Plane(new WireframeMaterial(0),FROOR_SIZE,FROOR_SIZE);
			rootNode.addChild(floor);
			var floorBox:JBox=new JBox(new Pv3dMesh(floor),FROOR_SIZE,1,FROOR_SIZE);
			floorBox.y=-500;
			floorBox.rotationX=90;
			floorBox.movable=false;
			physics.addBody(floorBox);

			for (var i:uint=0; i<CONE_NUM; i++)
			{
				var cone:Cone=new Cone(new WireframeMaterial(0xFF0000),CONE_RADIUS,CONE_HEIGHT,6,4);
				scene.addChild(cone);
				var coneBox:JBox=new JBox(new Pv3dMesh(cone),CONE_RADIUS*2,CONE_RADIUS*2,CONE_HEIGHT);
				coneBox.y=1000;
				coneBox.friction=0.2;
				coneBox.restitution=1.2;
				physics.addBody(coneBox);
			}

			startRendering();
		}

		protected override function onRenderTick(e:Event=null):void
		{
			physics.step();
			super.onRenderTick(e);
		}
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/10/jiglib-3d-physics-engine-2.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Creators 10月号に掲載されました</title>
		<link>http://blog.puchiplus.com/2009/08/web-creators-10.php</link>
		<comments>http://blog.puchiplus.com/2009/08/web-creators-10.php#comments</comments>
		<pubDate>Sat, 29 Aug 2009 18:57:03 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=504</guid>
		<description><![CDATA[
Web Creators 10月号に自分がFlashを担当したサイトのインタビューが1ページ掲載されています。
ディレクター・デザイナーさんと一緒です。


自分が喋ってるとこはほんのちょこっとですが機会があれば覗いてみてください。


]]></description>
			<content:encoded><![CDATA[<p>
Web Creators 10月号に自分がFlashを担当したサイトのインタビューが1ページ掲載されています。<br />
ディレクター・デザイナーさんと一緒です。
</p>
<p>
自分が喋ってるとこはほんのちょこっとですが機会があれば覗いてみてください。
</p>
<p><iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&#038;bc1=FFFFFF&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=laqu-22&#038;o=9&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;asins=B002L2O1JQ" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/08/web-creators-10.php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone Developer Program</title>
		<link>http://blog.puchiplus.com/2009/08/iphone-developer-program.php</link>
		<comments>http://blog.puchiplus.com/2009/08/iphone-developer-program.php#comments</comments>
		<pubDate>Sun, 16 Aug 2009 04:08:27 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=500</guid>
		<description><![CDATA[
に加入しようか迷い中。


CocoaとObjective-Cの本買ってiPhoneアプリを勉強中。
今は簡単なのしか作れないけどつくってみたいのとかあるからiPhone Developer Programに加入しようかなぁと。
でないとSimulatorで確認はできても実機で試すこともできない。


年間一万ちょいだからそんな高額でもないし。
ただ今月は金がない。それだけ。

  Amazon.co.jp ウィジェット
]]></description>
			<content:encoded><![CDATA[<p>
に加入しようか迷い中。
</p>
<p>
<a href="http://ja.wikipedia.org/wiki/Cocoa" target="_blank">Cocoa</a>と<a href="http://ja.wikipedia.org/wiki/Objective-C" target="_blank">Objective-C</a>の本買ってiPhoneアプリを勉強中。<br />
今は簡単なのしか作れないけどつくってみたいのとかあるからiPhone Developer Programに加入しようかなぁと。<br />
でないとSimulatorで確認はできても実機で試すこともできない。
</p>
<p>
年間一万ちょいだからそんな高額でもないし。<br />
ただ今月は金がない。それだけ。
</p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_07800157-32c5-4182-88ea-5d9ccf5d6ab1"  WIDTH="500px" HEIGHT="175px"> <PARAM NAME="movie" VALUE="http://ws.amazon.co.jp/widgets/q?ServiceVersion=20070822&#038;MarketPlace=JP&#038;ID=V20070822%2FJP%2Flaqu-22%2F8010%2F07800157-32c5-4182-88ea-5d9ccf5d6ab1&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.co.jp/widgets/q?ServiceVersion=20070822&#038;MarketPlace=JP&#038;ID=V20070822%2FJP%2Flaqu-22%2F8010%2F07800157-32c5-4182-88ea-5d9ccf5d6ab1&#038;Operation=GetDisplayTemplate" id="Player_07800157-32c5-4182-88ea-5d9ccf5d6ab1" quality="high" bgcolor="#ffffff" name="Player_07800157-32c5-4182-88ea-5d9ccf5d6ab1" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="175px" width="500px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.co.jp/widgets/q?ServiceVersion=20070822&#038;MarketPlace=JP&#038;ID=V20070822%2FJP%2Flaqu-22%2F8010%2F07800157-32c5-4182-88ea-5d9ccf5d6ab1&#038;Operation=NoScript">Amazon.co.jp ウィジェット</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/08/iphone-developer-program.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jiglib 3D Physics Engine #1</title>
		<link>http://blog.puchiplus.com/2009/07/jiglib-3d-physics-engine.php</link>
		<comments>http://blog.puchiplus.com/2009/07/jiglib-3d-physics-engine.php#comments</comments>
		<pubDate>Wed, 29 Jul 2009 01:46:46 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JIKKEN]]></category>
		<category><![CDATA[jiglib]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=498</guid>
		<description><![CDATA[3ヶ月以上空いてしまいました。
jiglib 3D Physics Engineという各種3Dライブラリで物理シミュレーションを行うことができるライブラリを触ってみました。
対応している3Dライブラリはjiglibのバージョンr92の時点でPapervision3D・Away3D・Sandyの3つ。
自分はPV3Dしか使ったことないのでPV3D+jiglibの環境です。


ご覧になるには最新のFlashPlayerが必要です。

// 


package
{
	import flash.events.Event;

	import org.papervision3d.view.BasicView;
	import org.papervision3d.materials.WireframeMaterial;
	import org.papervision3d.materials.utils.MaterialsList;
	import org.papervision3d.objects.DisplayObject3D;

	import jiglib.plugin.papervision3d.Papervision3DPhysics;
	import jiglib.physics.RigidBody;

	import net.hires.debug.Stats;

	/**
	 * @author laqu
	 */
	public class Main extends BasicView
	{
		private var rootNode:DisplayObject3D;
		private var physics:Papervision3DPhysics;
		private var floor:RigidBody;

		public static const CUBE_SIZE:uint=150;
		public static const CUBE_NUM:uint=15;

		//Constructor
		public function Main():void
		{
			super(450,300,false);
			stage.quality=&#34;low&#34;;
			init();
		}

		private function init() : void
		{
			addChild(new Stats());

			rootNode=new DisplayObject3D();
			scene.addChild(rootNode);

			camera.y=400;
			camera.z=-2000;

			physics=new Papervision3DPhysics(rootNode,9.8);

			//Create Floor
			floor=physics.createGround(new WireframeMaterial(0), 2000, 0);
			floor.y=-500;

			//Create Cubes
			for(var i:uint=0;i &#60; Main.CUBE_NUM;i++)
			{
				var matlist:MaterialsList=new MaterialsList();
				matlist.addMaterial(new WireframeMaterial(Math.random()*0xffffff),&#34;all&#34;);
				var cube:RigidBody=physics.createCube(matlist, Main.CUBE_SIZE, [...]]]></description>
			<content:encoded><![CDATA[<p>3ヶ月以上空いてしまいました。</p>
<p><a href="http://www.jiglibflash.com/blog/" target="_blank">jiglib 3D Physics Engine</a>という各種3Dライブラリで物理シミュレーションを行うことができるライブラリを触ってみました。</p>
<p>対応している3Dライブラリはjiglibのバージョンr92の時点でPapervision3D・Away3D・Sandyの3つ。</p>
<p>自分はPV3Dしか使ったことないのでPV3D+jiglibの環境です。</p>
<p><span id="more-498"></span></p>
<div style="border: 3px solid #00b2ee; margin: 10px 0pt; width: 450px; height: 300px;">
<div id="jiglib1">ご覧になるには<a title="Adobe Flash Player ダウンロードセンター" href="http://www.adobe.com/go/getflashplayer_jp" target="blank">最新のFlashPlayer</a>が必要です。
</div>
<p><script type="text/javascript">// <![CDATA[
var params = {};
params.wmode="transparent";
swfobject.embedSWF("http://blog.puchiplus.com/img/jikken/jiglib/jiglib_1.swf", "jiglib1", "450", "300", "9.0.0", "http://blog.puchiplus.com/img/expressInstall.swf",  params);
// ]]&gt;</script>
</div>
<pre name="code" class="actionscript">
package
{
	import flash.events.Event;

	import org.papervision3d.view.BasicView;
	import org.papervision3d.materials.WireframeMaterial;
	import org.papervision3d.materials.utils.MaterialsList;
	import org.papervision3d.objects.DisplayObject3D;

	import jiglib.plugin.papervision3d.Papervision3DPhysics;
	import jiglib.physics.RigidBody;

	import net.hires.debug.Stats;

	/**
	 * @author laqu
	 */
	public class Main extends BasicView
	{
		private var rootNode:DisplayObject3D;
		private var physics:Papervision3DPhysics;
		private var floor:RigidBody;

		public static const CUBE_SIZE:uint=150;
		public static const CUBE_NUM:uint=15;

		//Constructor
		public function Main():void
		{
			super(450,300,false);
			stage.quality=&quot;low&quot;;
			init();
		}

		private function init() : void
		{
			addChild(new Stats());

			rootNode=new DisplayObject3D();
			scene.addChild(rootNode);

			camera.y=400;
			camera.z=-2000;

			physics=new Papervision3DPhysics(rootNode,9.8);

			//Create Floor
			floor=physics.createGround(new WireframeMaterial(0), 2000, 0);
			floor.y=-500;

			//Create Cubes
			for(var i:uint=0;i &lt; Main.CUBE_NUM;i++)
			{
				var matlist:MaterialsList=new MaterialsList();
				matlist.addMaterial(new WireframeMaterial(Math.random()*0xffffff),&quot;all&quot;);
				var cube:RigidBody=physics.createCube(matlist, Main.CUBE_SIZE, Main.CUBE_SIZE, Main.CUBE_SIZE);
				cube.restitution=1.2;
				cube.friction=0.2;
				cube.y = Main.CUBE_SIZE * i+1000;
			}

			//Rendering Start
			startRendering();
		}

		protected override function onRenderTick(e:Event=null) : void
		{
			rootNode.rotationY+=(stage.stageWidth/2-stage.mouseX)/70;
			physics.step();
			super.onRenderTick(e);
		}
	}
}
</pre>
<p>以下ソースです。<br />
PV3Dを使用する場合はPapervision3DPhysicsクラスでまず物理のワールドを作ります。</p>
<pre name="code" class="actionscript">
physics=new Papervision3DPhysics(rootNode,9.8);
</pre>
<p>第1引数はDisplayObjectContainer3Dなのでsceneでもいいんですが、別途事前にDisplayObject3Dを作っておいてそれを割り当てておきます。<br />
第2引数は重力です。
</p>
<p>
続いて地面を作ります。使うクラスはRigidBodyというクラス。<br />
Papervision3DPhysicsにはcreateGround・createCube・createSphereというメソッドが用意されておりそれらを利用し3Dのオブジェクトを作っていきます。（PV3Dでオブジェクトを作っておいてそれを利用することもできるのですが、それはまた今度）</p>
<pre name="code" class="actionscript">
floor=physics.createGround(new WireframeMaterial(0), 2000, 0);
</pre>
<p>第2引数はサイズなんですがそれはあくまで第1引数で指定したマテリアルが表示されるサイズであって地面は延々と続いています、はず。
</p>
<p>
次にオブジェクトを作ってみます。</p>
<pre name="code" class="actionscript">
var cube:RigidBody=physics.createCube(matlist, Main.CUBE_SIZE, Main.CUBE_SIZE, Main.CUBE_SIZE);
</pre>
</p>
<p>
最後にenterFrame内でPapervision3DPhysicsのstepメソッドを実行します。<br />
これ忘れると動かない。</p>
<pre name="code" class="actionscript">
physics.step();
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/07/jiglib-3d-physics-engine.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Box2D触ってみた</title>
		<link>http://blog.puchiplus.com/2009/04/box2d.php</link>
		<comments>http://blog.puchiplus.com/2009/04/box2d.php#comments</comments>
		<pubDate>Sat, 18 Apr 2009 11:39:53 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JIKKEN]]></category>
		<category><![CDATA[Box2D]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=472</guid>
		<description><![CDATA[
今さらですがBox2Dやってみました。というか仕事で物理演算使わなきゃいけなかったので触らざるを得なかったというか。
Box2Dのバージョンは2.0.2です。




ご覧になるには最新のFlashPlayerが必要です。


var params = {};
params.wmode="transparent";
swfobject.embedSWF("http://blog.puchiplus.com/img/jikken/box2d/test_202.swf", "box2d1", "450", "300", "9.0.0", "http://blog.puchiplus.com/img/expressInstall.swf",  params);


PV3Dとか他のライブラリとちょっと勝手が違うので最初とまどいましたが。
サンプルのはボックスとサークルを20個ずつNewしてボックスの質量をサークルの質量の100倍にしてます。
ボタンを押したら上下左右ランダムに力を加えてあげてます。


PV3Dとか組み合わせたらおもしろそう。


以下汚いですけどソースです。
（一度全ソース載せましたが長くて表示が遅くなってしまったのでボタン部分とボックス部分、他をちょっと削除します。。）


	import Box2D.Collision.*;
	import Box2D.Collision.Shapes.*;
	import Box2D.Common.Math.*;
	import Box2D.Common.*;
	import Box2D.Dynamics.*;
	import Box2D.Common.Math.b2Vec2;

	public class Main extends Sprite
	{
		private var m_physScale:uint = 100;
		private var world:b2World;
		private var m_sprite:Sprite;
		private var m_iterations:int = 10;
		private var m_timeStep:Number = 1 / 30;

		public function Main():void
		{
			init();
		}

		private function init():void
		{
			var worldAABB:b2AABB = new b2AABB();
			worldAABB.lowerBound.Set( -100, -100);
			worldAABB.upperBound.Set(100, 100);

			var gravity:b2Vec2 = new b2Vec2(0, 9.8);

			world [...]]]></description>
			<content:encoded><![CDATA[<p>
今さらですが<a href="http://box2dflash.sourceforge.net/" target="_blank">Box2D</a>やってみました。というか仕事で物理演算使わなきゃいけなかったので触らざるを得なかったというか。<br />
Box2Dのバージョンは2.0.2です。
</p>
<p><span id="more-472"></span></p>
<div style="margin:10px 0 ; border:solid 3px #00B2EE; width:450px; height:300px">
<div id="box2d1">
ご覧になるには<a href="http://www.adobe.com/go/getflashplayer_jp" target="blank" title="Adobe Flash Player ダウンロードセンター">最新のFlashPlayer</a>が必要です。
</div>
<p><script type="text/javascript">
var params = {};
params.wmode="transparent";
swfobject.embedSWF("http://blog.puchiplus.com/img/jikken/box2d/test_202.swf", "box2d1", "450", "300", "9.0.0", "http://blog.puchiplus.com/img/expressInstall.swf",  params);</script>
</div>
<p>
PV3Dとか他のライブラリとちょっと勝手が違うので最初とまどいましたが。<br />
サンプルのはボックスとサークルを20個ずつNewしてボックスの質量をサークルの質量の100倍にしてます。<br />
ボタンを押したら上下左右ランダムに力を加えてあげてます。
</p>
<p>
PV3Dとか組み合わせたらおもしろそう。
</p>
<p>
以下汚いですけどソースです。<br />
（一度全ソース載せましたが長くて表示が遅くなってしまったのでボタン部分とボックス部分、他をちょっと削除します。。）
</p>
<pre name="code" class="actionscript">
	import Box2D.Collision.*;
	import Box2D.Collision.Shapes.*;
	import Box2D.Common.Math.*;
	import Box2D.Common.*;
	import Box2D.Dynamics.*;
	import Box2D.Common.Math.b2Vec2;

	public class Main extends Sprite
	{
		private var m_physScale:uint = 100;
		private var world:b2World;
		private var m_sprite:Sprite;
		private var m_iterations:int = 10;
		private var m_timeStep:Number = 1 / 30;

		public function Main():void
		{
			init();
		}

		private function init():void
		{
			var worldAABB:b2AABB = new b2AABB();
			worldAABB.lowerBound.Set( -100, -100);
			worldAABB.upperBound.Set(100, 100);

			var gravity:b2Vec2 = new b2Vec2(0, 9.8);

			world = new b2World(worldAABB, gravity, true);

			var wxArr:Array = [0, stage.stageWidth, stage.stageWidth / 2, stage.stageWidth / 2];
			var wyArr:Array = [stage.stageHeight / 2, stage.stageHeight / 2, 0, stage.stageHeight];
			var wwArr:Array = [10, 10, stage.stageWidth, stage.stageWidth];
			var whArr:Array = [stage.stageHeight, stage.stageHeight, 10, 10];

			//Wall
			for (var j:uint = 0; j < 4; j++)
			{
				var floorBodyDef:b2BodyDef = new b2BodyDef();
				floorBodyDef.position.Set(wxArr[j] / m_physScale, wyArr[j] / m_physScale);

				var floorShapeDef:b2PolygonDef = new b2PolygonDef();
				floorShapeDef.SetAsBox(wwArr[j] / 2 / m_physScale, whArr[j]/2 / m_physScale);

				var floorBody:b2Body = world.CreateBody(floorBodyDef);
				floorBody.CreateShape(floorShapeDef);
			}

			//Circle
			for (var i:uint = 0; i < 20; i++)
			{
				var circleBodyDef:b2BodyDef = new b2BodyDef();
				circleBodyDef.position.Set(stage.stageWidth / 2 / m_physScale, 200 / m_physScale);

				var circleShapeDef:b2CircleDef = new b2CircleDef();
				circleShapeDef.radius = Math.random()*0.3+0.05;
				circleShapeDef.density = 1;
				circleShapeDef.friction = 0.5;
				circleShapeDef.restitution = 0.5;

				var circleBody:b2Body = world.CreateBody(circleBodyDef);
				circleBody.CreateShape(circleShapeDef);
				circleBody.SetMassFromShapes();
			}

			//Debug
			m_sprite = new Sprite();
			var debugDraw:b2DebugDraw = new b2DebugDraw();
			debugDraw.m_fillAlpha = 0.3;
			debugDraw.m_drawScale = m_physScale;
			debugDraw.m_lineThickness = 1;
			debugDraw.m_sprite = m_sprite;
			debugDraw.m_drawFlags = b2DebugDraw.e_shapeBit | b2DebugDraw.e_jointBit;
			world.SetDebugDraw(debugDraw);
			addChild(m_sprite);

			addEventListener(Event.ENTER_FRAME, update);
		}

		private function update(e:Event):void
		{
			world.Step(m_timeStep, m_iterations);
		}
	}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/04/box2d.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TextMate買った</title>
		<link>http://blog.puchiplus.com/2009/04/textmate.php</link>
		<comments>http://blog.puchiplus.com/2009/04/textmate.php#comments</comments>
		<pubDate>Sat, 18 Apr 2009 10:51:10 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=459</guid>
		<description><![CDATA[



2ヶ月ぶりの更新になってしまいました。


最近Rubyを勉強し始めましてMac用のいいエディタないかなーと思っていろいろ試して最終的にいきついたのがTextMate。
他に試したのはAptanaやNetBeansとかのいわゆるIDE。この2つはフリーで使えるんだけどTextMateはTrial期間1ヶ月が終わったら有料。日本円で5000円くらい。



やっぱりIDEは他にいろいろアプリ立ち上げてたら重くなっちゃう(自分の環境では)のでTextMateにしました。
ただしTextMateはデフォルトでは日本語が打てない。この辺を見ながらなんとか日本語打てるようになったけど文字幅が細い・・けど今んとこ解決方法が他にないのでしょうがないですが。


一応AS3の補完なんかもやってくれるんですがFlashDevelopには適わないのでASは当分FDで。


Flash→Ruby→XML→FlashとかFlash→Ruby→MySQLとかやって遊んでる感じです。
別にプログラマになりたいわけじゃないんだけどサーバーサイドもやれたら幅が広がるしなーと。


PHPもちょっとやったことはあるんですが自分にはRubyの方がしっくりきたんでRubyをやることに。
なのでRuby関連のエントリも書けたら書いていこうと思います。
]]></description>
			<content:encoded><![CDATA[<div style="margin:0 0 10px 0;">
<img src="http://blog.puchiplus.com/img/thumbnail/TextMate_icon.png" alt="TextMate" />
</div>
<p>
2ヶ月ぶりの更新になってしまいました。
</p>
<p>
最近Rubyを勉強し始めましてMac用のいいエディタないかなーと思っていろいろ試して最終的にいきついたのが<a href="http://macromates.com/" title="TextMate" target="_blank">TextMate</a>。<br />
他に試したのは<a href="http://aptana.com/" title="Aptana" target="_blank">Aptana</a>や<a href="http://ja.netbeans.org/" title="NetBeans" target="_blank">NetBeans</a>とかのいわゆるIDE。この2つはフリーで使えるんだけどTextMateはTrial期間1ヶ月が終わったら有料。日本円で5000円くらい。
</p>
<p><span id="more-459"></span></p>
<p>
やっぱりIDEは他にいろいろアプリ立ち上げてたら重くなっちゃう(自分の環境では)のでTextMateにしました。<br />
ただしTextMateはデフォルトでは日本語が打てない。<a href="http://d.hatena.ne.jp/hetima/20061110/1163085746" target="_blank">この辺</a>を見ながらなんとか日本語打てるようになったけど文字幅が細い・・けど今んとこ解決方法が他にないのでしょうがないですが。
</p>
<p>
一応AS3の補完なんかもやってくれるんですがFlashDevelopには適わないのでASは当分FDで。
</p>
<p>
Flash→Ruby→XML→FlashとかFlash→Ruby→MySQLとかやって遊んでる感じです。<br />
別にプログラマになりたいわけじゃないんだけどサーバーサイドもやれたら幅が広がるしなーと。
</p>
<p>
PHPもちょっとやったことはあるんですが自分にはRubyの方がしっくりきたんでRubyをやることに。<br />
なのでRuby関連のエントリも書けたら書いていこうと思います。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/04/textmate.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ribbon3D触ってみた</title>
		<link>http://blog.puchiplus.com/2009/02/ribbon3d.php</link>
		<comments>http://blog.puchiplus.com/2009/02/ribbon3d.php#comments</comments>
		<pubDate>Wed, 18 Feb 2009 18:46:44 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JIKKEN]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=448</guid>
		<description><![CDATA[
PV3Dのブログで紹介されてたRibbon3Dを試してみました。
Audiのサイトで使われてたやつですね。
Soulwireの中の人が作られたのかな？

PV3Dで紹介されてたのをちょっといじっただけですけど。



ご覧になるには最新のFlashPlayerが必要です。


var params = {};
params.wmode="transparent";
swfobject.embedSWF("http://blog.puchiplus.com/img/jikken/pv3d/ribbon/ribbon3d.swf", "ribbon3d", "450", "300", "9.0.0", "http://blog.puchiplus.com/img/expressInstall.swf",  params);


var ribbon:Ribbon3D = new Ribbon3D(マテリアル, 線の太さ, 長さ);


第3引数の長さはmaxSegementってなってたからまぁそのまんまセグメントの最大数を指定してあげる感じ。
10ならセグメントが10個以上になったら前のは消えていくよってことだと思う。


ほんで描画するときはenterFrame内で

ribbon.draw();

って感じでdrawメソッド使えばいい。


ソース抜粋。汚くてすいません。あとBasicView使ってないです。

public function init3d():void
{
	/**** 略 ****/
　　　　
	var light:PointLight3D = new PointLight3D();
	light.z = -1000;
	var material:FlatShadeMaterial = new FlatShadeMaterial(light, 0xFF0000, 0x0099CC);
	material.doubleSided = true;
	ribbon = new Ribbon3D(material, 6, 160);
	ribbon.useOwnContainer = true;
	ribbon.filters = [new GlowFilter(0x000000, 1, 4, 4, 60)];

	scene.addChild(ribbon);

	addEventListener(Event.ENTER_FRAME, render3d);
}

private function render3d(event:Event):void
{
	//ここで動きつける

	ribbon.draw();
	render.renderScene(scene, camera, viewport);
}

]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://pv3d.org/2009/02/17/ribbons/" target="_blank">PV3Dのブログで紹介</a>されてたRibbon3Dを試してみました。<br />
<a href="http://www.rhythmoflines.co.uk/" target="_blank">Audiのサイト</a>で使われてたやつですね。<br />
<a href="http://blog.soulwire.co.uk/" target="_blank">Soulwire</a>の中の人が作られたのかな？
</p>
<p>PV3Dで紹介されてたのをちょっといじっただけですけど。</p>
<p><span id="more-448"></span></p>
<div style="margin:10px 0 ; border:solid 3px #00B2EE; width:450px;">
<div id="ribbon3d">
ご覧になるには<a href="http://www.adobe.com/go/getflashplayer_jp" target="blank" title="Adobe Flash Player ダウンロードセンター">最新のFlashPlayer</a>が必要です。
</div>
<p><script type="text/javascript">
var params = {};
params.wmode="transparent";
swfobject.embedSWF("http://blog.puchiplus.com/img/jikken/pv3d/ribbon/ribbon3d.swf", "ribbon3d", "450", "300", "9.0.0", "http://blog.puchiplus.com/img/expressInstall.swf",  params);</script>
</div>
<pre name="code" class="actionscript">
var ribbon:Ribbon3D = new Ribbon3D(マテリアル, 線の太さ, 長さ);
</pre>
<p>
第3引数の長さはmaxSegementってなってたからまぁそのまんまセグメントの最大数を指定してあげる感じ。<br />
10ならセグメントが10個以上になったら前のは消えていくよってことだと思う。
</p>
<p>
ほんで描画するときはenterFrame内で</p>
<pre name="code" class="actionscript">
ribbon.draw();
</pre>
<p>って感じでdrawメソッド使えばいい。
</p>
<p>
ソース抜粋。汚くてすいません。あとBasicView使ってないです。</p>
<pre name="code" class="actionscript">
public function init3d():void
{
	/**** 略 ****/
　　　　
	var light:PointLight3D = new PointLight3D();
	light.z = -1000;
	var material:FlatShadeMaterial = new FlatShadeMaterial(light, 0xFF0000, 0x0099CC);
	material.doubleSided = true;
	ribbon = new Ribbon3D(material, 6, 160);
	ribbon.useOwnContainer = true;
	ribbon.filters = [new GlowFilter(0x000000, 1, 4, 4, 60)];

	scene.addChild(ribbon);

	addEventListener(Event.ENTER_FRAME, render3d);
}

private function render3d(event:Event):void
{
	//ここで動きつける

	ribbon.draw();
	render.renderScene(scene, camera, viewport);
}
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/02/ribbon3d.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPressいろいろいじった</title>
		<link>http://blog.puchiplus.com/2009/02/wordpress.php</link>
		<comments>http://blog.puchiplus.com/2009/02/wordpress.php#comments</comments>
		<pubDate>Sun, 08 Feb 2009 18:52:29 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[site info]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=372</guid>
		<description><![CDATA[
MTからWordPressに変えてだいぶ違うなーと思ったこと。

Pluginが豊富で追加・削除が超簡単
デザイン変えるのに一苦労
WordPressは再構築がないから待たなくていい（これが理由でMTから乗り換えたんだけども）



PluginはMTのころほとんど使ってなかったんだけどWPでは5個ぐらいすでに使ってる。
iPhoneでも見れるようにしてくれる『iWPhone』とか便利（Flashが見れないのがあれだけど）。
人気記事や関連記事を出してくれるPluginも便利。スパムコメント対策のはデフォルトで入ってる。


MTを2年ぐらい使ってたせいかPHPがそんなに分からないからかデザイン変えるのが一番めんどかった。
PHPもいじんなきゃいけないし。CSSとか全然整理してないや。慣れないとね。
今回はシンプルにしたかったからちょうどよかったけど。


すでに表示がおかしいとこがいくつかあるんだけど、その辺はスルーで。そのうち直します。
]]></description>
			<content:encoded><![CDATA[<p>
MTからWordPressに変えてだいぶ違うなーと思ったこと。</p>
<ul>
<li>Pluginが豊富で追加・削除が超簡単</li>
<li>デザイン変えるのに一苦労</li>
<li>WordPressは再構築がないから待たなくていい（これが理由でMTから乗り換えたんだけども）</li>
</ul>
<p><span id="more-372"></span></p>
<p>
PluginはMTのころほとんど使ってなかったんだけどWPでは5個ぐらいすでに使ってる。<br />
iPhoneでも見れるようにしてくれる『<a href="http://iwphone.contentrobot.com/2007/07/04/iwphone-wordpress-plugin-and-theme/" target="_blank">iWPhone</a>』とか便利（Flashが見れないのがあれだけど）。<br />
人気記事や関連記事を出してくれるPluginも便利。スパムコメント対策のはデフォルトで入ってる。
</p>
<p>
MTを2年ぐらい使ってたせいかPHPがそんなに分からないからかデザイン変えるのが一番めんどかった。<br />
PHPもいじんなきゃいけないし。CSSとか全然整理してないや。慣れないとね。<br />
今回はシンプルにしたかったからちょうどよかったけど。
</p>
<p>
すでに表示がおかしいとこがいくつかあるんだけど、その辺はスルーで。そのうち直します。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/02/wordpress.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progression講座「最初の2歩目」</title>
		<link>http://blog.puchiplus.com/2009/02/progression-2.php</link>
		<comments>http://blog.puchiplus.com/2009/02/progression-2.php#comments</comments>
		<pubDate>Fri, 06 Feb 2009 18:44:05 +0000</pubDate>
		<dc:creator>Laqu</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://blog.puchiplus.com/?p=348</guid>
		<description><![CDATA[書くのがだいぶ遅れちゃったけど1/27に開かれた『Progression講座（クラスベース）「最初の2歩目」』に参加してきました。
道に迷って少し遅れて到着。（超方向音痴なんで）
内容はクラスベースでの制作の基礎的なところ。


あるシーンに配置するページ（MC）をあらかじめライブラリにいれておきクラス書き出し設定しておく（仮にここではAboutPageていうクラス名をつけます）
書き出しておいたAboutPageクラスはCastMovieClipを継承しておく
AboutPage内に配置して置いたMCのプロパティを_onCastAdded内でnew Propを使って一括設定
new DoTweenerでアニメーションさせる
順番に実行したいならSerialList、同時に実行するならParallelList
AboutPageからステージに配置しておいた『bg』というインスタンス名のMCを参照する =&#62;var bg_mc:MovieClip=MovieClip(Index(CastDocument.root).getChildByName(&#8220;bg&#8221;)); みたいな感じ
AboutPageからIndexクラス内の変数を参照する =&#62;Index(CastDocument.root).hoge みたいな感じ

みたいな内容でした。私的にはだいたい分かってた内容だったので少し物足りなかったのだけども復習的な感じで良かったです。
今月は３歩目があるそうなので興味のある方は行って見られてはどうでしょうか。
]]></description>
			<content:encoded><![CDATA[<p>書くのがだいぶ遅れちゃったけど1/27に開かれた『Progression講座（クラスベース）「最初の2歩目」』に参加してきました。</p>
<p>道に迷って少し遅れて到着。（超方向音痴なんで）</p>
<p>内容はクラスベースでの制作の基礎的なところ。</p>
<p><span id="more-348"></span></p>
<ul style="list-style-type:disc">
<li>あるシーンに配置するページ（MC）をあらかじめライブラリにいれておきクラス書き出し設定しておく（仮にここではAboutPageていうクラス名をつけます）</li>
<li>書き出しておいたAboutPageクラスはCastMovieClipを継承しておく</li>
<li>AboutPage内に配置して置いたMCのプロパティを_onCastAdded内でnew Propを使って一括設定</li>
<li>new DoTweenerでアニメーションさせる</li>
<li>順番に実行したいならSerialList、同時に実行するならParallelList</li>
<li>AboutPageからステージに配置しておいた『bg』というインスタンス名のMCを参照する =&gt;var bg_mc:MovieClip=MovieClip(Index(CastDocument.root).getChildByName(&#8220;bg&#8221;)); みたいな感じ</li>
<li>AboutPageからIndexクラス内の変数を参照する =&gt;Index(CastDocument.root).hoge みたいな感じ</li>
</ul>
<p>みたいな内容でした。私的にはだいたい分かってた内容だったので少し物足りなかったのだけども復習的な感じで良かったです。</p>
<p>今月は３歩目があるそうなので興味のある方は行って見られてはどうでしょうか。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.puchiplus.com/2009/02/progression-2.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
