Browse Source

Updated builds.

Mugen87 2 years ago
parent
commit
100c2dd13b
4 changed files with 20 additions and 18 deletions
  1. 7 6
      build/three.cjs
  2. 7 6
      build/three.js
  3. 0 0
      build/three.min.js
  4. 6 6
      build/three.module.js

+ 7 - 6
build/three.cjs

@@ -2573,7 +2573,7 @@ class Vector4 {
 */
 
 class WebGLRenderTarget extends EventDispatcher {
-	constructor(width, height, options = {}) {
+	constructor(width = 1, height = 1, options = {}) {
 		super();
 		this.isWebGLRenderTarget = true;
 		this.width = width;
@@ -2664,7 +2664,7 @@ class DataArrayTexture extends Texture {
 }
 
 class WebGLArrayRenderTarget extends WebGLRenderTarget {
-	constructor(width, height, depth) {
+	constructor(width = 1, height = 1, depth = 1) {
 		super(width, height);
 		this.isWebGLArrayRenderTarget = true;
 		this.depth = depth;
@@ -2702,7 +2702,7 @@ class Data3DTexture extends Texture {
 }
 
 class WebGL3DRenderTarget extends WebGLRenderTarget {
-	constructor(width, height, depth) {
+	constructor(width = 1, height = 1, depth = 1) {
 		super(width, height);
 		this.isWebGL3DRenderTarget = true;
 		this.depth = depth;
@@ -2713,7 +2713,7 @@ class WebGL3DRenderTarget extends WebGLRenderTarget {
 }
 
 class WebGLMultipleRenderTargets extends WebGLRenderTarget {
-	constructor(width, height, count, options = {}) {
+	constructor(width = 1, height = 1, count = 1, options = {}) {
 		super(width, height, options);
 		this.isWebGLMultipleRenderTargets = true;
 		const texture = this.texture;
@@ -9090,7 +9090,7 @@ class CubeTexture extends Texture {
 }
 
 class WebGLCubeRenderTarget extends WebGLRenderTarget {
-	constructor(size, options = {}) {
+	constructor(size = 1, options = {}) {
 		super(size, size, options);
 		this.isWebGLCubeRenderTarget = true;
 		const image = {
@@ -17345,7 +17345,8 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
 
 		if (useMultisampledRTT(renderTarget)) {
 			multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, 0, getRenderTargetSamples(renderTarget));
-		} else {
+		} else if (textureTarget === _gl.TEXTURE_2D || textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z) {
+			// see #24753
 			_gl.framebufferTexture2D(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, 0);
 		}
 

+ 7 - 6
build/three.js

@@ -2575,7 +2575,7 @@
 	*/
 
 	class WebGLRenderTarget extends EventDispatcher {
-		constructor(width, height, options = {}) {
+		constructor(width = 1, height = 1, options = {}) {
 			super();
 			this.isWebGLRenderTarget = true;
 			this.width = width;
@@ -2666,7 +2666,7 @@
 	}
 
 	class WebGLArrayRenderTarget extends WebGLRenderTarget {
-		constructor(width, height, depth) {
+		constructor(width = 1, height = 1, depth = 1) {
 			super(width, height);
 			this.isWebGLArrayRenderTarget = true;
 			this.depth = depth;
@@ -2704,7 +2704,7 @@
 	}
 
 	class WebGL3DRenderTarget extends WebGLRenderTarget {
-		constructor(width, height, depth) {
+		constructor(width = 1, height = 1, depth = 1) {
 			super(width, height);
 			this.isWebGL3DRenderTarget = true;
 			this.depth = depth;
@@ -2715,7 +2715,7 @@
 	}
 
 	class WebGLMultipleRenderTargets extends WebGLRenderTarget {
-		constructor(width, height, count, options = {}) {
+		constructor(width = 1, height = 1, count = 1, options = {}) {
 			super(width, height, options);
 			this.isWebGLMultipleRenderTargets = true;
 			const texture = this.texture;
@@ -9092,7 +9092,7 @@
 	}
 
 	class WebGLCubeRenderTarget extends WebGLRenderTarget {
-		constructor(size, options = {}) {
+		constructor(size = 1, options = {}) {
 			super(size, size, options);
 			this.isWebGLCubeRenderTarget = true;
 			const image = {
@@ -17347,7 +17347,8 @@
 
 			if (useMultisampledRTT(renderTarget)) {
 				multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, 0, getRenderTargetSamples(renderTarget));
-			} else {
+			} else if (textureTarget === _gl.TEXTURE_2D || textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z) {
+				// see #24753
 				_gl.framebufferTexture2D(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, 0);
 			}
 

File diff suppressed because it is too large
+ 0 - 0
build/three.min.js


+ 6 - 6
build/three.module.js

@@ -3281,7 +3281,7 @@ class Vector4 {
 */
 class WebGLRenderTarget extends EventDispatcher {
 
-	constructor( width, height, options = {} ) {
+	constructor( width = 1, height = 1, options = {} ) {
 
 		super();
 
@@ -3402,7 +3402,7 @@ class DataArrayTexture extends Texture {
 
 class WebGLArrayRenderTarget extends WebGLRenderTarget {
 
-	constructor( width, height, depth ) {
+	constructor( width = 1, height = 1, depth = 1 ) {
 
 		super( width, height );
 
@@ -3451,7 +3451,7 @@ class Data3DTexture extends Texture {
 
 class WebGL3DRenderTarget extends WebGLRenderTarget {
 
-	constructor( width, height, depth ) {
+	constructor( width = 1, height = 1, depth = 1 ) {
 
 		super( width, height );
 
@@ -3469,7 +3469,7 @@ class WebGL3DRenderTarget extends WebGLRenderTarget {
 
 class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 
-	constructor( width, height, count, options = {} ) {
+	constructor( width = 1, height = 1, count = 1, options = {} ) {
 
 		super( width, height, options );
 
@@ -12006,7 +12006,7 @@ class CubeTexture extends Texture {
 
 class WebGLCubeRenderTarget extends WebGLRenderTarget {
 
-	constructor( size, options = {} ) {
+	constructor( size = 1, options = {} ) {
 
 		super( size, size, options );
 
@@ -23510,7 +23510,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 			multisampledRTTExt.framebufferTexture2DMultisampleEXT( 36160, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) );
 
-		} else {
+		} else if ( textureTarget === 3553 || ( textureTarget >= 34069 && textureTarget <= 34074 ) ) { // see #24753
 
 			_gl.framebufferTexture2D( 36160, attachment, textureTarget, properties.get( texture ).__webglTexture, 0 );
 

Some files were not shown because too many files changed in this diff