📄 BasicLightMapNode.js
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 1 |
🧱 Classes | 1 |
📦 Imports | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 src/nodes/lighting/BasicLightMapNode.js
📦 Imports¶
Name | Source |
---|---|
LightingNode |
./LightingNode.js |
float |
../tsl/TSLBase.js |
Functions¶
BasicLightMapNode.setup(builder: any): void
¶
Parameters:
builder
any
Returns: void
Calls:
float (from ../tsl/TSLBase.js)
this.lightMapNode.mul
Internal Comments:
Code
Classes¶
BasicLightMapNode
¶
Class Code
class BasicLightMapNode extends LightingNode {
static get type() {
return 'BasicLightMapNode';
}
/**
* Constructs a new basic light map node.
*
* @param {?Node<vec3>} [lightMapNode=null] - The light map node.
*/
constructor( lightMapNode = null ) {
super();
/**
* The light map node.
*
* @type {?Node<vec3>}
*/
this.lightMapNode = lightMapNode;
}
setup( builder ) {
// irradianceLightMap property is used in the indirectDiffuse() method of BasicLightingModel
const RECIPROCAL_PI = float( 1 / Math.PI );
builder.context.irradianceLightMap = this.lightMapNode.mul( RECIPROCAL_PI );
}
}