UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

45 lines (41 loc) 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _LightingNode = _interopRequireDefault(require("./LightingNode.js")); var _CubeMapNode = require("../utils/CubeMapNode.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Represents a basic model for Image-based lighting (IBL). The environment * is defined via environment maps in the equirectangular or cube map format. * `BasicEnvironmentNode` is intended for non-PBR materials like {@link MeshBasicNodeMaterial} * or {@link MeshPhongNodeMaterial}. * * @augments LightingNode */ class BasicEnvironmentNode extends _LightingNode.default { static get type() { return 'BasicEnvironmentNode'; } /** * Constructs a new basic environment node. * * @param {Node} [envNode=null] - A node representing the environment. */ constructor(envNode = null) { super(); /** * A node representing the environment. * * @type {Node} * @default null */ this.envNode = envNode; } setup(builder) { // environment property is used in the finish() method of BasicLightingModel builder.context.environment = (0, _CubeMapNode.cubeMapNode)(this.envNode); } } var _default = exports.default = BasicEnvironmentNode;