Ver Fonte

Updated builds.

Mr.doob há 3 anos atrás
pai
commit
8d48ad690b
4 ficheiros alterados com 27 adições e 29 exclusões
  1. 8 9
      build/three.cjs
  2. 8 9
      build/three.js
  3. 0 0
      build/three.min.js
  4. 11 11
      build/three.module.js

+ 8 - 9
build/three.cjs

@@ -7,7 +7,7 @@
 
 Object.defineProperty(exports, '__esModule', { value: true });
 
-const REVISION = '140';
+const REVISION = '141dev';
 const MOUSE = {
 	LEFT: 0,
 	MIDDLE: 1,
@@ -2674,7 +2674,8 @@ class WebGLRenderTarget extends EventDispatcher {
 		this.texture = source.texture.clone();
 		this.texture.isRenderTargetTexture = true; // ensure image object is not shared, see #20328
 
-		this.texture.image = Object.assign({}, source.texture.image);
+		const image = Object.assign({}, source.texture.image);
+		this.texture.source = new Source(image);
 		this.depthBuffer = source.depthBuffer;
 		this.stencilBuffer = source.stencilBuffer;
 		if (source.depthTexture !== null) this.depthTexture = source.depthTexture.clone();
@@ -18322,7 +18323,7 @@ class WebXRManager extends EventDispatcher {
 		function onSessionEvent(event) {
 			const controller = inputSourcesMap.get(event.inputSource);
 
-			if (controller) {
+			if (controller !== undefined) {
 				controller.dispatchEvent({
 					type: event.type,
 					data: event.inputSource
@@ -18332,7 +18333,9 @@ class WebXRManager extends EventDispatcher {
 
 		function onSessionEnd() {
 			inputSourcesMap.forEach(function (controller, inputSource) {
-				controller.disconnect(inputSource);
+				if (controller !== undefined) {
+					controller.disconnect(inputSource);
+				}
 			});
 			inputSourcesMap.clear();
 			_currentDepthNear = null;
@@ -20487,11 +20490,6 @@ function WebGLRenderer(parameters = {}) {
 	};
 
 	this.copyFramebufferToTexture = function (position, texture, level = 0) {
-		if (texture.isFramebufferTexture !== true) {
-			console.error('THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.');
-			return;
-		}
-
 		const levelScale = Math.pow(2, -level);
 		const width = Math.floor(texture.image.width * levelScale);
 		const height = Math.floor(texture.image.height * levelScale);
@@ -25510,6 +25508,7 @@ function toJSON$1(shapes, options, data) {
 		data.shapes.push(shapes.uuid);
 	}
 
+	data.options = Object.assign({}, options);
 	if (options.extrudePath !== undefined) data.options.extrudePath = options.extrudePath.toJSON();
 	return data;
 }

+ 8 - 9
build/three.js

@@ -9,7 +9,7 @@
 	(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));
 })(this, (function (exports) { 'use strict';
 
-	const REVISION = '140';
+	const REVISION = '141dev';
 	const MOUSE = {
 		LEFT: 0,
 		MIDDLE: 1,
@@ -2676,7 +2676,8 @@
 			this.texture = source.texture.clone();
 			this.texture.isRenderTargetTexture = true; // ensure image object is not shared, see #20328
 
-			this.texture.image = Object.assign({}, source.texture.image);
+			const image = Object.assign({}, source.texture.image);
+			this.texture.source = new Source(image);
 			this.depthBuffer = source.depthBuffer;
 			this.stencilBuffer = source.stencilBuffer;
 			if (source.depthTexture !== null) this.depthTexture = source.depthTexture.clone();
@@ -18324,7 +18325,7 @@
 			function onSessionEvent(event) {
 				const controller = inputSourcesMap.get(event.inputSource);
 
-				if (controller) {
+				if (controller !== undefined) {
 					controller.dispatchEvent({
 						type: event.type,
 						data: event.inputSource
@@ -18334,7 +18335,9 @@
 
 			function onSessionEnd() {
 				inputSourcesMap.forEach(function (controller, inputSource) {
-					controller.disconnect(inputSource);
+					if (controller !== undefined) {
+						controller.disconnect(inputSource);
+					}
 				});
 				inputSourcesMap.clear();
 				_currentDepthNear = null;
@@ -20489,11 +20492,6 @@
 		};
 
 		this.copyFramebufferToTexture = function (position, texture, level = 0) {
-			if (texture.isFramebufferTexture !== true) {
-				console.error('THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.');
-				return;
-			}
-
 			const levelScale = Math.pow(2, -level);
 			const width = Math.floor(texture.image.width * levelScale);
 			const height = Math.floor(texture.image.height * levelScale);
@@ -25512,6 +25510,7 @@
 			data.shapes.push(shapes.uuid);
 		}
 
+		data.options = Object.assign({}, options);
 		if (options.extrudePath !== undefined) data.options.extrudePath = options.extrudePath.toJSON();
 		return data;
 	}

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
build/three.min.js


+ 11 - 11
build/three.module.js

@@ -3,7 +3,7 @@
  * Copyright 2010-2022 Three.js Authors
  * SPDX-License-Identifier: MIT
  */
-const REVISION = '140';
+const REVISION = '141dev';
 const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
 const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
 const CullFaceNone = 0;
@@ -3416,7 +3416,8 @@ class WebGLRenderTarget extends EventDispatcher {
 
 		// ensure image object is not shared, see #20328
 
-		this.texture.image = Object.assign( {}, source.texture.image );
+		const image = Object.assign( {}, source.texture.image );
+		this.texture.source = new Source( image );
 
 		this.depthBuffer = source.depthBuffer;
 		this.stencilBuffer = source.stencilBuffer;
@@ -24869,7 +24870,7 @@ class WebXRManager extends EventDispatcher {
 
 			const controller = inputSourcesMap.get( event.inputSource );
 
-			if ( controller ) {
+			if ( controller !== undefined ) {
 
 				controller.dispatchEvent( { type: event.type, data: event.inputSource } );
 
@@ -24881,7 +24882,11 @@ class WebXRManager extends EventDispatcher {
 
 			inputSourcesMap.forEach( function ( controller, inputSource ) {
 
-				controller.disconnect( inputSource );
+				if ( controller !== undefined ) {
+
+					controller.disconnect( inputSource );
+
+				}
 
 			} );
 
@@ -28034,13 +28039,6 @@ function WebGLRenderer( parameters = {} ) {
 
 	this.copyFramebufferToTexture = function ( position, texture, level = 0 ) {
 
-		if ( texture.isFramebufferTexture !== true ) {
-
-			console.error( 'THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.' );
-			return;
-
-		}
-
 		const levelScale = Math.pow( 2, - level );
 		const width = Math.floor( texture.image.width * levelScale );
 		const height = Math.floor( texture.image.height * levelScale );
@@ -35193,6 +35191,8 @@ function toJSON$1( shapes, options, data ) {
 
 	}
 
+	data.options = Object.assign( {}, options );
+
 	if ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON();
 
 	return data;

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff