/usr/share/javascript/three/examples/js/nodes/accessors/LightNode.js is in libjs-three 80+dfsg2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | /**
* @author sunag / http://www.sunag.com.br/
*/
THREE.LightNode = function() {
THREE.TempNode.call( this, 'v3', { shared: false } );
};
THREE.LightNode.prototype = Object.create( THREE.TempNode.prototype );
THREE.LightNode.prototype.constructor = THREE.LightNode;
THREE.LightNode.prototype.generate = function( builder, output ) {
if ( builder.isCache( 'light' ) ) {
return builder.format( 'reflectedLight.directDiffuse', this.getType( builder ), output )
}
else {
console.warn( "THREE.LightNode is only compatible in \"light\" channel." );
return builder.format( 'vec3( 0.0 )', this.getType( builder ), output );
}
};
|