ShadowMaterial.js 695 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { Material } from './Material.js';
  2. import { Color } from '../math/Color.js';
  3. /**
  4. * parameters = {
  5. * color: <THREE.Color>
  6. * }
  7. */
  8. function ShadowMaterial( parameters ) {
  9. Material.call( this );
  10. this.type = 'ShadowMaterial';
  11. this.color = new Color( 0x000000 );
  12. this.transparent = true;
  13. this.setValues( parameters );
  14. }
  15. ShadowMaterial.prototype = Object.create( Material.prototype );
  16. ShadowMaterial.prototype.constructor = ShadowMaterial;
  17. ShadowMaterial.prototype.isShadowMaterial = true;
  18. ShadowMaterial.prototype.copy = function ( source ) {
  19. Material.prototype.copy.call( this, source );
  20. this.color.copy( source.color );
  21. return this;
  22. };
  23. export { ShadowMaterial };
粤ICP备19079148号