1234567891011121314151617181920212223242526272829303132333435363738 |
- import Node, { addNodeClass } from '../core/Node.js';
- import { mix } from '../math/MathNode.js';
- import { addNodeElement, nodeProxy } from '../shadernode/ShaderNode.js';
- class FogNode extends Node {
- constructor( colorNode, factorNode ) {
- super( 'float' );
- this.isFogNode = true;
- this.colorNode = colorNode;
- this.factorNode = factorNode;
- }
- mixAssign( outputNode ) {
- return mix( outputNode, this.colorNode, this );
- }
- setup() {
- return this.factorNode;
- }
- }
- export default FogNode;
- export const fog = nodeProxy( FogNode );
- addNodeElement( 'fog', fog );
- addNodeClass( 'FogNode', FogNode );
|