Skip to content

Commit 7f9315b

Browse files
Merge pull request #751 from SamuelAl/spanish-translation
Spanish translation
2 parents 57a7c32 + 044e549 commit 7f9315b

File tree

10 files changed

+124
-123
lines changed

10 files changed

+124
-123
lines changed

src/data/examples/es/10_Interaction/28_ArduinoSensor.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
/*
2-
* @name Arduino sensor data via WebJack
3-
* @description WebJack is a way to read data from an Arduino (and other sources)
4-
* using audio -- it basically turns your Arduino into an audio modem.
5-
*
2+
* @name Datos de un sensor Arduino vía WebJack
3+
* @description WebJack es una forma de leer datos de un Arduino (y otras fuentes)
4+
* usando audio... básicamente convierte tu Arduino en un modem de audio.
5+
*
66
* https://github.com/publiclab/webjack
7-
*
8-
* Note: WebJack and p5-webjack libraries must be added to your index.html as follows:
7+
*
8+
* Importante: Las bibliotecas WebJack y p5-webjack deben ser agregadas a tu index.html de la siguiente manera:
99
* <pre><code class="language-markup">&lt;script src="https://webjack.io/dist/webjack.js">&lt;/script></code></pre>
1010
* <pre><code class="language-markup">&lt;script src="https://jywarren.github.io/p5-webjack/lib.js">&lt;/script></code></pre>
11-
*
12-
* Working example: https://editor.p5js.org/jywarren/sketches/rkztwSt8M
13-
*
14-
* Testing audio: https://www.youtube.com/watch?v=GtJW1Dlt3cg
15-
* Load this sketch onto an Arduino:
11+
*
12+
* Ejemplo práctico: https://editor.p5js.org/jywarren/sketches/rkztwSt8M
13+
*
14+
* Audio de prueba https://www.youtube.com/watch?v=GtJW1Dlt3cg
15+
* Carga este lienzo en un Arduino:
1616
* https://create.arduino.cc/editor/jywarren/023158d8-be51-4c78-99ff-36c63126b554/preview
17-
* Arduino will output audio from pin 3 + ground. Use microphone or an audio cable.
17+
* Arduino emitirá el audio desde el pin 3 + tierra. Usa el micrófono o un cable de audio.
1818
*/
1919

20-
function setup() {
20+
function setup() {
2121
createCanvas(400, 400);
2222
noStroke();
2323
fill('#ff00aa22');
2424
receiveSensorData(handleData);
25-
}
25+
}
2626

2727
function handleData(data) {
2828

29-
console.log(data); // output the values to log
30-
// data[0] is the 1st value, data[1] 2nd, etc.
29+
console.log(data); // emitir los valores a registrar
30+
// data[0] es el primer valor, data[1] el segundo, etc.
3131

32-
// draw stuff! Browse http://p5js.org/reference/
32+
// Dibuja! Navega http://p5js.org/reference/
3333
background('#ddd');
3434
ellipse(100, 200, data[0]+10, data[0]+10);
3535

src/data/examples/es/10_Interaction/29_kaleidoscope.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,48 @@
11
/*
2-
* @name Kaleidoscope
3-
* @description Un kaleidoscope es un instrumento óptico con dos o más superficies reflectantes inclinadas entre sí en ángulo. Este ejemplo intenta replicar el comportamiento de un caleidoscopio. Establezca el número de reflexiones en la variable de simetría y comience a dibujar en la pantalla. Ajuste el tamaño del pincel con la ayuda del control deslizante. La pantalla clara como dice borra la pantalla. El botón Guardar descargará un archivo .jpg del arte que ha creado.
2+
* @name Caleidoscopio
3+
* @description Un caleidoscopio es un instrumento óptico con dos o más superficies reflectantes inclinadas entre sí en ángulo. Este ejemplo intenta replicar el comportamiento de un caleidoscopio. Establezca el número de reflexiones en la variable de simetría y comience a dibujar en la pantalla. Ajuste el tamaño del pincel con la ayuda del control deslizante. La pantalla clara como dice borra la pantalla. El botón Guardar descargará un archivo .jpg del arte que ha creado.
44
*/
5-
// Symmetry corresponding to the number of reflections. Change the number for different number of reflections
6-
let symmetry = 6;
5+
// Simetría correspondiente al número de reflejos.
6+
// Cambia el valor para obtener un número diferente de reflexiones
7+
let symmetry = 6;
78

89
let angle = 360 / symmetry;
910
let saveButton, clearButton, mouseButton, keyboardButton;
1011
let slider;
1112

12-
function setup() {
13+
function setup() {
1314
createCanvas(710, 710);
1415
angleMode(DEGREES);
1516
background(127);
1617

17-
// Creating the save button for the file
18+
// Creando el botón para guardar para el archivo
1819
saveButton = createButton('save');
1920
saveButton.mousePressed(saveFile);
2021

21-
// Creating the clear screen button
22+
// Creando el botón para borrar la pantalla
2223
clearButton = createButton('clear');
2324
clearButton.mousePressed(clearScreen);
2425

25-
// Creating the button for Full Screen
26+
// Creando el botón para la pantalla completa
2627
fullscreenButton = createButton('Full Screen');
2728
fullscreenButton.mousePressed(screenFull);
2829

29-
// Setting up the slider for the thickness of the brush
30+
// Configurando el deslizador para el grosor del pincel
3031
brushSizeSlider = createButton('Brush Size Slider');
3132
sizeSlider = createSlider(1, 32, 4, 0.1);
3233
}
3334

34-
// Save File Function
35+
// Función para guardar el archivo
3536
function saveFile() {
3637
save('design.jpg');
3738
}
3839

39-
// Clear Screen function
40+
// Función para limpiar la pantalla
4041
function clearScreen() {
4142
background(127);
4243
}
4344

44-
// Full Screen Function
45+
// Función para pantalla completa
4546
function screenFull() {
4647
let fs = fullscreen();
4748
fullscreen(!fs);
@@ -55,7 +56,7 @@ function draw() {
5556
let my = mouseY - height / 2;
5657
let pmx = pmouseX - width / 2;
5758
let pmy = pmouseY - height / 2;
58-
59+
5960
if (mouseIsPressed) {
6061
for (let i = 0; i < symmetry; i++) {
6162
rotate(angle);

src/data/examples/es/11_Objects/04_Inheritance.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/* @name Inheritance
2-
* @description A class can be defined using another class as a
3-
* foundation. In object-oriented programming terminology, one class can
4-
* inherit fields and methods from another. An object that inherits from
5-
* another is called a subclass, and the object it inherits from is called
6-
* a superclass. A subclass extends the superclass.
1+
/* @name Herencia
2+
* @description Una clase puede ser definida usando otra clase como base.
3+
* En la terminología de la programación orientada a objetos, una clase
4+
* puede heredar campos y métodos de otra. Un objeto que hereda
5+
* de otro se llama subclase, y el objeto del que hereda se
6+
* llama superclase. Una subclase extiende la superclase.
77
*/
88
let spots, arm;
99

src/data/examples/es/11_Objects/05_Composite_Objects.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/* @name Composite Objects
2-
* @description An object can include several other objects.
3-
* Creating such composite objects is a good way to use the principles
4-
* of modularity and build higher levels of abstraction within a program.
1+
/* @name Objetos Compuestos
2+
* @description Un objeto puede incluir varios otros objetos.
3+
* La creación de tales objetos compuestos es una buena manera de usar los principios
4+
* de modularidad y construir niveles más altos de abstracción dentro de un programa.
55
*/
66
let er1, er2;
77

src/data/examples/es/13_Motion/01_non_orthogonal_reflection.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
* @name Non Orthogonal Reflection
2+
* @name Reflejo no ortogonal
33
* @frame 710,400 (optional)
4-
* @description This is a port by David Blitz of the "Reflection 1" example from processing.org/examples
4+
* @description Este es un puerto de David Blitz del ejemplo "Reflection 1" en processing.org/examples
55
*/
66

7-
//Position of left hand side of floor
7+
//Posición del lado izquierdo del suelo
88
let base1;
99

10-
//Position of right hand side of floor
10+
//Posición del lado derecho del suelo
1111
let base2;
12-
//Length of floor
12+
//La longitud del suelo
1313
//let baseLength;
1414

15-
// Variables related to moving ball
15+
// Variables relacionadas con el movimiento de la bola
1616
let position;
1717
let velocity;
1818
let r = 6;
@@ -26,57 +26,57 @@ function setup() {
2626
base2 = createVector(width, height);
2727
//createGround();
2828

29-
//start ellipse at middle top of screen
29+
//Empezar la elipse en el centro de la parte superior de la pantalla
3030
position = createVector(width / 2, 0);
3131

32-
//calculate initial random velocity
32+
//Calcular la velocidad aleatoria inicial
3333
velocity = p5.Vector.random2D();
3434
velocity.mult(speed);
3535
}
3636

3737
function draw() {
38-
//draw background
38+
//dibujar el fondo
3939
fill(0, 12);
4040
noStroke();
4141
rect(0, 0, width, height);
4242

43-
//draw base
43+
//dibujar la base
4444
fill(200);
4545
quad(base1.x, base1.y, base2.x, base2.y, base2.x, height, 0, height);
4646

47-
//calculate base top normal
47+
//calcular la normal a la base superior
4848
let baseDelta = p5.Vector.sub(base2, base1);
4949
baseDelta.normalize();
5050
let normal = createVector(-baseDelta.y, baseDelta.x);
5151
let intercept = p5.Vector.dot(base1, normal);
5252

53-
//draw ellipse
53+
//dibujar elipse
5454
noStroke();
5555
fill(255);
5656
ellipse(position.x, position.y, r * 2, r * 2);
5757

58-
//move ellipse
58+
//mover elipse
5959
position.add(velocity);
6060

61-
//normalized incidence vector
61+
//vector de incidencia normalizado
6262
incidence = p5.Vector.mult(velocity, -1);
6363
incidence.normalize();
6464

65-
// detect and handle collision with base
65+
// detectar y gestionar la colisión con la base
6666
if (p5.Vector.dot(normal, position) > intercept) {
67-
//calculate dot product of incident vector and base top
67+
//calcular el producto escalar del vector incidente y la parte superior de la base
6868
let dot = incidence.dot(normal);
6969

70-
//calculate reflection vector
71-
//assign reflection vector to direction vector
70+
//calcular el vector del reflejo
71+
//asignar el vector de reflejo al vector de dirección
7272
velocity.set(
7373
2 * normal.x * dot - incidence.x,
7474
2 * normal.y * dot - incidence.y,
7575
0
7676
);
7777
velocity.mult(speed);
7878

79-
// draw base top normal at collision point
79+
// dibujar la base superior normal en el punto de colisión
8080
stroke(255, 128, 0);
8181
line(
8282
position.x,
@@ -87,23 +87,23 @@ function draw() {
8787
}
8888
//}
8989

90-
// detect boundary collision
91-
// right
90+
// detectar la colisión límite
91+
// derecha
9292
if (position.x > width - r) {
9393
position.x = width - r;
9494
velocity.x *= -1;
9595
}
96-
// left
96+
// izquierda
9797
if (position.x < r) {
9898
position.x = r;
9999
velocity.x *= -1;
100100
}
101-
// top
101+
// arriba
102102
if (position.y < r) {
103103
position.y = r;
104104
velocity.y *= -1;
105105

106-
//randomize base top
106+
//aleatorizar la parte superior de la base
107107
base1.y = random(height - 100, height);
108108
base2.y = random(height - 100, height);
109109
}

src/data/examples/es/13_Motion/02_Linear_Motion.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
2-
* @name Linear
2+
* @name Lineal
33
* @frame 720,400
4-
* @description Changing a variable to create a moving line.
5-
* When the line moves off the edge of the window,
6-
* the variable is set to 0, which places the line back at the bottom of the screen.
4+
* @description Cambiar una variable para crear una línea en movimiento.
5+
* Cuando la línea se mueve fuera del borde de la ventana,
6+
* la variable se pone a 0, lo que coloca la línea de nuevo en la parte inferior de la pantalla.
77
*/
88

99
let a;
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
/*
2-
* @name Bounce
2+
* @name Rebote
33
* @frame 720,400
4-
* @description When the shape hits the edge of the window, it reverses its direction.
4+
* @description Cuando la forma golpea el borde de la ventana, invierte su dirección.
55
*/
66

7-
let rad = 60; // Width of the shape
8-
let xpos, ypos; // Starting position of shape
7+
let rad = 60; // El ancho de la forma
8+
let xpos, ypos; // Posición inicial de la forma
99

10-
let xspeed = 2.8; // Speed of the shape
11-
let yspeed = 2.2; // Speed of the shape
10+
let xspeed = 2.8; // La velocidad de la forma
11+
let yspeed = 2.2; // La velocidad de la forma
1212

13-
let xdirection = 1; // Left or Right
14-
let ydirection = 1; // Top to Bottom
13+
let xdirection = 1; // Izquierda o derecha
14+
let ydirection = 1; // De arriba a abajo
1515

1616
function setup() {
1717
createCanvas(720, 400);
1818
noStroke();
1919
frameRate(30);
2020
ellipseMode(RADIUS);
21-
// Set the starting position of the shape
21+
// Establecer la posición de partida de la forma
2222
xpos = width / 2;
2323
ypos = height / 2;
2424
}
2525

2626
function draw() {
2727
background(102);
2828

29-
// Update the position of the shape
29+
// Actualizar la posición de la forma
3030
xpos = xpos + xspeed * xdirection;
3131
ypos = ypos + yspeed * ydirection;
3232

33-
// Test to see if the shape exceeds the boundaries of the screen
34-
// If it does, reverse its direction by multiplying by -1
33+
// Prueba para ver si la forma excede los límites de la pantalla
34+
// Si lo hace, invierta su dirección multiplicando por -1
3535
if (xpos > width - rad || xpos < rad) {
3636
xdirection *= -1;
3737
}
3838
if (ypos > height - rad || ypos < rad) {
3939
ydirection *= -1;
4040
}
4141

42-
// Draw the shape
42+
// Dibuja la forma
4343
ellipse(xpos, ypos, rad, rad);
4444
}

src/data/examples/es/13_Motion/04_Bouncy_Bubbles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* @name Bouncy Bubbles
2+
* @name Burbujas Saltarinas
33
* @frame 720,400
4-
* @description based on code from Keith Peters. Multiple-object collision..
4+
* @description basado en el código de Keith Peters. Colisión de múltiples objetos...
55
*/
66

77
let numBalls = 13;

0 commit comments

Comments
 (0)