preact
This commit is contained in:
parent
6acf267d48
commit
b7614eb3f8
4794 changed files with 1280808 additions and 1546 deletions
27
frontend/node_modules/three/examples/jsm/nodes/lighting/AONode.js
generated
vendored
Normal file
27
frontend/node_modules/three/examples/jsm/nodes/lighting/AONode.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import LightingNode from './LightingNode.js';
|
||||
import { addNodeClass } from '../core/Node.js';
|
||||
|
||||
class AONode extends LightingNode {
|
||||
|
||||
constructor( aoNode = null ) {
|
||||
|
||||
super();
|
||||
|
||||
this.aoNode = aoNode;
|
||||
|
||||
}
|
||||
|
||||
setup( builder ) {
|
||||
|
||||
const aoIntensity = 1;
|
||||
const aoNode = this.aoNode.x.sub( 1.0 ).mul( aoIntensity ).add( 1.0 );
|
||||
|
||||
builder.context.ambientOcclusion.mulAssign( aoNode );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default AONode;
|
||||
|
||||
addNodeClass( 'AONode', AONode );
|
||||
Loading…
Add table
Add a link
Reference in a new issue