@openhps/core
Version:
Open Hybrid Positioning System - Core component
41 lines (38 loc) • 1.04 kB
JavaScript
;
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
* ambient occlusion to the scene. E.g. an ambient occlusion map
* node can be used as input for this module. Used in {@link NodeMaterial}.
*
* @augments LightingNode
*/
class AONode extends _LightingNode.default {
static get type() {
return 'AONode';
}
/**
* Constructs a new AO node.
*
* @param {?Node<float>} [aoNode=null] - The ambient occlusion node.
*/
constructor(aoNode = null) {
super();
/**
* The ambient occlusion node.
*
* @type {?Node<float>}
* @default null
*/
this.aoNode = aoNode;
}
setup(builder) {
builder.context.ambientOcclusion.mulAssign(this.aoNode);
}
}
var _default = exports.default = AONode;