.. role:: ts-api-decorator

########################
MeshDataCopyElementGroup
########################

.. container:: ts-api-section

   .. js:class:: MeshDataCopyElementGroup

      Provides access to all data of a particular type (faces, lines or points) within a [[MeshDataCopy]].

      This object additionally supports the ECMAScript 2015 **iterable** protocol and therefore can be iterated over using a ``for..of`` loop.



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-interface

   * :js:attr:`~MeshDataCopyElementGroup.elementCount`
   * :js:attr:`~MeshDataCopyElementGroup.hasNormals`
   * :js:attr:`~MeshDataCopyElementGroup.hasRGBAs`
   * :js:attr:`~MeshDataCopyElementGroup.hasUVs`
   * :js:attr:`~MeshDataCopyElementGroup.vertexCount`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-interface

   * :js:meth:`~MeshDataCopyElementGroup.element`
   * :js:meth:`~MeshDataCopyElementGroup.iterate`





------------

Properties
==========

.. container:: ts-api-section

   .. js:attribute:: MeshDataCopyElementGroup.elementCount

      :type: number

      The number of elements in this group.



.. container:: ts-api-section

   .. js:attribute:: MeshDataCopyElementGroup.hasNormals

      :type: boolean

      Whether the vertices in this element group have normals.



.. container:: ts-api-section

   .. js:attribute:: MeshDataCopyElementGroup.hasRGBAs

      :type: boolean

      Whether the vertices in this element group have colors.



.. container:: ts-api-section

   .. js:attribute:: MeshDataCopyElementGroup.hasUVs

      :type: boolean

      Whether the vertices in this element group have texture coordinates.



.. container:: ts-api-section

   .. js:attribute:: MeshDataCopyElementGroup.vertexCount

      :type: number

      The total number of vertices in all elements in this group.



Methods
=======

.. rst-class:: ts-api-section

element
-------

.. js:method:: MeshDataCopyElementGroup.element( index)

   :param index: the element's index
   :type index: number


   Provides access to mesh data of a single element. Throws ``RangeError`` if ``index`` is invalid.


   :rtype: MeshDataCopyElement

.. rst-class:: ts-api-section

iterate
-------

.. js:method:: MeshDataCopyElementGroup.iterate()





   :returns: An iterator over all the vertices in all the elements in this group.


   :rtype: MeshDataCopyIterator

