ShadowMaterial.js 737 B

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