Skip to content

Commit 8ba6521

Browse files
authored
Merge pull request #728 from nyu-ossd-s20/translate
translated all examples in Lights to Chinese
2 parents e77fe72 + 9185431 commit 8ba6521

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/data/examples/zh-Hans/12_Lights/02_Directional.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
/*
2-
* @name Directional
2+
* @name 定向光
33
* @frame 710,400
4-
* @description Move the mouse to change the direction of the light.
5-
* Directional light comes from one direction and is stronger when hitting a
6-
* surface squarely and weaker if it hits at a a gentle angle. After hitting a
7-
* surface, a directional light scatters in all directions.
4+
* @description 移动鼠标改变光线方向。
5+
* 定向光从一个方向打来,垂直打在一个表面上时会更强,而以平缓的角度打则会更弱。
6+
* 击打在表面上后,定向光会在所有方向上散射。
87
*/
98
const radius = 200;
109

src/data/examples/zh-Hans/12_Lights/05_Mixture.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* @name Mixture
2+
* @name 混合光
33
* @frame 710,400 (optional)
4-
* @description Display a box with three different kinds of lights.
4+
* @description 展示一个有三种不同光的盒子。
55
*/
66
function setup() {
77
createCanvas(710, 400, WEBGL);
@@ -11,13 +11,13 @@ function setup() {
1111
function draw() {
1212
background(0);
1313

14-
// Orange point light on the right
14+
// 右侧:橘色点光源
1515
pointLight(150, 100, 0, 500, 0, 200);
1616

17-
// Blue directional light from the left
17+
// 左侧:蓝色定向光
1818
directionalLight(0, 102, 255, -1, 0, 0);
1919

20-
// Yellow spotlight from the front
20+
// 上方:黄色聚光
2121
pointLight(255, 255, 109, 0, 0, 300);
2222

2323
rotateY(map(mouseX, 0, width, 0, PI));

0 commit comments

Comments
 (0)