1 /**
2 * @author mrdoob / http://mrdoob.com/
3 * @author alteredq / http://alteredqualia.com/
4 * @author szimek / https://github.com/szimek/
5 */
6
7 /**@constructor*/
8 THREE.Texture = function ( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
9
10 THREE.TextureLibrary.push( this );
11
12 this.id = THREE.TextureIdCount ++;
13
14 this.name = '';
15
16 this.image = image;
17
18 this.mapping = mapping !== undefined ? mapping : new THREE.UVMapping();
19
20 this.wrapS = wrapS !== undefined ? wrapS : THREE.ClampToEdgeWrapping;
21 this.wrapT = wrapT !== undefined ? wrapT : THREE.ClampToEdgeWrapping;
22
23 this.magFilter = magFilter !== undefined ? magFilter : THREE.LinearFilter;
24 this.minFilter = minFilter !== undefined ? minFilter : THREE.LinearMipMapLinearFilter;
25
26 this.anisotropy = anisotropy !== undefined ? anisotropy : 1;
27
28 this.format = format !== undefined ? format : THREE.RGBAFormat;
29 this.type = type !== undefined ? type : THREE.UnsignedByteType;
30
31 this.offset = new THREE.Vector2( 0, 0 );
32 this.repeat = new THREE.Vector2( 1, 1 );
33
34 this.generateMipmaps = true;
35 this.premultiplyAlpha = false;
36 this.flipY = true;
37
38 this.needsUpdate = false;
39 this.onUpdate = null;
40
41 };
42
43 THREE.Texture.prototype = {
44
45 constructor: THREE.Texture,
46
47 clone: function () {
48
49 var texture = new THREE.Texture();
50
51 texture.image = this.image;
52
53 texture.mapping = this.mapping;
54
55 texture.wrapS = this.wrapS;
56 texture.wrapT = this.wrapT;
57
58 texture.magFilter = this.magFilter;
59 texture.minFilter = this.minFilter;
60
61 texture.anisotropy = this.anisotropy;
62
63 texture.format = this.format;
64 texture.type = this.type;
65
66 texture.offset.copy( this.offset );
67 texture.repeat.copy( this.repeat );
68
69 texture.generateMipmaps = this.generateMipmaps;
70 texture.premultiplyAlpha = this.premultiplyAlpha;
71 texture.flipY = this.flipY;
72
73 return texture;
74
75 },
76
77 deallocate: function () {
78
79 var index = THREE.TextureLibrary.indexOf( this );
80 if ( index !== -1 ) THREE.TextureLibrary.splice( index, 1 );
81
82 }
83
84 };
85
86 /**@fieldOf THREE
87 @field
88 @name TextureIdCount*/
89 THREE.TextureIdCount = 0;
90 /**@fieldOf THREE
91 @field
92 @name TextureLibrary*/
93 THREE.TextureLibrary = [];
94
nike free rn
new balance hombre baratas
cinturones gucci
ugg rebajas
cinturon gucci
ray ban baratas
nike cortez
peuterey mujer
christian louboutin madrid
mbt zapatos
gafas ray ban baratas
mbt ofertas
air max blancas
mbt barcelona
nike air max 90
woolrich barcelona
nike mujer
botas ugg
gafas de sol carrera aratas
air max 2016 baratas
oakley baratas
nike air max 2016