Home Reference Source
import {ShaderGraphOp} from './libs/cgl/shadergraph/cgl_shadergraphop.js'
public class | source

ShaderGraphOp

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

enabled: boolean

public

info: *

Private Members
private

_defines: *[]

private

_inPorts: *[]

private

_op: *

private

_outPorts: *[]

Method Summary

Public Methods
public
public

define(name: String, value: Any)

add a define to a shader, e.g.

public

getDefine(name: *): *

public

getDefines(): *

public

hasDefine(name: String): Boolean

return true if shader has define

public

isTypeDef(str: *): *

public

parseCode(_code: *): *

public

remove a define from a shader

public

toggleDefine(name: *, enabled: *)

public
public

updatePorts(info: *)

Public Constructors

public constructor() source

Public Members

public enabled: boolean source

public info: * source

Private Members

private _defines: *[] source

private _inPorts: *[] source

private _op: * source

private _outPorts: *[] source

Public Methods

public addPortWatcher() source

public define(name: String, value: Any) source

add a define to a shader, e.g. #define DO_THIS_THAT 1

Params:

NameTypeAttributeDescription
name String
value Any

(can be empty)

public getDefine(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public getDefines(): * source

Return:

*

public hasDefine(name: String): Boolean source

return true if shader has define

Params:

NameTypeAttributeDescription
name String

Return:

Boolean

public isTypeDef(str: *): * source

Params:

NameTypeAttributeDescription
str *

Return:

*

public parseCode(_code: *): * source

Params:

NameTypeAttributeDescription
_code *

Return:

*

public removeDefine(name: name) source

remove a define from a shader

Params:

NameTypeAttributeDescription
name name

public toggleDefine(name: *, enabled: *) source

Params:

NameTypeAttributeDescription
name *
enabled *

public updateGraph() source

public updatePorts(info: *) source

Params:

NameTypeAttributeDescription
info *