Shader

Shader

Static default shader sources.

Constructor

new Shader()

Source:
Example
const sourceFragment = Shader.sourceFragment;
const sourceVertex = Shader.sourceVertex;

Members

(readonly) ATTRIBUTE_UVMAPPING_SPRITE :'attributeUvmappingSprite'

Description:
  • Stores the 'attributeUvmappingSprite' attribute name.
Source:
Stores the 'attributeUvmappingSprite' attribute name.
Type:
  • 'attributeUvmappingSprite'

(readonly) ATTRIBUTE_VERTICES :'attributeVertices'

Description:
  • Stores the 'attributeVertices' attribute name.
Source:
Stores the 'attributeVertices' attribute name.
Type:
  • 'attributeVertices'

(readonly) UNIFORM_ASPECT :'uniformAspect'

Description:
  • Stores the 'uniformAspect' uniform name.
Source:
Stores the 'uniformAspect' uniform name.
Type:
  • 'uniformAspect'

(readonly) UNIFORM_SIZE_MASK :'uniformSizeMask'

Description:
  • Stores the 'uniformSizeMask' uniform name.
Source:
Stores the 'uniformSizeMask' uniform name.
Type:
  • 'uniformSizeMask'

(readonly) UNIFORM_SIZE_SPRITE :'uniformSizeSprite'

Description:
  • Stores the 'uniformSizeSprite' uniform name.
Source:
Stores the 'uniformSizeSprite' uniform name.
Type:
  • 'uniformSizeSprite'

(readonly) UNIFORM_TEXTURE_MASK :'uniformTextureMask'

Description:
  • Stores the 'uniformTextureMask' uniform name.
Source:
Stores the 'uniformTextureMask' uniform name.
Type:
  • 'uniformTextureMask'

(readonly) UNIFORM_TEXTURE_SPRITE :'uniformTextureSprite'

Description:
  • Stores the 'uniformTextureSprite' uniform name.
Source:
Stores the 'uniformTextureSprite' uniform name.
Type:
  • 'uniformTextureSprite'

(readonly) UNIFORM_TRANSLATION_MASK :'uniformTranslationMask'

Description:
  • Stores the 'uniformTranslationMask' uniform name.
Source:
Stores the 'uniformTranslationMask' uniform name.
Type:
  • 'uniformTranslationMask'

(readonly) UNIFORM_TRANSLATION_POINT_OF_VIEW :'uniformTranslationPointOfView'

Description:
  • Stores the 'uniformTranslationPointOfView' uniform name.
Source:
Stores the 'uniformTranslationPointOfView' uniform name.
Type:
  • 'uniformTranslationPointOfView'

(readonly) UNIFORM_TRANSLATION_SPRITE :'uniformTranslationSprite'

Description:
  • Stores the 'uniformTranslationSprite' uniform name.
Source:
Stores the 'uniformTranslationSprite' uniform name.
Type:
  • 'uniformTranslationSprite'

(readonly) attributes :Map.<string, TypeTypeAttribute>

Description:
  • Stores the attributes needed by the shader program.
Source:
Stores the attributes needed by the shader program.
Type:
  • Map.<string, TypeTypeAttribute>

(readonly) sourceFragment :string

Description:
  • Stores the fragment shader source.
Source:
Stores the fragment shader source.
Type:
  • string

(readonly) sourceVertex :string

Description:
  • Stores the vertex shader source.
Source:
Stores the vertex shader source.
Type:
  • string

(readonly) uniforms :Map.<string, TypeTypeUniform>

Description:
  • Stores the uniforms needed by the shader program.
Source:
Stores the uniforms needed by the shader program.
Type:
  • Map.<string, TypeTypeUniform>

Type Definitions

TypeTypeAttribute

Description:
  • A type of attribute.
Source:
A type of attribute.
Type:
  • SHADER_PARAMETER_TYPES.VECTOR_2 | SHADER_PARAMETER_TYPES.VECTOR_3

TypeTypeUniform

Description:
  • A type of uniform.
Source:
A type of uniform.
Type:
  • SHADER_PARAMETER_TYPES.BOOLEAN | SHADER_PARAMETER_TYPES.ARRAY_BOOLEAN | SHADER_PARAMETER_TYPES.FLOAT | SHADER_PARAMETER_TYPES.ARRAY_FLOAT | SHADER_PARAMETER_TYPES.INTEGER | SHADER_PARAMETER_TYPES.ARRAY_INTEGER | SHADER_PARAMETER_TYPES.MATRIX_4 | SHADER_PARAMETER_TYPES.ARRAY_MATRIX_4 | SHADER_PARAMETER_TYPES.SAMPLER_2D | SHADER_PARAMETER_TYPES.VECTOR_2 | SHADER_PARAMETER_TYPES.ARRAY_VECTOR_2 | SHADER_PARAMETER_TYPES.VECTOR_3 | SHADER_PARAMETER_TYPES.ARRAY_VECTOR_3