Texture.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * @author mr.doob / http://mrdoob.com/
  3. * @author alteredq / http://alteredqualia.com/
  4. */
  5. THREE.Texture = function ( image, mapping, wrap_s, wrap_t, mag_filter, min_filter ) {
  6. this.image = image;
  7. this.mapping = mapping !== undefined ? mapping : new THREE.UVMapping();
  8. this.wrap_s = wrap_s !== undefined ? wrap_s : THREE.ClampToEdgeWrapping;
  9. this.wrap_t = wrap_t !== undefined ? wrap_t : THREE.ClampToEdgeWrapping;
  10. this.mag_filter = mag_filter !== undefined ? mag_filter : THREE.LinearFilter;
  11. this.min_filter = min_filter !== undefined ? min_filter : THREE.LinearMipMapLinearFilter;
  12. this.toString = function () {
  13. return 'THREE.Texture (<br/>' +
  14. 'image: ' + this.image + '<br/>' +
  15. 'wrap_s: ' + this.wrap_s + '<br/>' +
  16. 'wrap_t: ' + this.wrap_t + '<br/>' +
  17. 'mag_filter: ' + this.mag_filter + '<br/>' +
  18. 'min_filter: ' + this.min_filter + '<br/>' +
  19. ')';
  20. };
  21. };
  22. THREE.MultiplyOperation = 0;
  23. THREE.MixOperation = 1;
  24. THREE.RepeatWrapping = 0;
  25. THREE.ClampToEdgeWrapping = 1;
  26. THREE.MirroredRepeatWrapping = 2;
  27. THREE.NearestFilter = 3;
  28. THREE.NearestMipMapNearestFilter = 4;
  29. THREE.NearestMipMapLinearFilter = 5;
  30. THREE.LinearFilter = 6;
  31. THREE.LinearMipMapNearestFilter = 7;
  32. THREE.LinearMipMapLinearFilter = 8;
粤ICP备19079148号