當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Processing shininess()用法及代碼示例

Processing, shininess()用法介紹。

用法

  • shininess(shine)

參數

  • shine (float) 光澤度

返回

  • void

說明

設置形狀表麵的光澤度。與 ambient()specular()emissive() 結合使用以設置形狀的材料屬性。

例子

size(400, 400, P3D); 
background(0);
noStroke();
background(0); 
fill(0, 51, 102); 
ambientLight(102, 102, 102);
lightSpecular(204, 204, 204);
directionalLight(102, 102, 102, 0, 0, -1);
specular(255, 255, 255);
translate(120, 200, 0);
shininess(1.0);
sphere(80);  // Left sphere
translate(160, 0, 0); 
shininess(5.0); 
sphere(80);  // Right sphere
Image output for example 1

相關用法


注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 shininess()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。