julien-c's picture
julien-c HF staff
do not gitignore the builds
6cd9596
raw
history blame contribute delete
899 Bytes
/**
* @author mrdoob / http://mrdoob.com/
*/
import { RGBFormat, LinearFilter } from '../constants.js';
import { Texture } from './Texture.js';
function VideoTexture( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
Texture.call( this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
this.format = format !== undefined ? format : RGBFormat;
this.minFilter = minFilter !== undefined ? minFilter : LinearFilter;
this.magFilter = magFilter !== undefined ? magFilter : LinearFilter;
this.generateMipmaps = false;
}
VideoTexture.prototype = Object.assign( Object.create( Texture.prototype ), {
constructor: VideoTexture,
isVideoTexture: true,
update: function () {
var video = this.image;
if ( video.readyState >= video.HAVE_CURRENT_DATA ) {
this.needsUpdate = true;
}
}
} );
export { VideoTexture };