.. role:: ts-api-decorator

############
ScalarMapper
############

.. js:module:: cee
   :noindex:

.. container:: ts-api-section

   .. js:class:: ScalarMapper

      Abstract base class for scalar mappers.

      The scalar mapper offers two services:

      - Map from a scalar value (domain value) to a texture coordinate or a color
      - Create a texture from the scalar mapper that can be used for rendering and corresponds with
        the texture coordinates produced.



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.ScalarMapper.createTexture`
   * :js:meth:`~cee.ScalarMapper.mapToColor`
   * :js:meth:`~cee.ScalarMapper.mapToTextureCoordinate`





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

Methods
=======

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

createTexture
-------------

.. js:method:: ScalarMapper.createTexture()



   :rtype: Texture

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

mapToColor
----------

.. js:method:: ScalarMapper.mapToColor( scalarValue)

   :param scalarValue: None
   :type scalarValue: number


   :rtype: Color4Like

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

mapToTextureCoordinate
----------------------

.. js:method:: ScalarMapper.mapToTextureCoordinate( scalarValue)

   :param scalarValue: None
   :type scalarValue: number


   :rtype: Vec2Like

