File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/content/tutorials/zh-Hans Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,13 @@ function setup() {
6868
6969## 定义自定义函数
7070
71- 我们还可以创建自己的函数来将代码分组。在上一个教程[ 条件语句与交互性] ( /tutorials/conditionals-and-interactivity ) 中,你创建了一个[ 日落动画 ] ( https://editor.p5js.org/gbenedis@gmail.com/sketches/9lz2aqfTO ) ,其中 ` draw() ` 中的代码包含用注释标记的天空、太阳和山脉部分。你可以声明自定义函数,为每一部分的相关代码起一个特定的名字,从而将它们分组。
71+ 我们还可以创建自己的函数来将代码分组。在上一个教程[ 条件语句与交互性] ( /tutorials/conditionals-and-interactivity ) 中,你创建了一个[ 日出动画 ] ( https://editor.p5js.org/gbenedis@gmail.com/sketches/9lz2aqfTO ) ,其中 ` draw() ` 中的代码包含用注释标记的天空、太阳和山脉部分。你可以声明自定义函数,为每一部分的相关代码起一个特定的名字,从而将它们分组。
7272
7373### 步骤 1:用注释规划你的函数
7474
75- - 复制你的日落动画 ,或[ 这个示例] ( https://editor.p5js.org/gbenedis@gmail.com/sketches/9lz2aqfTO ) ,并将其命名为“Organized Sunset Animation”。
75+ - 复制你的日出动画 ,或[ 这个示例] ( https://editor.p5js.org/gbenedis@gmail.com/sketches/9lz2aqfTO ) ,并将其命名为“Organized Sunset Animation”。
7676
77- - 在定义自定义函数之前,让我们先从如何重新组织[ 日落动画 ] ( https://editor.p5js.org/gbenedis@gmail.com/sketches/9lz2aqfTO ) 中的一些代码的大纲开始:
77+ - 在定义自定义函数之前,让我们先从如何重新组织[ 日出动画 ] ( https://editor.p5js.org/gbenedis@gmail.com/sketches/9lz2aqfTO ) 中的一些代码的大纲开始:
7878
7979 ``` js
8080 function setup () {
You can’t perform that action at this time.
0 commit comments