Constants()

new Constants()

Class that handles the creation of new Constants in Points.

Source:
Constants.js, line 3
Example
points.constants.MYCONST = 10;

// wgsl side
let val = MYCONST; // value is 10 u32 by default
js side

Members

staticlist

List of all Constants

Source:
Constants.js, line 83

Methods

staticadd(constant)

Add a new Constant

Parameters:
Name Type Description
constant Constant
Source:
Constants.js, line 102

staticfind(name)Constant

Retrieves a Constant by its name.

Parameters:
Name Type Description
name String
Source:
Constants.js, line 93
Returns:
Type:
Constant

staticlistOfOverrides(filter)Object

Object list with the constants that are overridable. This object will be passed into the pipeline.

Parameters:
Name Type Description
filter
  • GPUShaderStage
  • Number
Source:
Constants.js, line 118
Returns:
Type:
Object

staticstringOfNonOverrides(filter)String

List of constants formatted as WGSL string to be interpolated in the shaders.

Parameters:
Name Type Description
filter
  • GPUShaderStage
  • Number
Source:
Constants.js, line 134
Returns:
Type:
String

MIT

Documentation generated by JSDoc 4.0.5 using Docolatte theme on