Parcourir la source

Updated builds.

Mr.doob il y a 6 ans
Parent
commit
3390f52c32
3 fichiers modifiés avec 488 ajouts et 434 suppressions
  1. 28 1
      build/three.js
  2. 432 432
      build/three.min.js
  3. 28 1
      build/three.module.js

+ 28 - 1
build/three.js

@@ -3724,6 +3724,10 @@
 
 		this.texture = new Texture( undefined, undefined, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
 
+		this.texture.image = {};
+		this.texture.image.width = width;
+		this.texture.image.height = height;
+
 		this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
 		this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
 
@@ -3746,6 +3750,9 @@
 				this.width = width;
 				this.height = height;
 
+				this.texture.image.width = width;
+				this.texture.image.height = height;
+
 				this.dispose();
 
 			}
@@ -20623,7 +20630,7 @@
 
 					_gl.pixelStorei( 37440, texture.flipY );
 
-					var isCompressed = ( texture && texture.isCompressedTexture );
+					var isCompressed = ( texture.image[ 0 ] && texture.image[ 0 ].isCompressedTexture );
 					var isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );
 
 					var cubeImage = [];
@@ -22080,6 +22087,8 @@
 
 				animation.start();
 
+				scope.dispatchEvent( { type: 'sessionstart' } );
+
 			} else {
 
 				if ( scope.enabled ) {
@@ -22090,6 +22099,8 @@
 
 				animation.stop();
 
+				scope.dispatchEvent( { type: 'sessionend' } );
+
 			}
 
 		}
@@ -22414,12 +22425,16 @@
 
 	}
 
+	Object.assign( WebVRManager.prototype, EventDispatcher.prototype );
+
 	/**
 	 * @author mrdoob / http://mrdoob.com/
 	 */
 
 	function WebXRManager( renderer ) {
 
+		var scope = this;
+
 		var gl = renderer.context;
 
 		var session = null;
@@ -22496,6 +22511,8 @@
 			renderer.setRenderTarget( renderer.getRenderTarget() ); // Hack #15830
 			animation.stop();
 
+			scope.dispatchEvent( { type: 'sessionend' } );
+
 		}
 
 		function onRequestReferenceSpace( value ) {
@@ -22505,6 +22522,8 @@
 			animation.setContext( session );
 			animation.start();
 
+			scope.dispatchEvent( { type: 'sessionstart' } );
+
 		}
 
 		this.setFramebufferScaleFactor = function ( value ) {
@@ -22517,6 +22536,12 @@
 
 		};
 
+		this.getSession = function () {
+
+			return session;
+
+		};
+
 		this.setSession = function ( value ) {
 
 			session = value;
@@ -22719,6 +22744,8 @@
 
 	}
 
+	Object.assign( WebXRManager.prototype, EventDispatcher.prototype );
+
 	/**
 	 * @author supereggbert / http://www.paulbrunt.co.uk/
 	 * @author mrdoob / http://mrdoob.com/

Fichier diff supprimé car celui-ci est trop grand
+ 432 - 432
build/three.min.js


+ 28 - 1
build/three.module.js

@@ -3718,6 +3718,10 @@ function WebGLRenderTarget( width, height, options ) {
 
 	this.texture = new Texture( undefined, undefined, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
 
+	this.texture.image = {};
+	this.texture.image.width = width;
+	this.texture.image.height = height;
+
 	this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
 	this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
 
@@ -3740,6 +3744,9 @@ WebGLRenderTarget.prototype = Object.assign( Object.create( EventDispatcher.prot
 			this.width = width;
 			this.height = height;
 
+			this.texture.image.width = width;
+			this.texture.image.height = height;
+
 			this.dispose();
 
 		}
@@ -20617,7 +20624,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 				_gl.pixelStorei( 37440, texture.flipY );
 
-				var isCompressed = ( texture && texture.isCompressedTexture );
+				var isCompressed = ( texture.image[ 0 ] && texture.image[ 0 ].isCompressedTexture );
 				var isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );
 
 				var cubeImage = [];
@@ -22074,6 +22081,8 @@ function WebVRManager( renderer ) {
 
 			animation.start();
 
+			scope.dispatchEvent( { type: 'sessionstart' } );
+
 		} else {
 
 			if ( scope.enabled ) {
@@ -22084,6 +22093,8 @@ function WebVRManager( renderer ) {
 
 			animation.stop();
 
+			scope.dispatchEvent( { type: 'sessionend' } );
+
 		}
 
 	}
@@ -22408,12 +22419,16 @@ function WebVRManager( renderer ) {
 
 }
 
+Object.assign( WebVRManager.prototype, EventDispatcher.prototype );
+
 /**
  * @author mrdoob / http://mrdoob.com/
  */
 
 function WebXRManager( renderer ) {
 
+	var scope = this;
+
 	var gl = renderer.context;
 
 	var session = null;
@@ -22490,6 +22505,8 @@ function WebXRManager( renderer ) {
 		renderer.setRenderTarget( renderer.getRenderTarget() ); // Hack #15830
 		animation.stop();
 
+		scope.dispatchEvent( { type: 'sessionend' } );
+
 	}
 
 	function onRequestReferenceSpace( value ) {
@@ -22499,6 +22516,8 @@ function WebXRManager( renderer ) {
 		animation.setContext( session );
 		animation.start();
 
+		scope.dispatchEvent( { type: 'sessionstart' } );
+
 	}
 
 	this.setFramebufferScaleFactor = function ( value ) {
@@ -22511,6 +22530,12 @@ function WebXRManager( renderer ) {
 
 	};
 
+	this.getSession = function () {
+
+		return session;
+
+	};
+
 	this.setSession = function ( value ) {
 
 		session = value;
@@ -22713,6 +22738,8 @@ function WebXRManager( renderer ) {
 
 }
 
+Object.assign( WebXRManager.prototype, EventDispatcher.prototype );
+
 /**
  * @author supereggbert / http://www.paulbrunt.co.uk/
  * @author mrdoob / http://mrdoob.com/

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff