Skip to content

Commit 0fac62e

Browse files
author
Laura Dowell Ballesta
committed
Added spanish setup readme
Added a Spanish translated version of the setup() function. I also made sure that "Structure" module andf submodule is referred to as "Structure" In other Spanish translations on the website
1 parent 25dd0d3 commit 0fac62e

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

src/content/reference/es/p5/draw.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ example:
8181
</code></div>
8282
class: p5
8383
chainable: false
84-
---
84+
---
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: setup
3+
module: Structure
4+
submodule: Structure
5+
file: src/core/main.js
6+
description: >
7+
<p>La función <a href="/reference/p5/setup">setup()</a> es llamada una vez al comienzo del programa. Se utiliza para
8+
definir propiedades iniciales del entorno, como el tamaño de la pantalla y el color del fondo
9+
y para cargar archivos multimedia como imágenes y fuentes en la iniciación del programa.
10+
Solo puede haber una función <a href="/reference/p5/setup">setup()</a> por
11+
programa y no debería volverse a llamar después de su ejecución inicial.</p>
12+
13+
14+
<p>Nota: Las variables declaradas dentro de <a href="/reference/p5/setup">setup()</a>
15+
no son accesibles dentro de otras
16+
17+
funciones, incluyendo a <a href="/reference/p5/draw">draw()</a>.</p>
18+
19+
line: 82
20+
isConstructor: false
21+
itemtype: method
22+
alt: nothing displayed
23+
example:
24+
- |-
25+
26+
<div><code>
27+
let a = 0;
28+
29+
function setup() {
30+
background(0);
31+
noStroke();
32+
fill(102);
33+
}
34+
35+
function draw() {
36+
rect(a++ % width, 10, 2, 80);
37+
}
38+
</code></div>
39+
class: p5
40+
chainable: false
41+
---

0 commit comments

Comments
 (0)