Skip to content

Commit 42d4b59

Browse files
committed
fix attributes article
1 parent 934f295 commit 42d4b59

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

webgl/lessons/ko/webgl-attributes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ attributeValues: [
136136
[0, 0, 0, 1],
137137
[0, 0, 0, 1],
138138
...
139-
];
140-
attributes: [
139+
],
140+
vertexArray: {
141+
attributes: [
141142
{ enable: ?, type: ?, size: ?, normalize: ?, stride: ?, offset: ?, buffer: ?,
142143
 divisor: 0, },
143144
{ enable: ?, type: ?, size: ?, normalize: ?, stride: ?, offset: ?, buffer: ?,
144145
 divisor: 0, },
145146
...
147+
146148
```
147149
148150
다양한 `gl.vertexAttribXXX` 함수로 각 속성의 값을 설정할 수 있습니다.

webgl/lessons/webgl-attributes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,15 @@ attributeValues: [
142142
[0, 0, 0, 1],
143143
[0, 0, 0, 1],
144144
...
145-
];
146-
attributes: [
145+
],
146+
vertexArray: {
147+
attributes: [
147148
{ enable: ?, type: ?, size: ?, normalize: ?, stride: ?, offset: ?, buffer: ?,
148149
 divisor: 0, },
149150
{ enable: ?, type: ?, size: ?, normalize: ?, stride: ?, offset: ?, buffer: ?,
150151
 divisor: 0, },
151152
...
153+
152154
```
153155
You can set each attribute's value with the various `gl.vertexAttribXXX`
154156
functions. The value is used when `enable` is false. When `enable` is true, data for

webgl/lessons/zh_cn/webgl-attributes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,15 @@ attributeValues: [
133133
[0, 0, 0, 1],
134134
[0, 0, 0, 1],
135135
...
136-
];
137-
attributes: [
136+
],
137+
vertexArray: {
138+
attributes: [
138139
{ enable: ?, type: ?, size: ?, normalize: ?, stride: ?, offset: ?, buffer: ?,
139140
 divisor: 0, },
140141
{ enable: ?, type: ?, size: ?, normalize: ?, stride: ?, offset: ?, buffer: ?,
141142
 divisor: 0, },
142143
...
144+
143145
```
144146
145147
可以通过各个 `gl.vertexAttribXXX` 函数来设置每个属性的值。当 `enable` 为 false 时,该值被使用。

0 commit comments

Comments
 (0)