UNPKG

@absulit/points

Version:

A Generative Art library made in WebGPU

34 lines (31 loc) 833 B
'use strict'; /** * In different calls to the main {@link Points} class, it is used to * tell the library in what stage of the shaders the data to be sent. * @class ShaderType * * @example * // Send storage data to the Fragment Shaders only * points.setStorage('variables', 'Variables', false, ShaderType.FRAGMENT); * points.setStorage('objects', `array<Object, ${numObjects}>`, false, ShaderType.FRAGMENT); * * @example * // Send storage data to the Compute Shaders only * points.setStorage('variables', 'Variable', false, ShaderType.COMPUTE); * */ class ShaderType { /** * Vertex Shader */ static VERTEX = 1; /** * Compute Shader */ static COMPUTE = 2; /** * Fragment Shader */ static FRAGMENT = 3; } export default ShaderType;