CLASSES
TagsA - Z

Effect

Effect

Description

class Effect

Constructor

new Effect(baseName, attributesNamesOrOptions, EffectCreationOptions, uniformsNamesOrEngine, Engine, samplers, engine, defines, fallbacks, onCompiled, onError, indexParameters)

Parameters

Name Type Description
baseName any
attributesNamesOrOptions string[] or EffectCreationOptions
uniformsNamesOrEngine string[] or Engine
optional samplers Nullable<string[]>
optional engine Engine
optional defines Nullable<string>
optional fallbacks Nullable<EffectFallbacks>
optional onCompiled Nullable<(effect: Effect) => void>
optional onError Nullable<(effect: Effect, errors: string) => void>

Members

name : any

defines : string

onCompiled : Effect) => void>

onError : Nullable<(effect: Effect, errors: string) => void>

onBind : Effect) => void>

uniqueId : number

onCompileObservable : Observable<Effect>

onErrorObservable : Observable<Effect>

onBindObservable : Observable<Effect>

key : string

isSupported : boolean

static ShadersStore : { [key: string]: string }

static IncludesShadersStore : { [key: string]: string }

Methods

isReady() boolean

getEngine() Engine

getProgram() WebGLProgram

getAttributesNames() string[]

getAttributeLocation(index) number

Parameters

Name Type Description
index number

getAttributeLocationByName(name) number

Parameters

Name Type Description
name string

getAttributesCount() number

getUniformIndex(uniformName) number

Parameters

Name Type Description
uniformName string

getUniform(uniformName) Nullable<WebGLUniformLocation>

Parameters

Name Type Description
uniformName string

getSamplers() string[]

getCompilationError() string

executeWhenCompiled(func) void

Parameters

Name Type Description
func (effect: Effect) => void

setTexture(channel, texture) void

Parameters

Name Type Description
channel string
texture Nullable<BaseTexture>

setTextureArray(channel, textures) void

Parameters

Name Type Description
channel string
textures BaseTexture[]

setTextureFromPostProcess(channel, postProcess) void

Parameters

Name Type Description
channel string
postProcess PostProcess

bindUniformBuffer(buffer, name) void

Parameters

Name Type Description
buffer WebGLBuffer
name string

bindUniformBlock(blockName, index) void

Parameters

Name Type Description
blockName string
index number

setIntArray(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Int32Array

setIntArray2(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Int32Array

setIntArray3(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Int32Array

setIntArray4(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Int32Array

setFloatArray(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Float32Array

setFloatArray2(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Float32Array

setFloatArray3(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Float32Array

setFloatArray4(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array Float32Array

setArray(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array number[]

setArray2(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array number[]

setArray3(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array number[]

setArray4(uniformName, array) Effect

Parameters

Name Type Description
uniformName string
array number[]

setMatrices(uniformName, matrices) Effect

Parameters

Name Type Description
uniformName string
matrices Float32Array

setMatrix(uniformName, matrix) Effect

Parameters

Name Type Description
uniformName string
matrix Matrix

setMatrix3x3(uniformName, matrix) Effect

Parameters

Name Type Description
uniformName string
matrix Float32Array

setMatrix2x2(uniformName, matrix) Effect

Parameters

Name Type Description
uniformName string
matrix Float32Array

setFloat(uniformName, value) Effect

Parameters

Name Type Description
uniformName string
value number

setBool(uniformName, bool) Effect

Parameters

Name Type Description
uniformName string
bool boolean

setVector2(uniformName, vector2) Effect

Parameters

Name Type Description
uniformName string
vector2 Vector2

setFloat2(uniformName, x, y) Effect

Parameters

Name Type Description
uniformName string
x number
y number

setVector3(uniformName, vector3) Effect

Parameters

Name Type Description
uniformName string
vector3 Vector3

setFloat3(uniformName, x, y, z) Effect

Parameters

Name Type Description
uniformName string
x number
y number

setVector4(uniformName, vector4) Effect

Parameters

Name Type Description
uniformName string
vector4 Vector4

setFloat4(uniformName, x, y, z, w) Effect

Parameters

Name Type Description
uniformName string
x number
y number
z number

setColor3(uniformName, color3) Effect

Parameters

Name Type Description
uniformName string
color3 Color3

setColor4(uniformName, color3, alpha) Effect

Parameters

Name Type Description
uniformName string
color3 Color3
alpha number

static ResetCache() void