fireball/lib/textures/CubeTexture.js

42 lines
862 B
JavaScript
Raw Normal View History

2018-12-25 13:59:22 +00:00
/**
* @author mrdoob / http://mrdoob.com/
*/
import { Texture } from './Texture.js';
import { CubeReflectionMapping } from '../constants.js';
function CubeTexture( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {
images = images !== undefined ? images : [];
mapping = mapping !== undefined ? mapping : CubeReflectionMapping;
Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
this.flipY = false;
}
CubeTexture.prototype = Object.create( Texture.prototype );
CubeTexture.prototype.constructor = CubeTexture;
CubeTexture.prototype.isCubeTexture = true;
Object.defineProperty( CubeTexture.prototype, 'images', {
get: function () {
return this.image;
},
set: function ( value ) {
this.image = value;
}
} );
export { CubeTexture };