Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextureSampler

Class used to store a texture sampler data

Hierarchy

Index

Constructors

constructor

  • Creates a Sampler instance

    Returns TextureSampler

Properties

samplingModeSearch playground for samplingMode

samplingMode: number

Gets the sampling mode of the texture

Accessors

anisotropicFilteringLevel

  • get anisotropicFilteringLevel(): Nullable<number>
  • set anisotropicFilteringLevel(value: Nullable<number>): any
  • With compliant hardware and browser (supporting anisotropic filtering) this defines the level of anisotropic filtering in the texture. The higher the better but the slower.

    Returns Nullable<number>

  • With compliant hardware and browser (supporting anisotropic filtering) this defines the level of anisotropic filtering in the texture. The higher the better but the slower.

    Parameters

    Returns any

comparisonFunction

  • get comparisonFunction(): number
  • set comparisonFunction(value: number): any
  • Gets or sets the comparison function (Constants.LESS, Constants.EQUAL, etc). Set 0 to not use a comparison function

    Returns number

  • Gets or sets the comparison function (Constants.LESS, Constants.EQUAL, etc). Set 0 to not use a comparison function

    Parameters

    • value: number

    Returns any

useMipMaps

  • get useMipMaps(): boolean
  • set useMipMaps(value: boolean): any
  • Indicates to use the mip maps (if available on the texture). Thanks to this flag, you can instruct the sampler to not sample the mipmaps even if they exist (and if the sampling mode is set to a value that normally samples the mipmaps!)

    Returns boolean

  • Indicates to use the mip maps (if available on the texture). Thanks to this flag, you can instruct the sampler to not sample the mipmaps even if they exist (and if the sampling mode is set to a value that normally samples the mipmaps!)

    Parameters

    • value: boolean

    Returns any

wrapR

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns Nullable<number>

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    Returns any

wrapU

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns Nullable<number>

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    Returns any

wrapV

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns Nullable<number>

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    Returns any

Methods

compareSamplerSearch playground for compareSampler

  • Compares this sampler with another one

    Parameters

    Returns boolean

    true if the samplers have the same parametres, else false

setParametersSearch playground for setParameters

  • setParameters(wrapU?: number, wrapV?: number, wrapR?: number, anisotropicFilteringLevel?: number, samplingMode?: number, comparisonFunction?: number): TextureSampler
  • Sets all the parameters of the sampler

    Parameters

    • Optional wrapU: number

      u address mode (default: TEXTURE_WRAP_ADDRESSMODE)

    • Optional wrapV: number

      v address mode (default: TEXTURE_WRAP_ADDRESSMODE)

    • Optional wrapR: number

      r address mode (default: TEXTURE_WRAP_ADDRESSMODE)

    • Optional anisotropicFilteringLevel: number

      anisotropic level (default: 1)

    • Optional samplingMode: number

      sampling mode (default: Constants.TEXTURE_BILINEAR_SAMPLINGMODE)

    • Optional comparisonFunction: number

      comparison function (default: 0 - no comparison function)

    Returns TextureSampler

    the current sampler instance

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method