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


Name

ambientLight()

Examples
example pic
size(100, 100, P3D);
background(0);
noStroke();
// The spheres are white by default so
// the ambient light changes their color
ambientLight(51, 102, 126);
translate(20, 50, 0);
sphere(30);
translate(60, 0, 0);
sphere(30);
example pic
size(100, 100, P3D);
background(0);
noStroke();
directionalLight(126, 126, 126, 0, 0, -1);
ambientLight(102, 102, 102);
translate(32, 50, 0);
rotateY(PI/5);
box(40);
translate(60, 0, 0);
sphere(30);
Description 環境光(アンビエントライト, ambient light)を加えます。 環境光は特定の方向を指定できません。 光線は光であり、物体の各方面から均一に掃射され、周囲で反射します。 一般的に環境光は他のライトと組み合わせて使われます。 ライトは効果を持続させるためにループプログラムである draw() に含める必要があります。 ループプログラムの setup() 内に配置することでループの最初に1度だけ影響を与えることができます。 パラメタの効果は現在のカラーモードで測定されます。
Syntax
ambientLight(v1, v2, v3)
ambientLight(v1, v2, v3, x, y, z)
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
Usage Web & Application
Related lights()
directionalLight()
pointLight()
spotLight()
Updated on September 23, 2006 05:40:19pm PDT

Creative Commons License

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

© 2007 Processing.org