UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

40 lines (37 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _LightingNode = _interopRequireDefault(require("./LightingNode.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * A generic class that can be used by nodes which contribute * irradiance to the scene. E.g. a light map node can be used * as input for this module. Used in {@link NodeMaterial}. * * @augments LightingNode */ class IrradianceNode extends _LightingNode.default { static get type() { return 'IrradianceNode'; } /** * Constructs a new irradiance node. * * @param {Node<vec3>} node - A node contributing irradiance. */ constructor(node) { super(); /** * A node contributing irradiance. * * @type {Node<vec3>} */ this.node = node; } setup(builder) { builder.context.irradiance.addAssign(this.node); } } var _default = exports.default = IrradianceNode;