ShadowNodeMaterial.js 623 B

12345678910111213141516171819202122232425262728293031323334
  1. import NodeMaterial, { addNodeMaterial } from './NodeMaterial.js';
  2. import ShadowMaskModel from '../functions/ShadowMaskModel.js';
  3. import { ShadowMaterial } from 'three';
  4. const defaultValues = new ShadowMaterial();
  5. class ShadowNodeMaterial extends NodeMaterial {
  6. constructor( parameters ) {
  7. super();
  8. this.isShadowNodeMaterial = true;
  9. this.lights = true;
  10. this.setDefaultValues( defaultValues );
  11. this.setValues( parameters );
  12. }
  13. setupLightingModel( /*builder*/ ) {
  14. return new ShadowMaskModel();
  15. }
  16. }
  17. export default ShadowNodeMaterial;
  18. addNodeMaterial( 'ShadowNodeMaterial', ShadowNodeMaterial );