Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EffectFallbacks

EffectFallbacks can be used to add fallbacks (properties to disable) to certain properties when desired to improve performance. (Eg. Start at high quality with reflection and fog, if fps is low, remove reflection, if still low remove fog)

Hierarchy

  • EffectFallbacks

Implements

Index

Accessors

hasMoreFallbacks

  • get hasMoreFallbacks(): boolean
  • Checks to see if more fallbacks are still available.

    Returns boolean

Methods

addCPUSkinningFallbackSearch playground for addCPUSkinningFallback

  • addCPUSkinningFallback(rank: number, mesh: AbstractMesh): void
  • Sets the mesh to use CPU skinning when needing to fallback.

    Parameters

    • rank: number

      The rank of the fallback (Lower ranks will be fallbacked to first)

    • mesh: AbstractMesh

      The mesh to use the fallbacks.

    Returns void

addFallbackSearch playground for addFallback

  • addFallback(rank: number, define: string): void
  • Adds a fallback on the specified property.

    Parameters

    • rank: number

      The rank of the fallback (Lower ranks will be fallbacked to first)

    • define: string

      The name of the define in the shader

    Returns void

reduceSearch playground for reduce

  • reduce(currentDefines: string, effect: Effect): string
  • Removes the defines that should be removed when falling back.

    Parameters

    • currentDefines: string

      defines the current define statements for the shader.

    • effect: Effect

      defines the current effect we try to compile

    Returns string

    The resulting defines with defines of the current rank removed.

unBindMeshSearch playground for unBindMesh

  • unBindMesh(): void
  • Removes the fallback from the bound mesh.

    Returns void

Legend

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