MeshNormalMaterial.js 926 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. *
  4. * parameters = {
  5. * opacity: <float>,
  6. *
  7. * shading: THREE.FlatShading,
  8. * blending: THREE.NormalBlending,
  9. * depthTest: <bool>,
  10. * depthWrite: <bool>,
  11. *
  12. * wireframe: <boolean>,
  13. * wireframeLinewidth: <float>
  14. * }
  15. */
  16. THREE.MeshNormalMaterial = function ( parameters ) {
  17. THREE.Material.call( this, parameters );
  18. this.shading = THREE.FlatShading;
  19. this.wireframe = false;
  20. this.wireframeLinewidth = 1;
  21. this.morphTargets = false;
  22. this.setValues( parameters );
  23. };
  24. THREE.MeshNormalMaterial.prototype = Object.create( THREE.Material.prototype );
  25. THREE.MeshNormalMaterial.prototype.clone = function () {
  26. var material = new THREE.MeshNormalMaterial();
  27. THREE.Material.prototype.clone.call( this, material );
  28. material.shading = this.shading;
  29. material.wireframe = this.wireframe;
  30. material.wireframeLinewidth = this.wireframeLinewidth;
  31. return material;
  32. };