UNPKG

gl-react

Version:

Universal React library, write and compose WebGL shaders, implement complex effects using a descriptive paradigm

52 lines (46 loc) 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /** * A set of Uniform symbols you can pass to a uniform. (recognized and interpreted by Node) */ const Uniform = { /** * Inject the texture of the previous framebuffer state */ Backbuffer: "_Backbuffer_", /** * Inject the texture of the previous framebuffer state of another Node pointed by its reference. * @param {Node | Bus} a Node or Bus instance of what you want the backbuffer from. the Node needs to have backbuffering enabled. (in case of Bus, it means its root Node) */ backbufferFrom: node => ({ type: "BackbufferFrom", node }), /** * the framebuffer size itself */ Resolution: "_Resolution_", /** * Inject the size of a given Texture input * @param {any} obj the texture input object */ textureSize: obj => ({ type: "TextureSize", obj }), /** * Inject the width/height ratio of a given Texture input * @param {any} obj the texture input object */ textureSizeRatio: obj => ({ type: "TextureSize", obj, ratio: true }) }; var _default = Uniform; exports.default = _default; //# sourceMappingURL=Uniform.js.map