You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
474 B
32 lines
474 B
2 years ago
|
import Node from '../core/Node.js';
|
||
|
import MathNode from '../math/MathNode.js';
|
||
|
|
||
|
class FogNode extends Node {
|
||
|
|
||
|
constructor( colorNode, factorNode ) {
|
||
|
|
||
|
super( 'float' );
|
||
|
|
||
|
this.isFogNode = true;
|
||
|
|
||
|
this.colorNode = colorNode;
|
||
|
this.factorNode = factorNode;
|
||
|
|
||
|
}
|
||
|
|
||
|
mix( outputNode ) {
|
||
|
|
||
|
return new MathNode( MathNode.MIX, outputNode, this.colorNode, this );
|
||
|
|
||
|
}
|
||
|
|
||
|
generate( builder ) {
|
||
|
|
||
|
return this.factorNode.build( builder, 'float' );
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
export default FogNode;
|