MeshToonMaterial.js 757 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { MeshPhongMaterial } from './MeshPhongMaterial';
  2. /**
  3. * @author takahirox / http://github.com/takahirox
  4. *
  5. * parameters = {
  6. * gradientMap: new THREE.Texture( <Image> )
  7. * }
  8. */
  9. function MeshToonMaterial( parameters ) {
  10. MeshPhongMaterial.call( this );
  11. this.type = 'MeshToonMaterial';
  12. this.gradientMap = null;
  13. this.setValues( parameters );
  14. }
  15. MeshToonMaterial.prototype = Object.create( MeshPhongMaterial.prototype );
  16. MeshToonMaterial.prototype.constructor = MeshToonMaterial;
  17. MeshToonMaterial.prototype.isMeshToonMaterial = true;
  18. MeshToonMaterial.prototype.copy = function ( source ) {
  19. MeshPhongMaterial.prototype.copy.call( this, source );
  20. this.gradientMap = source.gradientMap;
  21. return this;
  22. };
  23. export { MeshToonMaterial };