Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to store a texture sampler data

Hierarchy

Index

Constructors

  • Creates a Sampler instance

    Returns TextureSampler

Properties

samplingMode: number

Gets the sampling mode of the texture

Accessors

  • get anisotropicFilteringLevel(): Nullable<number>
  • set anisotropicFilteringLevel(value: Nullable<number>): void
  • 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 void

  • get comparisonFunction(): number
  • set comparisonFunction(value: number): void
  • 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 void

  • get useMipMaps(): boolean
  • set useMipMaps(value: boolean): void
  • 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 void

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns Nullable<number>

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    Returns void

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns Nullable<number>

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    Returns void

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns Nullable<number>

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    Returns void

Methods

  • Compares this sampler with another one

    Parameters

    Returns boolean

    true if the samplers have the same parametres, else false

  • 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
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme