Home Reference Source Repository
import FragmentShader from 'dh3dlib/js/base/FragmentShader.js'
public class | source

FragmentShader

FragmentShader class

Constructor Summary

Public Constructor
public

constructor(gl: WebGLRenderingContext)

constructor

Member Summary

Public Members
public get

get shader name

public get

get shader program

Method Summary

Public Methods
public

bindAttribute(programObject: WebGLProgram): void

bind attributes to given program

public

get shader name

public

getShader(): WebGLShader

get shader object

public

setLightData(light: Light): void

set light object

public

setMaterialData(material: Material): void

set material data

Public Constructors

public constructor(gl: WebGLRenderingContext) source

constructor

Params:

NameTypeAttributeDescription
gl WebGLRenderingContext

Public Members

public get _name: string: string source

get shader name

Return:

string

shader name

public get _program: string: string source

get shader program

Return:

string

shader program

Public Methods

public bindAttribute(programObject: WebGLProgram): void source

bind attributes to given program

Params:

NameTypeAttributeDescription
programObject WebGLProgram

program to bind attributes

Return:

void

public getName(): string source

get shader name

Return:

string

shader name

public getShader(): WebGLShader source

get shader object

Return:

WebGLShader

shader

public setLightData(light: Light): void source

set light object

Params:

NameTypeAttributeDescription
light Light

Light object

Return:

void

public setMaterialData(material: Material): void source

set material data

Params:

NameTypeAttributeDescription
material Material

Material object

Return:

void