Rayity

rayity > “expression”

External module: “expression”

Functionality related to managing GLSL expressions

Index

Interfaces

Type aliases

Functions


Type aliases

Code

Τ Code: string

Defined in expression.ts:6

GLSL code


Functions

expression

expression(body: Code, dependencies?: Expression[]): Expression

Defined in expression.ts:23

Create an Expression

Parameters:

Param Type Description
body Code -
dependencies Expression[] -

Returns: Expression


minNorm

minNorm(v: Expression): Expression

Defined in expression.ts:72

Minimum of x, y, and z components

Parameters:

Param Type Description
v Expression -

Returns: Expression


random

random(seed: Expression): Expression

Defined in expression.ts:67

A random value

Parameters:

Param Type Description
seed Expression -

Returns: Expression


value

value(x?: number, y?: number, z?: number): Expression

Defined in expression.ts:54

A constant-valued Expression

Parameters:

Param Type Default value Description
x number 0 -
y number x -
z number y -

Returns: Expression


variable

variable(name: string): Expression

Defined in expression.ts:62

An expression which is equal to a named variable

Parameters:

Param Type Description
name string -

Returns: Expression