Skip to content

Commit 7c06fd0

Browse files
authored
Merge pull request #70 from bocoup/gitlocalize-28836
[p5.js KO] reference mdx from GitLocalize
2 parents 4f594b7 + 045d39e commit 7c06fd0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+6989
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: 기본 조형
3+
one-line-description: 2D 도형을 그립니다.
4+
---
5+
6+
이 프로그램은 기본적인 도형 함수의 사용을 설명합니다.
7+
<a href="https://p5js.org/reference/#/p5/square" target="_blank">square()</a>,
8+
<a href="https://p5js.org/reference/#/p5/rect" target="_blank">rect()</a>,
9+
<a href="https://p5js.org/reference/#/p5/ellipse" target="_blank">ellipse()</a>,
10+
<a href="https://p5js.org/reference/#/p5/circle" target="_blank">circle()</a>,
11+
<a href="https://p5js.org/reference/#/p5/arc" target="_blank">arc()</a>,
12+
<a href="https://p5js.org/reference/#/p5/line" target="_blank">line()</a>,
13+
<a href="https://p5js.org/reference/#/p5/triangle" target="_blank">triangle()</a>,
14+
and <a href="https://p5js.org/reference/#/p5/quad" target="_blank">quad()</a>.

src/content/reference/ko/p5/ROUND.mdx

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: round
3+
module: 수학
4+
submodule: 계산
5+
file: src/math/calculation.js
6+
description: |-
7+
<p>어떤 수에 가장 가까운 정수를 계산합니다.</p>
8+
9+
<p>예를 들어, <code>round(133.8)</code>는 134라는 값을 반환합니다.</p>
10+
11+
<p>두번째 매개변수인 <code>decimals</code>은 선택 사항입니다. 반올림할 때 사용할 소수점의 자리 수를 설정합니다. 예를 들어, <code>round(12.34, 1)</code>은 12.3을 반환합니다. <code>decimals</code>의 기본값은 입니다.</p>
12+
line: '861'
13+
isConstructor: 'false'
14+
itemtype: 메서드
15+
example:
16+
- |-
17+
18+
<div>
19+
<code>
20+
function setup() {
21+
createCanvas(100, 100);
22+
23+
background(200);
24+
25+
// Round a number.
26+
let x = round(4.2);
27+
28+
// Style the text.
29+
textAlign(CENTER);
30+
textSize(16);
31+
32+
// Display the rounded number.
33+
text(x, 50, 50);
34+
35+
describe('The number 4 written in middle of the canvas.');
36+
}
37+
</code>
38+
</div>
39+
40+
<div>
41+
<code>
42+
function setup() {
43+
createCanvas(100, 100);
44+
45+
background(200);
46+
47+
// Round a number to 2 decimal places.
48+
let x = round(12.782383, 2);
49+
50+
// Style the text.
51+
textAlign(CENTER);
52+
textSize(16);
53+
54+
// Display the rounded number.
55+
text(x, 50, 50);
56+
57+
describe('The number 12.78 written in middle of canvas.');
58+
}
59+
</code>
60+
</div>
61+
class: p5
62+
params:
63+
- name: 'n'
64+
type: Number
65+
description: |
66+
<p>반올림할 수</p>
67+
- name: decimals
68+
type: Number
69+
optional: true
70+
description: |
71+
<p>반올림할 소수점 사리 수 (기본값 0)</p>
72+
return:
73+
description: 반올림된 수
74+
type: Integer
75+
chainable: false
76+
---
77+
78+
# round

src/content/reference/ko/p5/abs.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: abs
3+
module: 수학
4+
submodule: 계산
5+
file: src/math/calculation.js
6+
description: |-
7+
<p>수의 절댓값을 계산합니다.</p>
8+
9+
<p>어떤 수의 절댓값이란 수직선 위에서 0으로부터의 거리를 의미합니다. -5와 5는 둘 다 0으로부터 5만큼 떨어져 있으므로, <code>abs(-5)</code>와 <code>abs(5)</code>는 모두 5를 반환합니다. 어떤 수의 절댓값은 항상 양수입니다.</p>
10+
line: '10'
11+
isConstructor: 'false'
12+
itemtype: 메서드
13+
example:
14+
- |-
15+
16+
<div>
17+
<code>
18+
function setup() {
19+
createCanvas(100, 100);
20+
21+
describe('A gray square with a vertical black line that divides it in half. A white rectangle gets taller when the user moves the mouse away from the line.');
22+
}
23+
24+
function draw() {
25+
background(200);
26+
27+
// Divide the canvas.
28+
line(50, 0, 50, 100);
29+
30+
// Calculate the mouse's distance from the middle.
31+
let h = abs(mouseX - 50);
32+
33+
// Draw a rectangle based on the mouse's distance
34+
// from the middle.
35+
rect(0, 100 - h, 100, h);
36+
}
37+
</code>
38+
</div>
39+
class: p5
40+
params:
41+
- name: 'n'
42+
description: |
43+
<p>계산할 수</p>
44+
type: Number
45+
return:
46+
description: 주어진 수의 절댓값
47+
type: Number
48+
chainable: false
49+
---
50+
51+
# abs

src/content/reference/ko/p5/alpha.mdx

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: 알파
3+
module: 색상
4+
submodule: 만들기 & 읽기
5+
file: src/color/creating_reading.js
6+
description: |2-
7+
8+
<p>색상의 알파(투명도) 값을 가져옵니다.</p>
9+
10+
11+
<p><code>alpha()</code> a에서 알파 값을 추출합니다
12+
13+
14+
<a href="/reference/p5/p5.Color">p5.Color</a> 객체, 색의 배열
15+
구성요소, 또는
16+
17+
18+
CSS 컬러 스트링.</p>
19+
line: '16'
20+
isConstructor: 거짓(false)
21+
itemtype: 메서드(method)
22+
example:
23+
- |-
24+
25+
<div>
26+
<code>
27+
function setup() {
28+
createCanvas(100, 100);
29+
30+
background(200);
31+
32+
// Create a p5.Color object.
33+
let c = color(0, 126, 255, 102);
34+
35+
// Draw the left rectangle.
36+
noStroke();
37+
fill(c);
38+
rect(15, 15, 35, 70);
39+
40+
// Set 'alphaValue' to 102.
41+
let alphaValue = alpha(c);
42+
43+
// Draw the right rectangle.
44+
fill(alphaValue);
45+
rect(50, 15, 35, 70);
46+
47+
describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
48+
}
49+
</code>
50+
</div>
51+
- |-
52+
53+
<div>
54+
<code>
55+
function setup() {
56+
createCanvas(100, 100);
57+
58+
background(200);
59+
60+
// Create a color array.
61+
let c = [0, 126, 255, 102];
62+
63+
// Draw the left rectangle.
64+
noStroke();
65+
fill(c);
66+
rect(15, 15, 35, 70);
67+
68+
// Set 'alphaValue' to 102.
69+
let alphaValue = alpha(c);
70+
71+
// Draw the left rectangle.
72+
fill(alphaValue);
73+
rect(50, 15, 35, 70);
74+
75+
describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
76+
}
77+
</code>
78+
</div>
79+
- |-
80+
81+
<div>
82+
<code>
83+
function setup() {
84+
createCanvas(100, 100);
85+
86+
background(200);
87+
88+
// Create a CSS color string.
89+
let c = 'rgba(0, 126, 255, 0.4)';
90+
91+
// Draw the left rectangle.
92+
noStroke();
93+
fill(c);
94+
rect(15, 15, 35, 70);
95+
96+
// Set 'alphaValue' to 102.
97+
let alphaValue = alpha(c);
98+
99+
// Draw the right rectangle.
100+
fill(alphaValue);
101+
rect(50, 15, 35, 70);
102+
103+
describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
104+
}
105+
</code>
106+
</div>
107+
class: p5
108+
params:
109+
- name: 색상
110+
description: |2-
111+
112+
<p><a href="#/p5.Color">p5.Color</a> 개체, 배열
113+
114+
색상 구성 요소 또는 CSS 색상 문자열.</p>
115+
type: p5.Color|Number[]|String
116+
return:
117+
description: 알파값(the alpha value)
118+
type: 숫자(Number)
119+
chainable: 거짓(false)
120+
---
121+
122+
# 알파(alpha)

0 commit comments

Comments
 (0)