Processing (BETA) version 135+ のリファレンスです。 旧バージョン使用者はソフトウェア内のリファレンスを参照してください。
この文書は Processing のAPIリファレンスを日本語に訳したものです。 最新の内容は 英語版 で確認して下さい。


Name

spotLight()

Examples
example pic
size(100, 100, P3D);
background(0);
noStroke();
spotLight(51, 102, 126, 80, 20, 40, -1, 0, 0, PI/2, 2);
translate(20, 50, 0);
sphere(30);
example pic
10000
background(0); 
noStroke(); 
background(0); 
spotLight(51, 102, 126, 50, 50, 400, 
          0, 0, -1, PI/16, concentration); 
translate(80, 50, 0); 
sphere(30);
Description スポットライト(spot light)を追加します。 ライトは効果を持続させるためにループプログラムである draw() に含める必要があります。 ループプログラムの setup() に含めた場合、最初に一度だけ効果が得られます。 v1, v2, v3 パラメタの影響は現在のカラーモードによって決定されます。 x, y, z パラメタは明かりの位置を指定します。 nx, ny, nz パラメタはライトの掃射方向を指定します。 angle パラメタはスポットライトコーンの角度に影響を及ぼします。
Syntax
spotLight(v1, v2, v3, x, y, z, nx, ny, nz, angle, concentration)
Parameters
v1 int or float: red or hue value
v2 int or float: green or hue value
v3 int or float: blue or hue value
x int or float: x coordinate of the light
y int or float: y coordinate of the light
z int or float: z coordinate of the light
nx int or float: direction along the x axis
ny int or float: direction along the y axis
nz int or float: direction along the z axis
angle float: angle of the spotlight cone
concentration float: exponent determining the center bias of the cone
Usage Web & Application
Related lights()
directionalLight()
ambientLight()
pointLight()
Updated on September 23, 2006 05:40:19pm PDT

Creative Commons License

この文書の原文はクリエイティブ・コモンズ(Creative Commons)Attribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。 このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。

© 2007 Processing.org