ScalarMapper

class cee.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.

Methods

createTexture

ScalarMapper.createTexture()
Return type:Texture

mapToColor

ScalarMapper.mapToColor(scalarValue)
Arguments:
  • scalarValue (number) – None
Return type:

Color4Like

mapToTextureCoordinate

ScalarMapper.mapToTextureCoordinate(scalarValue)
Arguments:
  • scalarValue (number) – None
Return type:

Vec2Like