UNPKG

gl-react

Version:

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

33 lines (31 loc) 706 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; const g = global; let _globalVisitors = g.__glReactGlobalVisitor = g.__glReactGlobalVisitor || []; /** * Utility to visit the Surface & Node draw lifecycle (used for logging and testing) * @namespace */ const Visitors = { /** * @memberof Visitors */ add(visitor) { _globalVisitors.push(visitor); }, /** * @memberof Visitors */ remove(visitor) { const i = _globalVisitors.indexOf(visitor); if (i !== -1) _globalVisitors.splice(i, 1); }, get() { return _globalVisitors; } }; var _default = exports.default = Visitors; //# sourceMappingURL=Visitors.js.map