| 12345678910111213141516171819202122232425262728293031323334353637 |
- /**
- * @author mrdoob / http://mrdoob.com/
- */
- 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.generateMipmaps = false;
- var scope = this;
- function update() {
- var video = scope.image;
- if ( video.readyState >= video.HAVE_CURRENT_DATA ) {
- scope.needsUpdate = true;
- }
- requestAnimationFrame( update );
- }
- requestAnimationFrame( update );
- }
- VideoTexture.prototype = Object.create( Texture.prototype );
- VideoTexture.prototype.constructor = VideoTexture;
- export { VideoTexture };
|