Powered by SmartDoc

WiiFlashソスソスソスgソスソスソスソスソスネゑソスソストみよう(Processingソスソス)

2009ソスN3ソスソス7ソスソスソスソス
ソスリ托ソス ソスGソスh
http://akihiko.shirai.as/projects/BookWii/

ソスレ趣ソス

ソスソスソスフ章では木托ソスソスGソスhソスソスソスソスフゑソスソスソスソスヘにゑソスソスAWiiFlashソスソスFlashソスソスActionScriptソスツ具ソスソスナはなゑソスソスAProcessingソスソスソスgソスソスソスト暦ソスソスpソスソスソスソスソスソス@ソスソスソスソスソスソスソスソストゑソスソストゑソスソスソスソスワゑソスソスB

ProcessingソスソスソスソスWiiRemoteソスノつなゑソス

Processingソスヘ、ソス}ソスTソス`ソスソスソス[ソスZソスbソスcソスHソスネ托ソスwソスソスBen FryソスソスCasey Reasソスノゑソスソスソスト開ソスソスソスソスソス黷スソスtソスソスソス[ソスフプソスソスソスOソスソスソスソスソスJソスソスソスツ具ソスソスナゑソスソスBソスfソスソスソスソスソスソスソスoソスソスソスAソスCソスソスソス^ソスソスソスNソスeソスBソスuソスネ搾ソスiソスソスソスソスソスニゑソスソスソスソスソスソスpソスrソスノ鯉ソスソスソスソストゑソスソスソスAソスAソス[ソスeソスBソスXソスgソスソスfソスUソスCソスiソス[ソスナゑソスソスgソスソスソス竄キソスソスソス謔、ソスノ搾ソスソスソストゑソスソスワゑソスソスB

Processingのホームページ

ソスyProcessingソスzhttp://processing.org/

ソスxソス[ソスXソスソスJavaソスソスソスソスネので、LinuxソスCMac OS XソスCWindowsソスニ托ソスソスlソスネ環具ソスソスナ難ソスソスしソスワゑソスソスBJavaソスナ開ソスソスソスニゑソスソスソスソスニ、JDKソスソスソスCソスソスソスXソスgソス[ソスソスソスソスソスソスソスソスAソスRソス}ソスソスソスhソスソスソスCソスソスソスソスソスgソスソスソスソスソスソスソスソスソスソスソスソスソスソスソスニゑソスソスソスソスソスソスソスソスニゑソスソスKソスvソスナはと思ソスソスソストゑソスソスワゑソスソスソスソスソスソスソスソスソスワゑソスソスが、Processingソスヘゑソスソスソスソスフ敷ソスソスソスソスソスソスソスソスソス驍スソス゚の工ソスvソスソスソスネゑソスソスソストゑソスソスワゑソスソスBソスソスソスフゑソスソス゚、JavaソスヘゑソスソスニゑソスソスAソスソスソスワでプソスソスソスOソスソスソス~ソスソスソスOソスソスソスソスソスソスgソスソスソスソスソスソスソスニゑソスソスソスソスソスソスニゑソスソスソスソスソスソスノゑソスソスソスソスソスソストゑソスソスワゑソスソスB

ソスワゑソスソスAソスvソスソスソスOソスソスソスソスソスノつゑソスソストゑソスソスuソスXソスPソスbソス`ソスvソスニゑソスソスソスソストび包ソスソスソスpソスソスソスCソスTソスbソスニ擾ソスソスソスソストゑソスソスソスソスノ趣ソスソスsソスナゑソスソスソス_ソスソスソスソスソスソスソスソスソストゑソスソスワゑソスソスBJavaソスソスソスソスフ難ソスソスソスノゑソスソス閧ェソスソスソスネゑソスソスワゑソスソスネゑソスソスIソスネプソスソスソスOソスソスソスソスソスヘ不ソスvソスナ、ソスソスソスソスソスネゑソスソスレ的ソスニなる部ソスソスソスソスソス迴托ソスソスソスnソス゚るこソスニゑソスソスナゑソスソスワゑソスソスBソスソスソスフゑソスソスソスソスソスヘ、JavaソスニゑソスソスソスソスソスソスソスPerlソスソスPythonソスネどの軽ソスハ鯉ソスソスソスフイソスソスソス[ソスWソスナゑソスソスB

ソスソスソスフようソスノ簡単ソスノ使ソスソスソスソスProcessingソスナゑソスソスソスソスAソスソス@ソス\ソスソスソスニゑソスソスソスソスニゑソスソスソスソスソスソスソスソスソスソスヘゑソスソスソスワゑソスソスソスBソスJソスソスソスソスソスソスソスソスフ難ソスソスソスソスソスヘゑソスAソスlソスbソスgソスソスソス[ソスNソスニの通信ソスAOpenGLソスソスソスgソスソスソスソス3DソスvソスソスソスOソスソスソス~ソスソスソスOソスネど、ソスソスソスソスソスソスソスソスフ機ソス\ソスソスソスソスソスCソスuソスソスソスソスソスノゑソスソスソストサソス|ソス[ソスgソスソスソスソストゑソスソスワゑソスソスBWiiRemoteソスソスソスソスOソスナはゑソスソスソスワゑソスソスソスBProcessingソスソスソスソスWiiRemoteソスソスソスソスソスソスソスソスソス゚のソスソスCソスuソスソスソスソスソスニゑソスソスト、Wrj4P5ソスニゑソスソスソスソスソスソスCソスuソスソスソスソスソスソスソスpソスモゑソスソスソストゑソスソスワゑソスソスB

ソスyWrj4P5ソスzhttp://sourceforge.jp/projects/wrj4p5/wiki/FrontPage

ソスソスソスソスソスソスソスソスソスフソスソスCソスuソスソスソスソスソスソスソスgソスソスソスソスソス゚に必ソスvソスソスBluetoothソスXソス^ソスbソスNソスネどゑソスソスソスソスネゑソスソスソス閧ウソスソストゑソスソスソスAソスKソスソスソスソスソスソスソスSソストの環具ソスソスナ難ソスソスソスソスニは鯉ソスソスソスワゑソスソスソスBソスソスソスソスWindowsソスツ具ソスソスナは難ソスソスソスソスネゑソスソスソスソスニゑソスソスソスソスソスソス謔、ソスナゑソスソスB

ソスソスソスソスソスソスWiiFlashソスフ登ソスソスナゑソスソスBソスOソスヘで紹介さソスソストゑソスソスソスハゑソスAWiiFlashソスヘゑソスソスニゑソスソスソスFlashソスソスソスソスWiiRemoteソスソスソスソスソスソスソスソスソス゚のツソス[ソスソスソスAソスソスソスCソスuソスソスソスソスソスナゑソスソスソスソスAソスソスソスヘ托ソスソスフプソスソスソスOソスソスソス~ソスソスソスOソスソスソス黷ゥソスソスソスソスgソスソスソスソスソスニゑソスソスoソスソスソスワゑソスソスBソスソスxソスdソスgソスンゑソスソスソスソスmソスソスソストゑソスソスワゑソスソスホ、WiiFlashソスソスWiiRemoteソスノ対ゑソスソスソスト用ソスIソスネイソスソスソス^ソスtソスFソス[ソスXソスニゑソスソスト機ソス\ソスソスソスワゑソスソスB

ProcessingソスソスソスソスOソスナはなゑソスソスAnetソスソスソスCソスuソスソスソスソスソスソスソスgソスソスソスソスソスニゑソスWiiFlashソスoソスRソスソスWiiRemoteソスソスソスソスソスソスソスソスソスニゑソスソスナゑソスソスソス謔、ソスノなゑソスワゑソスソスBソスMソスメの奇ソスソスoソスナは、WiiFlashソスフほゑソスソスソスWrj4P5ソスソスソスソスソスソスソスソスソスフ環具ソスソスナ難ソスソスしソストゑソスソスソス謔、ソスネので、WiiFlashソスソスソスgソスソスソスホゑソス闡スソスソスソスフ環具ソスソスソスProcessingソスソスソスソスWiiRemoteソスソスソスソスソスソスソスソスソスニゑソスソスナゑソスソスソスフではなゑソスソスソスソスニ思ソスソスソスワゑソスソスB

ProcessingソスソスソスソスWiiFlashソスソスソスgソスソスソスノゑソス

ProcessingソスソスソスソスWiiFlashソスソスソスoソスRソスソスソスソスWiiRemoteソスノつなゑソスソスソスソス゚に必ソスvソスネ環具ソスソスヘ以会ソスソスフとゑソスソスソスナゑソスソスB

ソスソスソスソスソスナは、ProcessingソスフセソスbソスgソスAソスbソスvソスソスソス@ソスニ、WiiRemoteソスソスソスソスソスソスソスソスソス゚の包ソスソス@ソスノつゑソスソスト撰ソスソスソスソスソスソスワゑソスソスBWiiFlashソスノつゑソスソストは前ソスヘゑソスソスQソスlソスノセソスbソスgソスAソスbソスvソスソスソストゑソスソスソスソスソスソスソスソスBソスワゑソスソスAProcessingソスソスソスフゑソスソスフにつゑソスソストの詳細な撰ソスソスソスソスノつゑソスソストゑソスソスソスソスソスソスソスソスワゑソスソスB

ProcessingソスフセソスbソスgソスAソスbソスv

ProcessingソスフセソスbソスgソスAソスbソスvソスヘとてゑソスソスネ単ソスナゑソスソスBProcessingソスフサソスCソスgソスソスソス辷ウソスkソスtソス@ソスCソスソスソスソスソス_ソスEソスソスソスソスソス[ソスhソスソスソストゑソスソスト解凍ゑソスソス驍セソスソスソスナゑソスソスBソスソスソスノイソスソスソスXソスgソス[ソスソスソスソスソスgソスソスソストイソスソスソスXソスgソス[ソスソスソスソスソスソスネどの搾ソスニは必ソスvソスソスソスソスワゑソスソスソスBソス_ソスEソスソスソスソスソス[ソスhソスヘ以会ソスソスソスURLソスソスソスソスsソスソスソスソスソスニゑソスソスナゑソスソスワゑソスソスBhttp://processing.org/download/index.html

Processing公式HPにおけるダウンロード選択

ソスソスソスソスソスソスソスソスAソスソスソスgソスソスソスソスOSソスノ搾ソスソスソスソスソスソスtソス@ソスCソスソスソスソスソス_ソスEソスソスソスソスソス[ソスhソスソスソストゑソスソスソスソスソスソスソスソスBWindowsソスノつゑソスソストは抵ソスソスモ擾ソスソスソスソスノゑソスソスソスソスソスソスソストゑソスソスソスニゑソスソスソスAソスソスソスノ暦ソスソスRソスソスソスソスソスソスソスソスホ「Without Javaソスvソスナはなゑソスソスルゑソスソスソスソスソスソスソスソス゚ゑソスソスワゑソスソスB

ソスネゑソスソスAソスソスソスMソスソスソス_ソスナの最新ソスoソス[ソスWソスソスソスソスソスソス11ソスソス29ソスソスソスソスソスJソスソス1.0.1ソスナゑソスソスフで、ソスネ鯉ソスフ撰ソスソスソスソスヘゑソスソスソス1.0.1ソスソスホ象とゑソスソスワゑソスソスBソスFソスソスソスがゑソスソスフ包ソスソスヘゑソスヌまゑソストゑソスソスソスニゑソスソスフ最新ソスoソス[ソスWソスソスソスソスソスヘゑソスソスナゑソス1.0.1ソスナはなゑソスソスネゑソスソストゑソスソス驍ゥソスソスソスソスソスソスワゑソスソスがゑソスソスソスソスソスソスソスソスソスソスソスソスソスソスB

ソス_ソスEソスソスソスソスソス[ソスhソスソスソスソスソスソスソスkソスtソス@ソスCソスソスソスソスWソスJソスソスソスソスニ、ソスネ会ソスソスフようソスネフソス@ソスCソスソスソスソスソスソスソスソスワゑソスソスB

Processing.exeを実行

ソスソスソスニゑソスProcessing.exeソスソスソスNソスソスソスソスソス驍セソスソスソスナゑソスソスBソスNソスソスソスソスソスフスソスvソスソスソスbソスVソスソスソスEソスBソスソスソスhソスEソスソスソス\ソスソスソスソスソス黷スソスソスAソスネ会ソスソスフようソスネ会ソスハになゑソスホ撰ソスソスソスソスナゑソスソスB

Processing起動直後

Processingソスフサソスソスソスvソスソスソス動ゑソスソスソス

ソスワゑソスソスソスWiiFlashソスソスソスgソスソスネゑソスソスAProcessingソスソスソスフゑソスソスフのサソスソスソスvソスソスソス動ゑソスソスソスソストみまゑソスソス蛯、ソスBソスソスソスソスソスソスProcessingソスノ付ソスソスソスソスソストゑソスソスソスMouse1DソスニゑソスソスソスソスTソスソスソスvソスソスソス動ゑソスソスソスソスソスソスニにゑソスソスワゑソスソスBソスソスソスjソスソスソス[ソスソスソスソス[File]ソスソス[Examples]ソスソスIソスソスソスソスソスソスニ、ソスニてゑソスソスソスソスソスソスフサソスソスソスvソスソスソスXソスPソスbソス`ソスソスソスpソスモゑソスソスソストゑソスソス驍アソスニゑソスソスソスソスソスソスソスワゑソスソスBソスソスソスフ抵ソスソスソスソスソス[Basics] - [Input] - [Mouse1D]ソスソスIソスソスソスソスソスワゑソスソスBソスソスソスソスニ、50ソスsソスソスソスソスソスソスニのスソスPソスbソス`ソスソスソスJソスソスソスソスワゑソスソスB

Mouse1D

ソスソスソスgソスフ暦ソスソスソスソスヘ置ソスソスソストゑソスソスソスソスト、ソスワゑソスソスヘ趣ソスソスsソスソスソストみまゑソスソス蛯、ソスBソスソスソスソスソスRunソス{ソス^ソスソスソスソスソスソスソスソスソスニ、ソスXソスPソスbソス`ソスソスソスソスソスsソスソスソスソスワゑソスソスBソスソスソスソスソスネウソスBソスソスソスhソスEソスソス2ソスツの撰ソスソスソスソス`ソスソスソスソスソス黷スソスナゑソスソス蛯、ソスソスソスBソス}ソスEソスXソスJソス[ソス\ソスソスソスソスソスソスソスEソスノ難ソスソスソスソスソスソスニ、ソスソスソスソスノ費ソスソスソスソスソスソスト色ソスソスTソスCソスYソスソスソスマ会ソスソスソスソスワゑソスソスB

Mouse1D実行の様子

ソスソスハりこソスフサソスソスソスvソスソスソスソスソスヌのようソスネ難ソスソスソスソスソスソスソス驍ゥソスソスソスソスソスソスソスソスソスソスAソスEソスBソスソスソスhソスEソスソスツゑソスソストスソスPソスbソス`ソスフほゑソスソスノ目ゑソスソスソスソスソスソストみまゑソスソスBJavaソスソスソスソス竄サソスソスノ近ゑソスソスソスソスソスソスソスgソスソスソスソスソスソスソスニゑソスソスソスソスソスソスソスネゑソスAソスソスソスフスソスPソスbソス`ソスソスsetupソスソスソス\ソスbソスhソスAdrawソスソスソス\ソスbソスhソスAupdateソスソスソス\ソスbソスhソスソス3ソスツで構ソスソスソスソスソスソストゑソスソス驍アソスニゑソスソスソスソスソスソス驍ゥソスニ思ソスソスソスワゑソスソスB

setupソスソスソス\ソスbソスhソスナは、ソスEソスBソスソスソスhソスEソスTソスCソスYソスフ設抵ソスネどの擾ソスソスソスソスソスソスソスソスsソスソスソストゑソスソスワゑソスソスBdrawソスソスソス\ソスbソスhソスナは、ソスwソスiソスソスhソスソスツぶゑソスソスAソス}ソスEソスXソスフ位置ソスノ会ソスソスソスソスソス2ソスツの撰ソスソスソスソス`ソスソス`ソスソスソスソスソスソスソスソスソスsソスソスソストゑソスソスワゑソスソスBupdateソスソスソス\ソスbソスhソスナは、ソスソスソスソスソス`ソスフ色ソスソスソスソスWソスvソスZソスノ使ソスソスソスpソスソスソスソスソス[ソス^ソスソスソスvソスZソスソスソストゑソスソスワゑソスソスB

updateソスソスソス\ソスbソスhソスソスソスフ詳細な計ソスZソスノつゑソスソストは難ソスソスノ暦ソスソスソスソスソスソスネゑソスソストゑソスソスソスソスソスソスフでゑソスソスソスソスAソスソスソスフ茨ソスソスソスソスソスmouseXソスニゑソスソスソスソスマ撰ソスソスソスソスwソス閧オソストゑソスソスソスニゑソスソスソスノ抵ソスソスレゑソスソストゑソスソスソスソスソスソスソスソスBmouseXソスニは、ソスソスソスOソスフとゑソスソス闌サソスンのマソスEソスXソスJソス[ソス\ソスソスソスソスXソスソスソスWソスナゑソスソスBソスJソス[ソス\ソスソスソスソスソスWソスソスupdateソスソスソス\ソスbソスhソスノ渡ソスソスソスソスソスニにゑソスソスソスト、leftColorソスArightColorソスAgxソスAgyソスニゑソスソスソスソスソスソスマ撰ソスソスノ適ソスリな値ソスソスソスン定さソスソスワゑソスソスBソスソスソスソスソストゑソスソスソスソスフ値ソスソスソスgソスソスソスト撰ソスソスソスソス`ソスソスソス`ソスソスソスソスワゑソスソスB

ソスソスソスト、ソスソスソスフサソスソスソスvソスソスソスナはマソスEソスXソスJソス[ソス\ソスソスソスソスXソスソスソスWソスソスソスgソスソスソストゑソスソスワゑソスソスソスソスAソスソスソスソスソスWiiRemoteソスソスソスgソスソスソスト托ソスソスソスナゑソスソスネゑソスソスソスソスフでゑソスソス蛯、ソスソスソスBソスソスソスソスソスソスソスソスヘ、WiiFlashソスソスソスgソスソスソストゑソスソスソスソスソスソスソスソスソスソスソスソスソスソス@ソスノつゑソスソスト撰ソスソスソスソスソスソスワゑソスソスB

WiiFlashソスソスソスgソスソスソスソスソスTソスソスソスvソスソスソス動ゑソスソスソス

ソスTソスソスソスvソスソスソスXソスPソスbソス`ソスソスMouse1DWiiソスソスソスJソスソスソストみてゑソスソスソスソスソスソスソスソスBソスソスソスソス動ゑソスソスソスソスノは、ソスワゑソスWiiFlashソスソスソスNソスソスソスソスソスソスKソスvソスソスソスソスソスソスワゑソスソスBソスOソスヘゑソスソスQソスlソスノ、BluetoothソスソスWiiRemoteソスソスFソスソスソスソスソスソスソスAWiiFlashソスソスソスNソスソスソスソスソストゑソスソスソスソスソスソスソスソスBソスソスソスソスソスソスWiiFlashソスソスソスNソスソスソスソスソスソスソスソスAProcessingソスソスRunソス{ソス^ソスソスソスソスソスソスソスソスソストゑソスソスソスソスソスソスソスソスBソス\ソスソスソスソスソスソスソスソスハはまゑソスソスソスソスソスMouse1Dソスニ変ゑソスソスワゑソスソスが、WiiRemoteソスソスソスミねゑソス謔、ソスノ会ソス]ソスソスソスソスソスソスニ、ソス}ソスEソスXソスJソス[ソス\ソスソスソス動ゑソスソスソスソスソスソスニゑソスソスフようソスノ会ソスハゑソスソスマ会ソスソスソスソスワゑソスソスB

ソスソスソスソスナはスソスPソスbソス`ソスノつゑソスソスト詳ゑソスソスソスソスソスソストゑソスソスソスソスワゑソスソス蛯、ソスBソスXソスPソスbソス`ソスノは、ソスネ会ソスソスフようソスソスMouse1DWiiソスソスWiimoteソスソス2ソスツのタソスuソスソスソスソスソスソスワゑソスソスB

Wiimoteソスフほゑソスソスノつゑソスソストは鯉ソスナ詳ゑソスソスソスソスソスソスソスソスソスソスソスフで、ソスワゑソスソスソスMouse1DWiiソスフほゑソスソスノ抵ソスソスレゑソスソストゑソスソスソスソスソスソスソスソスB

Mouse1DWiiソスヘ、ソスソスソスニなゑソスソストゑソスソスソスMouse1DソスソスソスソスソスソスソスソスソスソスソスソスソスソスソスソスソスソスソスフでゑソスソスBソスネ会ソスソスフようソスソス4ソスsソスフ追会ソスソスAソスマ更ソスソスソスソスソスソスワゑソスソスB

  // ソスOソスソス
  float leftColor = 0.0;
  float rightColor = 0.0; 
  Wiimote wiimote; ..... (1) WiiRemoteソスソスソスgソスソスソスソスソス゚の変撰ソス
  void setup(){  
    size(200, 200);
    colorMode(RGB, 1.0);
    noStroke();
    wiimote = new Wiimote(this); ..... (2) ソスソスソスソスソスソス
  }
  
  void draw() {
    wiimote.update(); ..... (3) WiiRemoteソスソスソスソスフ難ソスソスヘゑソスソスソス闕橸ソスソス
    background(0.0);
    update((int)((wiimote.x + 1) * width / 2)); ..... (4) ソスソスソスソスソスxソスZソスソスソスTソスフ値ソスソスソスgソスソス
  // ソス纓ェ

ソスワゑソスソスナ擾ソスソスノ、WiiFlashソスoソスRソスソスWiiRemoteソスソスソスgソスソスソスソスソス゚、Wiimoteソス^ソスソスwiimoteソスニゑソスソスソスソスマ撰ソスソスソスソス`ソスソスソストゑソスソスワゑソス(1)ソスBsetupソスソスソス\ソスbソスhソスナは、ソスソスソスフ変撰ソスソスソスソスソスソスソスソスソスソスソスソストゑソスソスワゑソス(2)ソスB

drawソスソスソス\ソスbソスhソスナはまゑソスソスAWiiRemoteソスソスソスソスフ難ソスソスヘゑソスソスソス闕橸ソズゑソスソス゚に、WiimoteソスNソスソスソスXソスソスupdateソスソスソス\ソスbソスhソスソスソストび出ソスソスソスワゑソス(3)ソスBupdateソスソスソス\ソスbソスhソスフ詳細にはゑソスソスソスソスナは難ソスソスン搾ソスソスンまゑソスソスが、ソスソスソスソスノゑソスソスソスト鯉ソスソスンゑソスWiiRemoteソスフ会ソスソスソスソスxソスネどのパソスソスソスソスソス[ソス^ソスソスソスgソスソスソスソス謔、ソスノなゑソスワゑソスソスBソス痰ヲソスソスWiiRemoteソス正面に鯉ソスソスソスソスソスソスニゑソスソスノひねゑソスソスソスソスソスiXソスソスソスソスソスjソスフ会ソスソスソスソスxソスヘ、wiimote.xソスニゑソスソスソスソスマ撰ソスソスノ難ソスソスソスソストゑソスソスワゑソスソスB

ソスナ鯉ソスヘ会ソスソスソスソスxソスソス`ソス謔キソス髏ウソスソスソス`ソスフサソスCソスYソスノ費ソスソスfソスソスソスソスソス髟費ソスソスソスナゑソス(4)ソスBソスソスソスソスMouse1Dソスナは、updateソスソスソス\ソスbソスhソスノマソスEソスXソスJソス[ソス\ソスソスソスソスXソスソスソスWソスimouseXソスjソスソスnソスソスソストゑソスソスワゑソスソスソスソスBMouse1DWiiソスナは、ソスソスソスソスノならうソス`ソスソスWiiRemoteソスソスXソスソスソスソスソスフ会ソスソスソスソスxソスソスマ奇ソスソスソスソスAupdateソスソスソス\ソスbソスhソスノ渡ソスソスソストゑソスソスワゑソスソスB

Xソスソスソスソスソスフ会ソスソスソスソスxソスソス\ソスソスwiimote.xソスヘ、ソスソスソスSソスノ搾ソスソスノ傾ソスソスソスソスソスニゑソスソスソス-1ソスAソスtソスノ奇ソスソスSソスノ右ソスノ傾ソスソスソスソスソスニゑソスソスソス1ソスニゑソスソスソスソスlソスノなゑソスワゑソスソスBソスソスソスソスソスソスソスツゑソスソストゑソスソスソスソス閧キソスソスニゑソスソスフ範囲を超ゑソスソスワゑソスソスソスソスAソスソス{ソスIソスノゑソス-1ソスソスソスソス1ソスフ範囲と考ソスソスソスト厄ソス閧ソスソスワゑソスソスソスBソスXソスPソスbソス`ソスノ擾ソスソスソスソスソスソスニゑソスソスソスA1ソス足ゑソスソスト会ソスハ包ソスソスiwidthソスjソスソスソスソスソスソスソスA2ソスナ奇ソスソスソスホ、-1ソスソスソスソス1ソスフ範囲ゑソス0ソスソスソスソスソスハ包ソスソスフ範囲に変奇ソスソスナゑソスソスワゑソスソスB

Wiimoteソスフ使ソスソスソスソス

WiiRemoteソスソスProcessingソスソスソスソスgソスソスソスソスソス゚には、WiimoteソスNソスソスソスXソスソスソスgソスソスソスワゑソスソスBWiimoteソスNソスソスソスXソスヘ、ソスソスソスソスWiiFlashソスフ趣ソスソスソスソスソスソスQソスlソスノ筆ソスメゑソスソスIソスソスソスWソスiソスソスソスナ作成ソスソスソスソスソスソスソスフで、ソスソスソスソスノつゑソスソストは厄ソスソスロ証とゑソスソスワゑソスソスBソスソスソスソスWiimoteソスソスソスgソスソスソスソスソス゚のスソスeソスbソスvソスヘ大きソスソスソスソスソスソスソスソス3ソスツでゑソスソスB

ソスソスソスソスソスソス

newソスソスWiimoteソスフコソスソスソスXソスgソスソスソスNソス^ソスソスソストび出ソスソスソスAWiimoteソス^ソスフイソスソスソスXソス^ソスソスソスXソスソスソスソスソスワゑソスソスBソスソスソスフとゑソスソスAソスソスソスソスソスナゑソスWiiFlashソスニの接托ソスソスソスソスsソスソスソスソスフで、WiiFlashソスソスソスNソスソスソスソスソストゑソスソスネゑソスソスニゑソスソスソスソスナエソスソスソス[ソスソスソスソスソスソスソスソスソスAソスネ降ソスフ擾ソスソスソスソスソスソスソスソスワゑソスソスソスソスソスソスワゑソスソスソスBソスソスソスフ擾ソスソスソスソスヘ奇ソス{ソスIソスソス1ソスxソスソスソスソスソストべばゑソスソスソスソスフで、setupソスソスソス\ソスbソスhソスフ抵ソスソスナ呼び出ソスソスソスフゑソスソス謔「ソスナゑソスソス蛯、ソスB

  Wiimote wiimote; // ソスマ撰ソスソスフ宣言
  wiimote = new Wiimote(this); // setupソスソスソス\ソスbソスhソスソスソスネどゑソス

ソスfソス[ソス^ソスフ取得

Wiimoteソスソスupdateソスソスソス\ソスbソスhソスソスソストび出ソスソスソスAWiiRemoteソスソスソスソスAWiiFlashソスoソスRソスナデソス[ソス^ソスソスソス謫セソスソスソスワゑソスソスBソスソスソスフ擾ソスソスソスソスヘ茨ソスハ的ソスノゑソスdrawソスソスソス\ソスbソスhソスフ抵ソスソスナ茨ソスxソスソスソスソスソスsソスソスソスワゑソスソスB

  // drawソスソスソス\ソスbソスhソスソスソスネどゑソス
  wiimote.update();

ソスソスxupdateソスソスソス\ソスbソスhソスソスソストゑソスナゑソスソス邇滂ソスソスupdateソスソスソス\ソスbソスhソスソスソストび出ソスソスソスソスソスワでは、WiiRemoteソスNソスソスソスXソスソスソス逑セソスソスソスソスWiiRemoteソスフ擾ソスヤは変ゑソスソスネゑソスソスワまでゑソスソスB

ソスfソス[ソス^ソスフ暦ソスソスp

WiimoteソスソスxソスソスyソスネどのフソスBソス[ソスソスソスhソスソスソスQソスニゑソスソス驍アソスニで、ソスソスソスンゑソスWiiRemoteソスフ擾ソスヤゑソスmソス驍アソスニゑソスソスナゑソスソスワゑソスソスBソスソスノ用ソスソスソスソスソスソスフは、ソスeソスソスソスソスソスフ会ソスソスソスソスxソスニ、ソス{ソス^ソスソスソスフ擾ソスヤでゑソスソス蛯、ソスB

  // (100, 100)ソスフ点ソスソスソスソスWiiRemoteソスフ鯉ソスソスソスソスノ会ソスソスソスソスト撰ソスソスソスソスソスソスソス
  line(100, 100, 100 + wiimote.x * 50, 100 + wiimote.y * 50);

WiimoteソスNソスソスソスXソスソスソスgソスソスソスト難ソスソスソスソスソスfソス[ソス^ソスヘ表ソスフ通ゑソスナゑソスソスB

WiimoteソスNソスソスソスX
ソスtソスBソス[ソスソスソスhソスソス ソス^ ソスモ厄ソス
xソスCyソスCz float ソスeソスソスソスソスソスソスソスxソスB-1ソス`+1ソスフ値ソスソスソスニゑソスA1Gソスフ趣ソスソスノ値ソスソス1ソスニなゑソスB
oneソスCtwoソスCaソスCbソスCplusソスCminusソスChomeソスCupソスCdownソスCrightソスCleft Button ソスソスソス黷シソスソスフボソス^ソスソスソスフ擾ソスソス
batteryLevel float ソスoソスbソスeソスソスソス[ソスフ残ソスソス
extensionType int ソスgソスソスソスRソスソスソスgソスソスソス[ソスソスソスフタソスCソスv

ソス{ソス^ソスソスソスヨ連ソスフフソスBソス[ソスソスソスhソスヘ、ButtonソスNソスソスソスXソスソスソスgソスソスソスト表ソスソスソスソストゑソスソスワゑソスソスBButtonソスNソスソスソスXソスノは、pressedソスソスpushedソスソス2ソスツゑソスbooleanソスマ撰ソスソスソスソスソスソスソスワゑソスソスB

ソスソスソスソスソス2ソスツの変撰ソスソス^ソスCソスvソスソスソスソスソスワゑソスソスgソスソスソスソスソスソスソストゑソスソスソスソスソスソスソスソスB

ソス繪コソス{ソス^ソスソスソスソスソスソスソスソスソスソストゑソスソスソスヤパソスソスソスソスソス[ソス^ソスソスソス繪コソスソスソスソスソスソス
// ソス繪コソス{ソス^ソスソスソスソスソスソスソスソスソスソストゑソスソスソスヤパソスソスソスソスソス[ソス^ソスソスソス繪コソスソスソスソスソスソス
if (wiimote.up.pressed) {
   someparam++;
} else if (wiimote.down.pressed) {
   someparam--;
}
if (wiimote.a.pushed) {
   background(10); // Aソス{ソス^ソスソスソスソスソスソスソスソスソス黷スソスソスソスハゑソスソスソスソスソス
}

ソスTソスソスソスvソスソスソスXソスPソスbソス`ソスソスWiiRemoteソスホ会ソスソスノゑソスソスソス

WiiRemoteソスソスソスソスソスpソスソスソスソスソスXソスPソスbソス`ソスソスソスツゑソスソスソスノゑソスソスソスソスソスソスト、1ソスソスソスソスProcessingソスフスソスPソスbソス`ソスソスgソスソスナゑソスソスソスソスWiiRemoteソスホ会ソスソスノゑソスソスソスニ、Wiimoteソスソスソスgソスソスソスニゑソスソスソスソス_ソスソスソスソスtソスHソス[ソスJソスXソスソスソスソスソスソストゑソスソスワゑソスソスワゑソスソスBソスKソスソスソスAProcessingソスノは托ソスソスソスソスフサソスソスソスvソスソスソスXソスPソスbソス`ソスソスソスYソスtソスソスソスソストゑソスソスワゑソスソスフで、ソスソスソスソスソスフゑソスソスソスソスソスソスソスソスツゑソスソスソスWiiRemoteソスホ会ソスソスノゑソスソス驍アソスニで会ソスソスソスソスソストゑソスソスソスソスワゑソスソスB

ソスソスソスソスソスナは、FireCubeソスADirectionalソスALightsGLソスASineWaveSignalソスソス4ソスツのスソスPソスbソス`ソスソスWiiRemoteソスノ対会ソスソスソスソスソスソスソスソスソスノつゑソスソスト紹介しソスワゑソスソスBWiiRemoteソスノ対会ソスソスソスソスソスソスソスソスXソスPソスbソス`ソスヘ、ソスソスソスフサソスソスソスvソスソスソスXソスPソスbソス`ソスニ具ソスハゑソスソス驍スソス゚に、ソスソスソスOソスフ最鯉ソスソスWiiソスソスtソスソスソストゑソスソスワゑソスソスB

FireCubeWii

FireCubeソスヘ、ソスソスソスソスソスRソスソスソス繧ェソスソス謔、ソスネ包ソスソスGソスネエソスtソスFソスNソスgソスソス100ソスsソスソスソスxソスナ擾ソスソスソスソス黷スソスソスソスフでゑソスソスBソスソスソスフサソスソスソスvソスソスソスソスソスAWiiRemoteソスソスUソスソスホ振ソスソスルど会ソスソスソスソスoソストゑソスソスソス謔、ソスノゑソスソストみまゑソスソスソスソスBソスTソスソスソスvソスソスソスソスFireCubeWiiソスナゑソスソスB

drawソスフ抵ソスソスナは、ソスソスソスソスソスxソスソスソスソスpowerソスニゑソスソスソスソスlソスソスソスvソスZソスソスソストゑソスソスワゑソスソスBソスソスソスフ値ソスノ会ソスソスソスソスト会ソスソスフ出ソスソスハゑソスソスマゑソスソスワゑソスソスB

  float power = sqrt(wiimote.x * wiimote.x +
   wiimote.y * wiimote.y +
   wiimote.z * wiimote.z);
  power = constrain(power - 1, 0.1, 1);
  

ソスナ擾ソスソスノ計ソスZソスソスソストゑソスソスソスフゑソスWiiRemoteソスノゑソスソスソスソスソスソストゑソスソスソスソスソスソスソスxソスナゑソスソスBWiiRemoteソスソスソスソスソスソスソスネゑソスソスソスヤでは、ソスソスソスフ値ソスソスソスソスソス1ソスノなゑソスワゑソスソスBソスソスソスフ擾ソスヤでは会ソスソスソスソスoソスソスソスソスソスソスソスネゑソスソスフで、ソスソスソスフ行ソスソス1ソスソスソスソスソスソスソスニとゑソスソスノ、constrainソスニゑソスソスソスソスヨ撰ソスソスソスソスgソスソスソスト値ソスソス0.1ソスソスソスソス1ソスフ間に趣ソスソス゚てゑソスソスワゑソスソスB

ソスソスソスソスソスナ計ソスZソスソスソスソスpowerソスヘ、ソスソスソスソスソスフと、ソスソスソスソスソスソス繧ェソスソスソストゑソスソス驩奇ソスフ擾ソスソスソスソスlソスノ設定しソスワゑソスソスBソスレゑソスソスソスソスヘスソスPソスbソス`ソスソスソスソスpowerソスニゑソスソスソスソスマ撰ソスソスソスソスソスソスソスソスソスソストみてゑソスソスソスソスソスソスソスソスB

DirectionalWii

Directionalソスヘ、ソス}ソスEソスXソスJソス[ソス\ソスソスソスフ位置ソスノ会ソスソスソスソストピソスソスソス|ソスソスソスソスソスフようソスネゑソスソスフゑソスソスソスソスCソスgソスAソスbソスvソスソスソスソスソスソスソスフでゑソスソスBソスソスソスソスソスWiiFlashソスソスソス逑セソスソスソスソスXソスソスソスソスソスAYソスソスソスソスソスフ会ソスソスソスソスxソスソスソスgソスソスソスソスソスニで、ソスソスソスソスソスソスソスソスWiiRemoteソスソスソスソスソスソスソスdソスソスソスノなゑソスソスソスソスソスソスフようソスネ奇ソスソスoソスソスソスソスソスえソスワゑソスソスB

ソスソスソスフスソスPソスbソス`ソスナは、ソスソスソスソスソスdソスソスソスフようソスネ奇ソスソスoソスソスソスoソスソスソスソスソス゚に、WiiRemoteソスソスAソス{ソス^ソスソスソスソスソスソスソスソスソスソストゑソスソスソスニゑソスソスソスソスソスソスソスソスソスソス\ソスソスソスソスソスソスソス謔、ソスノゑソスソストゑソスソスワゑソスソスBソスソスソスLソスフようソスノ、Aソス{ソス^ソスソスソスソスソスソスソスソスソスソストゑソスソスソスソスdrawソスソスソス\ソスbソスhソスソスソスソスrソスソスソスナ費ソスソスソスソスoソスソスソスワゑソスソスB

  if (!wiimote.a.pressed) {
   return;
  }

ソスソスソス当てゑソスソスソスソスソスノつゑソスソストは、ソスソスソスソスソスxソスフ値ソスソスソスソスソスフまま使ソスソスソストゑソスソスワゑソスソスB

  directionalLight(204, 204, 204, wiimote.x, wiimote.y, -1);

WaveSignalWii

ソスナ鯉ソスソス1ソスツ変ゑソスソスソスソスソスlソス^ソスソスソスソスソス繧ーソスワゑソスソスBWaveSignalWiiソスヘ搾ソスソスワでのスソスPソスbソス`ソスニは異なゑソスAソスソスソスソスソスgソスソスソスソスソスXソスPソスbソス`ソスナゑソスソスBソスソスソスニなゑソスソストゑソスソスソスXソスPソスbソス`ソスソス[Libaries] - [Minim (Sound)] - [SineWaveSignal]ソスナゑソスソスBソスソスソスフスソスPソスbソス`ソスソスソスNソスソスソスソスソスソスニ、ソスvソス[ソスニゑソスソスソスソス謔、ソスネ会ソスソスソスソスツゑソスoソスソスソスワゑソスソスBソスソスソスソスヘ会ソスハにゑソスソス\ソスソスソスソスソスソストゑソスソスソスハゑソスAソスソスソスソスソス髏ウソスソスソスgソスナゑソスソスBソス}ソスEソスXソスJソス[ソス\ソスソスソスソスソス繪コソスソスソスEソスノ難ソスソスソスソスソスソスソスソスニで、ソスソスソスフ搾ソスソスソスソスiソスsソスbソス`ソスjソスソスソス繪コソスソスソスソスソスソスAソスXソスeソスソスソスIソスフ搾ソスソスEソスフバソスソスソスソスソスXソスiソスpソスソスソスjソスソスソスレ難ソスソスソスソスソスソス閧キソスソスフゑソスソスソスソスソスソスソスナゑソスソス蛯、ソスソスソスB

Processingソスナゑソスソスフようソスノ会ソスソスソスソスツらせソスソスフは、MinimソスニゑソスソスソスソスソスソスCソスuソスソスソスソスソスフゑソスソスソスソスソスソスナゑソスソスBソスソスソスソスソスgソスソス\ソスソスソスマ撰ソスソスソスソスソスソスAソスsソスbソス`ソスソスpソスソスソスソスソスwソス閧キソス驍セソスソスソスナ、ソスソスソスフようソスノ会ソスソスソスツらすソスソスソスニゑソスソスナゑソスソスワゑソスソスB

SineWaveSignalソスヘゑソスソスフ厄ソスソスフ通り正ソスソスソスgソスノゑソスソスソスソスホ会ソスソスソスソストゑソスソスネゑソスソスフでゑソスソスソスソスAソスソスソスソスソスWiiRemoteソスホ会ソスソスソスソスソスソスソスWaveSignalWiiソスヘ、ソスフゑソスソスソスソスソスgソスソスソス`ソスgソスノゑソスソスホ会ソスソスソスソスソスソスワゑソスソスソスソスBソスソスソスEソス{ソス^ソスソスソスソスソスソスソスソスソスソスソスニでゑソスソスソスソスソスリゑソスヨゑソスソス驍アソスニゑソスソスナゑソスソスワゑソスソスBソスワゑソスソスAソス繪コソス{ソス^ソスソスソスナ会ソスソスハゑソスマゑソスソス驍アソスニゑソスソスナゑソスソスワゑソスソスB

ソスワゑソスソスAソスソスソスソスソスソスマゑソスソス驍アソスニでピソスbソス`ソスソスpソスソスソスソスソスマ会ソスソスソスソスワゑソスソスBソスソスノ鯉ソスソスソスソスソスニ会ソスソスソスソスソスソスソスソスAソスソスソスノ鯉ソスソスソスソスソスニ会ソスソスソスソス痰ュソスネゑソスワゑソスソスBソスソスソスEソスソスソスソスソスノ鯉ソスソスソスソスソスニ、ソスソスソスソスソスソスフ包ソスソスソスソス迚ケソスソスソスソスソスソスソスソスソストゑソスソスソス謔、ソスノなゑソスワゑソスソスB

WiiFlashソスソスProcessingソスソスソスソスソスソスgソスソスソス髣晢ソスR

ソスソスソスト、ソスソスソスソスソスワで難ソスソスノゑソスソスフ話ソスフ詳細には難ソスソスン搾ソスソスソスナゑソスソスワゑソスソスソスナゑソスソスソスソスソスソスAソスネゑソスProcessingソスソスソスソスWiiFlashソスソスソスgソスソスソスソスソスニゑソスソスナゑソスソスソスフでゑソスソス蛯、ソスソスソスBソスソスソスソスソスソスWiiFlashソスノ添ソスtソスソスソスソストゑソスソスソス\ソス[ソスXソスRソス[ソスhソスフ抵ソスソスノゑソスソスソスワゑソスソスB

ソスソスソスCソスソスソスニなゑソス\ソス[ソスXソスRソス[ソスhソスヘ、Core/api/source-classes/org/wiiflashソスfソスBソスソスソスNソスgソスソスソスフ抵ソスソスノゑソスワゑソスソスBソスソスソスソスソスノゑソスソスソスフゑソスWiiFlashソスソスソスフゑソスソスフのソソス[ソスXソスRソス[ソスhソスナはなゑソスソスAFlashソスソスソスソスWiiFlashソスノつなゑソスソスソスソス゚ゑソスActionScript3ソスフソソス[ソスXソスRソス[ソスhソスナゑソスソスソスソスAソスソスソス黷セソスソスソスソスWiiFlashソスフ具ソスソスソスソス推托ソスソスソスソス驍アソスニゑソスソスナゑソスソスワゑソスソスBWiimote.asソスソスWiiSocket.asソスソスソスソスソスソスホ、ソスソス{ソスIソスネ具ソスソスソスソスソスソスツゑソスソズゑソスソスニゑソスソスナゑソスソスワゑソスソスB

WiiSocket.asソスナは、connectソスソスソス\ソスbソスhソスソスlocalhostソスソス19028ソスヤに接托ソスソスソスソストゑソスソスワゑソスソスBソスソスソスフゑソスソスニゑソスソスソスAWiiFlashソスソス19028ソスヤのポソス[ソスgソスソスソスgソスソスソストサソス[ソスoソス立ててゑソスソス驍アソスニゑソスソスソスソスソスソスソスワゑソスソスBソスソスソスソスソストソソスPソスbソスgソスソスソスソスfソス[ソス^ソスソスソスソスMソスソスソスソスソスニゑソスソスフ擾ソスソスソスソスソスonSocketDataソスソスソス\ソスbソスhソスノ擾ソスソスソスソスソストゑソスソスワゑソスソスBソスソスソスソスソスソスソスソスソスソスニ、ソスfソス[ソス^ソスソス80ソスoソスCソスgソスPソスハで趣ソスMソスソスソスソストゑソスソス驍アソスニゑソスソスソスソスソスソスソスワゑソスソスBソスナ擾ソスソスソス1ソスoソスCソスgソスヘコソスソスソスgソスソスソス[ソスソスソスソスIDソスニなゑソスソストゑソスソスソスAソスソスソスソスネ降ソスフデソス[ソス^ソスソスWiimoteソスNソスソスソスXソスソスupdateソスソスソス\ソスbソスhソスナ読み搾ソスソスワゑソストゑソスソスワゑソスソスBWiiFlashソスソスソス迹暦ソスソスソストゑソスソスソスソス{ソスIソスネデソス[ソス^ソスソスソスワとめゑソスニ、ソス\ソスフようソスノなゑソスワゑソスソスB

ソスソス{ソスfソス[ソス^ソスソスソスCソスAソスEソスg

ソスソスソスO ソスハ置 ソス^ ソスモ厄ソス
index 0 byte ソスRソスソスソスgソスソスソス[ソスソスソスソスID
batteryLevel 1 byte ソスoソスbソスeソスソスソス[ソスcソスソス
buttonState 2 ushort ソス{ソス^ソスソスソスフ擾ソスソス
x 4 float Xソスソスソスソスソスフ会ソスソスソスソスx
y 8 float Yソスソスソスソスソスフ会ソスソスソスソスx
z 12 float Zソスソスソスソスソスフ会ソスソスソスソスx
extensionType 16 byte ソスgソスソスソス^ソスCソスv

ソスgソスソスソス^ソスCソスvソスノは、ソスkソスソスソス`ソスソスソスNソスAソスNソスソスソスVソスbソスNソスRソスソスソスgソスソスソス[ソスソスソスAソスoソスソスソスソスソスXソス{ソス[ソスhソスソスソスソスソスソスワゑソスソスBソスソスソスフタソスCソスvソスノゑソスソスソスト、17ソスoソスCソスgソスレ以降ソスフデソス[ソス^ソスフ会ソスソス゚包ソスソス@ソスソスソスマゑソスソスワゑソスソスBソスソスソスソスソスノつゑソスソストゑソスNunchuk.asソスAClassicController.asソスABalanceBoard.asソスソスソスソスソスソスニデソス[ソス^ソスフ難ソスソスeソスソスソスソスソスソスソスソスワゑソスソスソスソスAソス{ソスソスソスナはゑソスソスソスソスノつゑソスソストの撰ソスソスソスソスヘ奇ソスソスソスソスソスソスワゑソスソスB

ProcessingソスソスソスソスWiiFlashソスノつなゑソスソスソスソス゚には、netソスソスソスCソスuソスソスソスソスソスソスClientソスNソスソスソスXソスソスソスgソスソスソスワゑソスソスBClientソスNソスソスソスXソスソスソスgソスソスソスソスソスニで、ソス\ソスPソスbソスgソスソスソスgソスソスソスソスWiiFlashソスニ通信ソスソスソス驍アソスニゑソスソスナゑソスソスワゑソスソスBソスツなゑソスソスソスソスソスヘ、readソスソスソス\ソスbソスhソスネどゑソスソスgソスソスソスソスソスニゑソスWiiFlashソスソスソスソスoソスCソスgソスソスソスヌみ搾ソスソズゑソスソスニゑソスソスナゑソスソスワゑソスソスB

WiimoteソスNソスソスソスXソスフ詳細な趣ソスソスソスソスノつゑソスソストは本ソスヘでは述ソスラまゑソスソスが、ソス\ソス[ソスXソスRソス[ソスhソスヘ鯉ソスソスソスソスソスソスヤとなゑソスソストゑソスソスソスフで、ソスCソスノなゑソスソスソスヘゑソスソスソスソスソスソスソスQソスニゑソスソストゑソスソスソスソスソスソスソスソスB