Skip to content

Commit

Permalink
Updated builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 6, 2018
1 parent 6b7ee3e commit 7fedf92
Show file tree
Hide file tree
Showing 3 changed files with 740 additions and 769 deletions.
52 changes: 19 additions & 33 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -17452,7 +17452,7 @@

}

function clear() {
function dispose() {

updateList = {};

Expand All @@ -17461,7 +17461,7 @@
return {

update: update,
clear: clear
dispose: dispose

};

Expand Down Expand Up @@ -18489,7 +18489,7 @@
* @author mrdoob / http://mrdoob.com/
*/

function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, infoMemory ) {
function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, infoMemory, infoRender ) {

var _isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && _gl instanceof WebGL2RenderingContext );
var _videoTextures = {};
Expand Down Expand Up @@ -18684,6 +18684,8 @@

var textureProperties = properties.get( texture );

if ( texture.isVideoTexture ) updateVideoTexture( texture );

if ( texture.version > 0 && textureProperties.__version !== texture.version ) {

var image = texture.image;
Expand Down Expand Up @@ -18895,12 +18897,6 @@

textureProperties.__webglTexture = _gl.createTexture();

if ( texture.isVideoTexture ) {

_videoTextures[ texture.id ] = texture;

}

infoMemory.textures ++;

}
Expand Down Expand Up @@ -19282,11 +19278,17 @@

}

function updateVideoTextures() {
function updateVideoTexture( texture ) {

var id = texture.id;
var frame = infoRender.frame;

// Check the last frame we updated the VideoTexture

for ( var id in _videoTextures ) {
if ( _videoTextures[ id ] !== frame ) {

_videoTextures[ id ].update();
_videoTextures[ id ] = frame;
texture.update();

}

Expand All @@ -19297,7 +19299,6 @@
this.setTextureCubeDynamic = setTextureCubeDynamic;
this.setupRenderTarget = setupRenderTarget;
this.updateRenderTargetMipmap = updateRenderTargetMipmap;
this.updateVideoTextures = updateVideoTextures;

}

Expand Down Expand Up @@ -19331,7 +19332,7 @@

}

function clear() {
function dispose() {

properties = {};

Expand All @@ -19340,7 +19341,7 @@
return {
get: get,
remove: remove,
clear: clear
dispose: dispose
};

}
Expand Down Expand Up @@ -21478,7 +21479,7 @@
state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ) );

properties = new WebGLProperties();
textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, _infoMemory );
textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, _infoMemory, _infoRender );
attributes = new WebGLAttributes( _gl );
geometries = new WebGLGeometries( _gl, attributes, _infoMemory );
objects = new WebGLObjects( geometries, _infoRender );
Expand Down Expand Up @@ -21715,6 +21716,8 @@
_canvas.removeEventListener( 'webglcontextrestored', onContextRestore, false );

renderLists.dispose();
properties.dispose();
objects.dispose();

vr.dispose();

Expand Down Expand Up @@ -22335,10 +22338,6 @@

//

textures.updateVideoTextures();

//

if ( _clippingEnabled ) _clipping.beginShadows();

shadowMap.render( shadowsArray, scene, camera );
Expand Down Expand Up @@ -25154,19 +25153,6 @@

this.generateMipmaps = false;

// Set needsUpdate when first frame is ready

var scope = this;

function onLoaded() {

video.removeEventListener( 'loadeddata', onLoaded, false );
scope.needsUpdate = true;

}

video.addEventListener( 'loadeddata', onLoaded, false );

}

VideoTexture.prototype = Object.assign( Object.create( Texture.prototype ), {
Expand Down
Loading

0 comments on commit 7fedf92

Please sign in to comment.