Przeglądaj źródła

Updated builds.

Mr.doob 3 lat temu
rodzic
commit
6f032e45f6
4 zmienionych plików z 26 dodań i 46 usunięć
  1. 8 14
      build/three.cjs
  2. 8 14
      build/three.js
  3. 0 0
      build/three.min.js
  4. 10 18
      build/three.module.js

+ 8 - 14
build/three.cjs

@@ -9212,7 +9212,6 @@ class CubeCamera extends Object3D {
 		const currentOutputEncoding = renderer.outputEncoding;
 		const currentToneMapping = renderer.toneMapping;
 		const currentXrEnabled = renderer.xr.enabled;
-		renderer.outputEncoding = LinearEncoding;
 		renderer.toneMapping = NoToneMapping;
 		renderer.xr.enabled = false;
 		const generateMipmaps = renderTarget.texture.generateMipmaps;
@@ -13783,16 +13782,6 @@ function PureArrayUniform(id, activeInfo, addr) {
 	this.setValue = getPureArraySetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG
 }
 
-PureArrayUniform.prototype.updateCache = function (data) {
-	const cache = this.cache;
-
-	if (data instanceof Float32Array && cache.length !== data.length) {
-		this.cache = new Float32Array(data.length);
-	}
-
-	copyArray(cache, data);
-};
-
 function StructuredUniform(id) {
 	this.id = id;
 	this.seq = [];
@@ -18303,6 +18292,7 @@ class WebXRManager extends EventDispatcher {
 		let framebufferScaleFactor = 1.0;
 		let referenceSpace = null;
 		let referenceSpaceType = 'local-floor';
+		let customReferenceSpace = null;
 		let pose = null;
 		let glBinding = null;
 		let glProjLayer = null;
@@ -18415,7 +18405,11 @@ class WebXRManager extends EventDispatcher {
 		};
 
 		this.getReferenceSpace = function () {
-			return referenceSpace;
+			return customReferenceSpace || referenceSpace;
+		};
+
+		this.setReferenceSpace = function (space) {
+			customReferenceSpace = space;
 		};
 
 		this.getBaseLayer = function () {
@@ -18688,7 +18682,7 @@ class WebXRManager extends EventDispatcher {
 		let onAnimationFrameCallback = null;
 
 		function onAnimationFrame(time, frame) {
-			pose = frame.getViewerPose(referenceSpace);
+			pose = frame.getViewerPose(customReferenceSpace || referenceSpace);
 			xrFrame = frame;
 
 			if (pose !== null) {
@@ -18745,7 +18739,7 @@ class WebXRManager extends EventDispatcher {
 				const controller = inputSourcesMap.get(inputSource);
 
 				if (controller !== undefined) {
-					controller.update(inputSource, frame, referenceSpace);
+					controller.update(inputSource, frame, customReferenceSpace || referenceSpace);
 				}
 			}
 

+ 8 - 14
build/three.js

@@ -9214,7 +9214,6 @@
 			const currentOutputEncoding = renderer.outputEncoding;
 			const currentToneMapping = renderer.toneMapping;
 			const currentXrEnabled = renderer.xr.enabled;
-			renderer.outputEncoding = LinearEncoding;
 			renderer.toneMapping = NoToneMapping;
 			renderer.xr.enabled = false;
 			const generateMipmaps = renderTarget.texture.generateMipmaps;
@@ -13785,16 +13784,6 @@
 		this.setValue = getPureArraySetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG
 	}
 
-	PureArrayUniform.prototype.updateCache = function (data) {
-		const cache = this.cache;
-
-		if (data instanceof Float32Array && cache.length !== data.length) {
-			this.cache = new Float32Array(data.length);
-		}
-
-		copyArray(cache, data);
-	};
-
 	function StructuredUniform(id) {
 		this.id = id;
 		this.seq = [];
@@ -18305,6 +18294,7 @@
 			let framebufferScaleFactor = 1.0;
 			let referenceSpace = null;
 			let referenceSpaceType = 'local-floor';
+			let customReferenceSpace = null;
 			let pose = null;
 			let glBinding = null;
 			let glProjLayer = null;
@@ -18417,7 +18407,11 @@
 			};
 
 			this.getReferenceSpace = function () {
-				return referenceSpace;
+				return customReferenceSpace || referenceSpace;
+			};
+
+			this.setReferenceSpace = function (space) {
+				customReferenceSpace = space;
 			};
 
 			this.getBaseLayer = function () {
@@ -18690,7 +18684,7 @@
 			let onAnimationFrameCallback = null;
 
 			function onAnimationFrame(time, frame) {
-				pose = frame.getViewerPose(referenceSpace);
+				pose = frame.getViewerPose(customReferenceSpace || referenceSpace);
 				xrFrame = frame;
 
 				if (pose !== null) {
@@ -18747,7 +18741,7 @@
 					const controller = inputSourcesMap.get(inputSource);
 
 					if (controller !== undefined) {
-						controller.update(inputSource, frame, referenceSpace);
+						controller.update(inputSource, frame, customReferenceSpace || referenceSpace);
 					}
 				}
 

Plik diff jest za duży
+ 0 - 0
build/three.min.js


+ 10 - 18
build/three.module.js

@@ -12128,7 +12128,6 @@ class CubeCamera extends Object3D {
 		const currentToneMapping = renderer.toneMapping;
 		const currentXrEnabled = renderer.xr.enabled;
 
-		renderer.outputEncoding = LinearEncoding;
 		renderer.toneMapping = NoToneMapping;
 		renderer.xr.enabled = false;
 
@@ -17996,20 +17995,6 @@ function PureArrayUniform( id, activeInfo, addr ) {
 
 }
 
-PureArrayUniform.prototype.updateCache = function ( data ) {
-
-	const cache = this.cache;
-
-	if ( data instanceof Float32Array && cache.length !== data.length ) {
-
-		this.cache = new Float32Array( data.length );
-
-	}
-
-	copyArray( cache, data );
-
-};
-
 function StructuredUniform( id ) {
 
 	this.id = id;
@@ -24843,6 +24828,7 @@ class WebXRManager extends EventDispatcher {
 
 		let referenceSpace = null;
 		let referenceSpaceType = 'local-floor';
+		let customReferenceSpace = null;
 
 		let pose = null;
 		let glBinding = null;
@@ -25000,7 +24986,13 @@ class WebXRManager extends EventDispatcher {
 
 		this.getReferenceSpace = function () {
 
-			return referenceSpace;
+			return customReferenceSpace || referenceSpace;
+
+		};
+
+		this.setReferenceSpace = function ( space ) {
+
+			customReferenceSpace = space;
 
 		};
 
@@ -25373,7 +25365,7 @@ class WebXRManager extends EventDispatcher {
 
 		function onAnimationFrame( time, frame ) {
 
-			pose = frame.getViewerPose( referenceSpace );
+			pose = frame.getViewerPose( customReferenceSpace || referenceSpace );
 			xrFrame = frame;
 
 			if ( pose !== null ) {
@@ -25460,7 +25452,7 @@ class WebXRManager extends EventDispatcher {
 
 				if ( controller !== undefined ) {
 
-					controller.update( inputSource, frame, referenceSpace );
+					controller.update( inputSource, frame, customReferenceSpace || referenceSpace );
 
 				}
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików