You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`buffer` (Type: Float32Array)<br>A buffer to store vertex attribute data; see <ahref="H3DU.BufferAccessor.md#H3DU.BufferAccessor_buffer">H3DU.BufferAccessor#buffer</a>.
13
-
*`offset` (Type: number)<br>Offset to the first value; see <ahref="H3DU.BufferAccessor.md#H3DU.BufferAccessor_offset">H3DU.BufferAccessor#offset</a>. Throws an error if less than 0.
14
13
*`countPerValue` (Type: number)<br>Number of elements per value; see <ahref="H3DU.BufferAccessor.md#H3DU.BufferAccessor_countPerValue">H3DU.BufferAccessor#countPerValue</a>. Throws an error if 0 or less.
14
+
*`offset` (Type: number) (optional)<br>Offset to the first value; see <ahref="H3DU.BufferAccessor.md#H3DU.BufferAccessor_offset">H3DU.BufferAccessor#offset</a>. If null, undefined, or omitted, the default is 0. Throws an error if less than 0.
15
15
*`stride` (Type: number) (optional)<br>Number of elements from the start of one value to the start of the next; see <ahref="H3DU.BufferAccessor.md#H3DU.BufferAccessor_stride">H3DU.BufferAccessor#stride</a>. If null, undefined, or omitted, has the same value as "countPerValue". Throws an error if 0 or less.
Copy file name to clipboardExpand all lines: doc/H3DU.Mesh.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ or at that point, those methods may be deprecated.</li></ul>
46
46
*[BITANGENTS_BIT](#H3DU.Mesh.BITANGENTS_BIT)<br><b>Deprecated: Deprecated because the default shader no longer
47
47
uses tangent and bitangent attributes for normal mapping. To define
48
48
bitangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
49
-
and create a buffer attribute with the H3DU.Semantics.BITANGENT
49
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.BITANGENT">H3DU.Semantic.BITANGENT</a>
50
50
semantic.</b>
51
51
*[COLORS_BIT](#H3DU.Mesh.COLORS_BIT)<br>The mesh contains colors for each vertex.
52
52
*[LINES](#H3DU.Mesh.LINES)<br>Primitive mode for rendering line segments, made up
@@ -64,7 +64,7 @@ of 4 vertices each.
64
64
*[TANGENTS_BIT](#H3DU.Mesh.TANGENTS_BIT)<br><b>Deprecated: Deprecated because the default shader no longer
65
65
uses tangent and bitangent attributes for normal mapping. To define
66
66
tangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
67
-
and create a buffer attribute with the H3DU.Semantics.TANGENT
67
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.TANGENT">H3DU.Semantic.TANGENT</a>
68
68
semantic.</b>
69
69
*[TEXCOORDS_BIT](#H3DU.Mesh.TEXCOORDS_BIT)<br>The mesh contains texture coordinates for each vertex.
70
70
*[TRIANGLES](#H3DU.Mesh.TRIANGLES)<br>Primitive mode for rendering triangles, made up
@@ -77,7 +77,7 @@ of 3 vertices each.
77
77
*[bitangent3](#H3DU.Mesh_bitangent3)<br><b>Deprecated: Deprecated because the default shader no longer
78
78
uses tangent and bitangent attributes for normal mapping. To define
79
79
bitangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
80
-
and create a buffer attribute with the H3DU.Semantics.BITANGENT
80
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.BITANGENT">H3DU.Semantic.BITANGENT</a>
81
81
semantic.</b>
82
82
*[color3](#H3DU.Mesh_color3)<br>Sets the current color for this mesh.
83
83
*[enumPrimitives](#H3DU.Mesh_enumPrimitives)<br><b>Deprecated: For a replacement of this method,
@@ -108,7 +108,7 @@ given index.
108
108
*[tangent3](#H3DU.Mesh_tangent3)<br><b>Deprecated: Deprecated because the default shader no longer
109
109
uses tangent and bitangent attributes for normal mapping. To define
110
110
tangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
111
-
and create a buffer attribute with the H3DU.Semantics.TANGENT
111
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.TANGENT">H3DU.Semantic.TANGENT</a>
112
112
semantic.</b>
113
113
*[texCoord2](#H3DU.Mesh_texCoord2)<br>Sets the current texture coordinates for this mesh.
114
114
*[toMeshBuffer](#H3DU.Mesh_toMeshBuffer)<br>Generates a mesh buffer from the information in this mesh object.
@@ -125,7 +125,7 @@ instead.</b>
125
125
<b>Deprecated: Deprecated because the default shader no longer
126
126
uses tangent and bitangent attributes for normal mapping. To define
127
127
bitangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
128
-
and create a buffer attribute with the H3DU.Semantics.BITANGENT
128
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.BITANGENT">H3DU.Semantic.BITANGENT</a>
129
129
semantic.</b>
130
130
131
131
The mesh contains bitangent vectors for each vertex.
@@ -214,7 +214,7 @@ Default Value: `8`
214
214
<b>Deprecated: Deprecated because the default shader no longer
215
215
uses tangent and bitangent attributes for normal mapping. To define
216
216
tangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
217
-
and create a buffer attribute with the H3DU.Semantics.TANGENT
217
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.TANGENT">H3DU.Semantic.TANGENT</a>
218
218
semantic.</b>
219
219
220
220
The mesh contains tangent vectors for each vertex.
@@ -264,7 +264,7 @@ Default Value: `5`
264
264
<b>Deprecated: Deprecated because the default shader no longer
265
265
uses tangent and bitangent attributes for normal mapping. To define
266
266
bitangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
267
-
and create a buffer attribute with the H3DU.Semantics.BITANGENT
267
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.BITANGENT">H3DU.Semantic.BITANGENT</a>
268
268
semantic.</b>
269
269
270
270
Sets the current bitangent vector for this mesh. Future vertex positions
@@ -388,7 +388,7 @@ will not build upon previous vertices.
388
388
389
389
#### Parameters
390
390
391
-
*`other` (Type: <ahref="H3DU.Mesh.md">H3DU.Mesh</a>)<br>A mesh to merge into this one. The mesh given in this parameter will remain unchanged. Throws an error if this mesh's primitive type is incompatible with the the other mesh's primitive type (for example, a triangle type with LINE_STRIP).
391
+
*`other` (Type: <ahref="H3DU.Mesh.md">H3DU.Mesh</a> | <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a>)<br>A mesh to merge into this one. The mesh given in this parameter will remain unchanged. Throws an error if this mesh's primitive type is incompatible with the the other mesh's primitive type (for example, a triangle type with LINE_STRIP). <i>Passing a MeshBuffer to this method is for compatibility only.</i>
392
392
393
393
#### Return Value
394
394
@@ -584,7 +584,7 @@ This object. (Type: <a href="H3DU.Mesh.md">H3DU.Mesh</a>)
584
584
<b>Deprecated: Deprecated because the default shader no longer
585
585
uses tangent and bitangent attributes for normal mapping. To define
586
586
tangent vectors for a mesh, use the <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> class
587
-
and create a buffer attribute with the H3DU.Semantics.TANGENT
587
+
and create a buffer attribute with the <ahref="H3DU.Semantic.md#H3DU.Semantic.TANGENT">H3DU.Semantic.TANGENT</a>
588
588
semantic.</b>
589
589
590
590
Sets the current tangent vector for this mesh. Future vertex positions
Copy file name to clipboardExpand all lines: doc/H3DU.MeshBuffer.md
+43-7Lines changed: 43 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,14 @@ by swapping the second and third vertex indices of each one.
36
36
*[setAttribute](#H3DU.MeshBuffer_setAttribute)<br>Adds information about a buffer attribute to this
37
37
mesh buffer (or sets an
38
38
existing attribute's information).
39
+
*[setAttributeEx](#H3DU.MeshBuffer_setAttributeEx)<br>Adds information about a buffer attribute to this
40
+
mesh buffer (or sets an
41
+
existing attribute's information), taking a semantic index as
42
+
an additional parameter.
39
43
*[setColor](#H3DU.MeshBuffer_setColor)<br>Sets all the vertices in this mesh to the given color, by
40
44
assigning each value with the attribute semantic <code>COLOR</code>
41
45
to the given color.
46
+
*[setColor3](#H3DU.MeshBuffer_setColor3)<br><b>Deprecated: Use <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setColor">H3DU.MeshBuffer#setColor</a> instead.</b>
42
47
*[setIndices](#H3DU.MeshBuffer_setIndices)<br>Sets the vertex indices used by this mesh buffer.
43
48
*[setPrimitiveType](#H3DU.MeshBuffer_setPrimitiveType)<br>Sets the type of graphics primitives stored in this mesh buffer.
44
49
*[toWireFrame](#H3DU.MeshBuffer_toWireFrame)<br><b>Deprecated: Included here for compatibility with <ahref="H3DU.Mesh.md">H3DU.Mesh</a>.
@@ -154,7 +159,7 @@ and the other mesh's indices copied or adapted.
154
159
155
160
#### Parameters
156
161
157
-
*`other` (Type: <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a>)<br>A mesh to merge into this one. The mesh given in this parameter will remain unchanged. Throws an error if this mesh's primitive type is not the same as the other mesh's primitive type
162
+
*`other` (Type: <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a> | <ahref="H3DU.Mesh.md">H3DU.Mesh</a>)<br>A mesh to merge into this one. The mesh given in this parameter will remain unchanged. Throws an error if this mesh's primitive type is not the same as the other mesh's primitive type. <i>Passing a Mesh to this method is for compatibility only and this feature may be dropped in the future.</i>
158
163
159
164
#### Return Value
160
165
@@ -272,7 +277,7 @@ recommended only if face culling is enabled.
*`name` (Type: number | string)<br>An attribute semantic, such as <ahref="H3DU.Semantic.md#H3DU.Semantic.POSITION">H3DU.Semantic.POSITION</a>, "POSITION", or "TEXCOORD_0". Throws an error if this value is a string and the string is invalid. If this isn't a string, the set index of the attribute will be 0 (see <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setAttributeEx">H3DU.MeshBuffer#setAttributeEx</a>).
291
+
*`buffer` (Type: Float32Array | Array)<br>The buffer where the per-vertex data is stored. See <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setAttributeEx">H3DU.MeshBuffer#setAttributeEx</a>.
292
+
*`countPerValue` (Type: number)<br>The number of elements in each per-vertex item. See <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setAttributeEx">H3DU.MeshBuffer#setAttributeEx</a>.
293
+
*`offset` (Type: number) (optional)<br>The index into the array (starting from 0) where the first per-vertex item starts.See <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setAttributeEx">H3DU.MeshBuffer#setAttributeEx</a>.
294
+
*`stride` (Type: number) (optional)<br>The number of elements from the start of one per-vertex item to the start of the next. See <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setAttributeEx">H3DU.MeshBuffer#setAttributeEx</a>.
295
+
296
+
#### Return Value
297
+
298
+
This object.Throws an error if the given
299
+
semantic is unsupported. (Type: <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a>)
existing attribute's information), taking a semantic index as
307
+
an additional parameter. An attribute
308
+
gives information about the per-vertex data used and
309
+
stored in a vertex buffer.
310
+
311
+
#### Parameters
312
+
285
313
*`name` (Type: number | string)<br>An attribute semantic, such as <ahref="H3DU.Semantic.md#H3DU.Semantic.POSITION">H3DU.Semantic.POSITION</a>, "POSITION", or "TEXCOORD_0". Throws an error if this value is a string and the string is invalid.
286
-
*`index` (Type: number)<br>The set index of the attribute for the given semantic. 0 is the first index of the attribute, 1 is the second, and so on. This is ignored if "name" is a string.
287
-
*`buffer` (Type: Float32Array | Array)<br>The buffer where the per-vertex data is stored.
288
-
*`startIndex` (Type: number)<br>The index into the array (starting from 0) where the first per-vertex item starts.
289
-
*`countPerVertex` (Type: number)<br>The number of elements in each per-vertex item. For example, if each vertex is a 3-element vector, this value is 3. Throws an error if this value is 0 or less.
290
-
*`stride` (Type: number) (optional)<br>The number of elements from the start of one per-vertex item to the start of the next. If null, undefined, or omitted, this value is the same as "countPerVertex". Throws an error if this value is 0 or less.
314
+
*`index` (Type: number)<br>The semantic index of the attribute for the given semantic. 0 is the first index of the attribute, 1 is the second, and so on. This is ignored if "name" is a string.
315
+
*`buffer` (Type: Float32Array | Array | BufferAccessor)<br>The buffer where the per-vertex data is stored.
316
+
*`countPerValue` (Type: number) (optional)<br>The number of elements in each per-vertex item. For example, if each vertex is a 3-element vector, this value is 3. Throws an error if this value is 0 or less. If "buffer" is a <ahref="H3DU.BufferAccessor.md">H3DU.BufferAccessor</a>, the value of "countPerValue" is taken from that accessor and this parameter is ignored; this parameter is currently required otherwise.
317
+
*`offset` (Type: number) (optional)<br>The index into the array (starting from 0) where the first per-vertex item starts. If null, undefined, or omitted, the default is 0. Throws an error if less than 0. If "buffer" is a <ahref="H3DU.BufferAccessor.md">H3DU.BufferAccessor</a>, the value of "offset" is taken from that accessor and this parameter is ignored.
318
+
*`stride` (Type: number) (optional)<br>The number of elements from the start of one per-vertex item to the start of the next. If null, undefined, or omitted, this value is the same as "countPerValue". Throws an error if this value is 0 or less. If "buffer" is a <ahref="H3DU.BufferAccessor.md">H3DU.BufferAccessor</a>, the value of "stride" is taken from that accessor and this parameter is ignored.
291
319
292
320
#### Return Value
293
321
@@ -316,6 +344,14 @@ regardless of semantic index, are affected by this method.
316
344
317
345
This object. (Type: <ahref="H3DU.MeshBuffer.md">H3DU.MeshBuffer</a>)
318
346
347
+
<aname='H3DU.MeshBuffer_setColor3'></a>
348
+
### H3DU.MeshBuffer#setColor3()
349
+
350
+
<b>Deprecated: Use <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setColor">H3DU.MeshBuffer#setColor</a> instead.</b>
351
+
352
+
Alias for the <ahref="H3DU.MeshBuffer.md#H3DU.MeshBuffer_setColor">H3DU.MeshBuffer#setColor</a> method
Copy file name to clipboardExpand all lines: doc/tutorial-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The library differs from many others because this one is in the public domain, s
13
13
14
14
This page includes information on how to use the HTML 3D library, an overview of its features, and an example of a simple 3D-enabled Web page.
15
15
16
-
NOTE: This section and the rest of this page will largely discuss the 2.0.0-beta2 version of the HTML 3D library, which differs considerably from the current release (version 1.5.1) of the library. (See the section "History" for more information.)
16
+
NOTE: This section and the rest of this page will largely discuss the 2.0.0-beta3 version of the HTML 3D library, which differs considerably from the current release (version 1.5.1) of the library. (See the section "History" for more information.)
Copy file name to clipboardExpand all lines: doc/tutorial-shapes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This page will discuss:
20
20
* Binding mesh buffers to shapes
21
21
* Shape groups, or combinations of several shapes
22
22
23
-
NOTE: This page will largely discuss the 2.0.0-beta1 version of the HTML 3D library, which differs considerably from the current release (version 1.5.1) of the library. (See the library's <ahref="tutorial-history.md">change history</a> for more information.)
23
+
NOTE: This page will largely discuss the 2.0.0-beta3 version of the HTML 3D library, which differs considerably from the current release (version 1.5.1) of the library. (See the library's <ahref="tutorial-history.md">change history</a> for more information.)
0 commit comments