Selaa lähdekoodia

Updated builds.

Mugen87 2 vuotta sitten
vanhempi
commit
200b0a249d
4 muutettua tiedostoa jossa 78 lisäystä ja 131 poistoa
  1. 24 40
      build/three.cjs
  2. 24 40
      build/three.js
  3. 0 0
      build/three.min.js
  4. 30 51
      build/three.module.js

+ 24 - 40
build/three.cjs

@@ -7,7 +7,7 @@
 
 Object.defineProperty(exports, '__esModule', { value: true });
 
-const REVISION = '146';
+const REVISION = '147dev';
 const MOUSE = {
 	LEFT: 0,
 	MIDDLE: 1,
@@ -17407,22 +17407,6 @@ function WebGLRenderer(parameters = {}) {
 	this.toneMapping = NoToneMapping;
 	this.toneMappingExposure = 1.0;
 
-	//
-
-	Object.defineProperties(this, {
-		// @deprecated since r136, 0e21088102b4de7e0a0a33140620b7a3424b9e6d
-
-		gammaFactor: {
-			get: function () {
-				console.warn('THREE.WebGLRenderer: .gammaFactor has been removed.');
-				return 2;
-			},
-			set: function () {
-				console.warn('THREE.WebGLRenderer: .gammaFactor has been removed.');
-			}
-		}
-	});
-
 	// internal properties
 
 	const _this = this;
@@ -17795,23 +17779,34 @@ function WebGLRenderer(parameters = {}) {
 		//
 
 		let index = geometry.index;
-		const position = geometry.attributes.position;
+		let rangeFactor = 1;
+		if (material.wireframe === true) {
+			index = geometries.getWireframeAttribute(geometry);
+			rangeFactor = 2;
+		}
 
 		//
 
-		if (index === null) {
-			if (position === undefined || position.count === 0) return;
-		} else if (index.count === 0) {
-			return;
+		const drawRange = geometry.drawRange;
+		const position = geometry.attributes.position;
+		let drawStart = drawRange.start * rangeFactor;
+		let drawEnd = (drawRange.start + drawRange.count) * rangeFactor;
+		if (group !== null) {
+			drawStart = Math.max(drawStart, group.start * rangeFactor);
+			drawEnd = Math.min(drawEnd, (group.start + group.count) * rangeFactor);
 		}
+		if (index !== null) {
+			drawStart = Math.max(drawStart, 0);
+			drawEnd = Math.min(drawEnd, index.count);
+		} else if (position !== undefined && position !== null) {
+			drawStart = Math.max(drawStart, 0);
+			drawEnd = Math.min(drawEnd, position.count);
+		}
+		const drawCount = drawEnd - drawStart;
+		if (drawCount < 0 || drawCount === Infinity) return;
 
 		//
 
-		let rangeFactor = 1;
-		if (material.wireframe === true) {
-			index = geometries.getWireframeAttribute(geometry);
-			rangeFactor = 2;
-		}
 		bindingStates.setup(object, material, program, geometry, index);
 		let attribute;
 		let renderer = bufferRenderer;
@@ -17823,18 +17818,6 @@ function WebGLRenderer(parameters = {}) {
 
 		//
 
-		const dataCount = index !== null ? index.count : position.count;
-		const rangeStart = geometry.drawRange.start * rangeFactor;
-		const rangeCount = geometry.drawRange.count * rangeFactor;
-		const groupStart = group !== null ? group.start * rangeFactor : 0;
-		const groupCount = group !== null ? group.count * rangeFactor : Infinity;
-		const drawStart = Math.max(rangeStart, groupStart);
-		const drawEnd = Math.min(dataCount, rangeStart + rangeCount, groupStart + groupCount) - 1;
-		const drawCount = Math.max(0, drawEnd - drawStart + 1);
-		if (drawCount === 0) return;
-
-		//
-
 		if (object.isMesh) {
 			if (material.wireframe === true) {
 				state.setLineWidth(material.wireframeLinewidth * getTargetPixelRatio());
@@ -17862,7 +17845,8 @@ function WebGLRenderer(parameters = {}) {
 		if (object.isInstancedMesh) {
 			renderer.renderInstances(drawStart, drawCount, object.count);
 		} else if (geometry.isInstancedBufferGeometry) {
-			const instanceCount = Math.min(geometry.instanceCount, geometry._maxInstanceCount);
+			const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;
+			const instanceCount = Math.min(geometry.instanceCount, maxInstanceCount);
 			renderer.renderInstances(drawStart, drawCount, instanceCount);
 		} else {
 			renderer.render(drawStart, drawCount);

+ 24 - 40
build/three.js

@@ -9,7 +9,7 @@
 	(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));
 })(this, (function (exports) { 'use strict';
 
-	const REVISION = '146';
+	const REVISION = '147dev';
 	const MOUSE = {
 		LEFT: 0,
 		MIDDLE: 1,
@@ -17409,22 +17409,6 @@
 		this.toneMapping = NoToneMapping;
 		this.toneMappingExposure = 1.0;
 
-		//
-
-		Object.defineProperties(this, {
-			// @deprecated since r136, 0e21088102b4de7e0a0a33140620b7a3424b9e6d
-
-			gammaFactor: {
-				get: function () {
-					console.warn('THREE.WebGLRenderer: .gammaFactor has been removed.');
-					return 2;
-				},
-				set: function () {
-					console.warn('THREE.WebGLRenderer: .gammaFactor has been removed.');
-				}
-			}
-		});
-
 		// internal properties
 
 		const _this = this;
@@ -17797,23 +17781,34 @@
 			//
 
 			let index = geometry.index;
-			const position = geometry.attributes.position;
+			let rangeFactor = 1;
+			if (material.wireframe === true) {
+				index = geometries.getWireframeAttribute(geometry);
+				rangeFactor = 2;
+			}
 
 			//
 
-			if (index === null) {
-				if (position === undefined || position.count === 0) return;
-			} else if (index.count === 0) {
-				return;
+			const drawRange = geometry.drawRange;
+			const position = geometry.attributes.position;
+			let drawStart = drawRange.start * rangeFactor;
+			let drawEnd = (drawRange.start + drawRange.count) * rangeFactor;
+			if (group !== null) {
+				drawStart = Math.max(drawStart, group.start * rangeFactor);
+				drawEnd = Math.min(drawEnd, (group.start + group.count) * rangeFactor);
 			}
+			if (index !== null) {
+				drawStart = Math.max(drawStart, 0);
+				drawEnd = Math.min(drawEnd, index.count);
+			} else if (position !== undefined && position !== null) {
+				drawStart = Math.max(drawStart, 0);
+				drawEnd = Math.min(drawEnd, position.count);
+			}
+			const drawCount = drawEnd - drawStart;
+			if (drawCount < 0 || drawCount === Infinity) return;
 
 			//
 
-			let rangeFactor = 1;
-			if (material.wireframe === true) {
-				index = geometries.getWireframeAttribute(geometry);
-				rangeFactor = 2;
-			}
 			bindingStates.setup(object, material, program, geometry, index);
 			let attribute;
 			let renderer = bufferRenderer;
@@ -17825,18 +17820,6 @@
 
 			//
 
-			const dataCount = index !== null ? index.count : position.count;
-			const rangeStart = geometry.drawRange.start * rangeFactor;
-			const rangeCount = geometry.drawRange.count * rangeFactor;
-			const groupStart = group !== null ? group.start * rangeFactor : 0;
-			const groupCount = group !== null ? group.count * rangeFactor : Infinity;
-			const drawStart = Math.max(rangeStart, groupStart);
-			const drawEnd = Math.min(dataCount, rangeStart + rangeCount, groupStart + groupCount) - 1;
-			const drawCount = Math.max(0, drawEnd - drawStart + 1);
-			if (drawCount === 0) return;
-
-			//
-
 			if (object.isMesh) {
 				if (material.wireframe === true) {
 					state.setLineWidth(material.wireframeLinewidth * getTargetPixelRatio());
@@ -17864,7 +17847,8 @@
 			if (object.isInstancedMesh) {
 				renderer.renderInstances(drawStart, drawCount, object.count);
 			} else if (geometry.isInstancedBufferGeometry) {
-				const instanceCount = Math.min(geometry.instanceCount, geometry._maxInstanceCount);
+				const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;
+				const instanceCount = Math.min(geometry.instanceCount, maxInstanceCount);
 				renderer.renderInstances(drawStart, drawCount, instanceCount);
 			} else {
 				renderer.render(drawStart, drawCount);

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
build/three.min.js


+ 30 - 51
build/three.module.js

@@ -3,7 +3,7 @@
  * Copyright 2010-2022 Three.js Authors
  * SPDX-License-Identifier: MIT
  */
-const REVISION = '146';
+const REVISION = '147dev';
 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;
@@ -26845,28 +26845,6 @@ function WebGLRenderer( parameters = {} ) {
 	this.toneMapping = NoToneMapping;
 	this.toneMappingExposure = 1.0;
 
-	//
-
-	Object.defineProperties( this, {
-
-		// @deprecated since r136, 0e21088102b4de7e0a0a33140620b7a3424b9e6d
-
-		gammaFactor: {
-			get: function () {
-
-				console.warn( 'THREE.WebGLRenderer: .gammaFactor has been removed.' );
-				return 2;
-
-			},
-			set: function () {
-
-				console.warn( 'THREE.WebGLRenderer: .gammaFactor has been removed.' );
-
-			}
-		}
-
-	} );
-
 	// internal properties
 
 	const _this = this;
@@ -27433,31 +27411,48 @@ function WebGLRenderer( parameters = {} ) {
 		//
 
 		let index = geometry.index;
-		const position = geometry.attributes.position;
+		let rangeFactor = 1;
+
+		if ( material.wireframe === true ) {
+
+			index = geometries.getWireframeAttribute( geometry );
+			rangeFactor = 2;
+
+		}
 
 		//
 
-		if ( index === null ) {
+		const drawRange = geometry.drawRange;
+		const position = geometry.attributes.position;
 
-			if ( position === undefined || position.count === 0 ) return;
+		let drawStart = drawRange.start * rangeFactor;
+		let drawEnd = ( drawRange.start + drawRange.count ) * rangeFactor;
 
-		} else if ( index.count === 0 ) {
+		if ( group !== null ) {
 
-			return;
+			drawStart = Math.max( drawStart, group.start * rangeFactor );
+			drawEnd = Math.min( drawEnd, ( group.start + group.count ) * rangeFactor );
 
 		}
 
-		//
+		if ( index !== null ) {
 
-		let rangeFactor = 1;
+			drawStart = Math.max( drawStart, 0 );
+			drawEnd = Math.min( drawEnd, index.count );
 
-		if ( material.wireframe === true ) {
+		} else if ( position !== undefined && position !== null ) {
 
-			index = geometries.getWireframeAttribute( geometry );
-			rangeFactor = 2;
+			drawStart = Math.max( drawStart, 0 );
+			drawEnd = Math.min( drawEnd, position.count );
 
 		}
 
+		const drawCount = drawEnd - drawStart;
+
+		if ( drawCount < 0 || drawCount === Infinity ) return;
+
+		//
+
 		bindingStates.setup( object, material, program, geometry, index );
 
 		let attribute;
@@ -27474,23 +27469,6 @@ function WebGLRenderer( parameters = {} ) {
 
 		//
 
-		const dataCount = ( index !== null ) ? index.count : position.count;
-
-		const rangeStart = geometry.drawRange.start * rangeFactor;
-		const rangeCount = geometry.drawRange.count * rangeFactor;
-
-		const groupStart = group !== null ? group.start * rangeFactor : 0;
-		const groupCount = group !== null ? group.count * rangeFactor : Infinity;
-
-		const drawStart = Math.max( rangeStart, groupStart );
-		const drawEnd = Math.min( dataCount, rangeStart + rangeCount, groupStart + groupCount ) - 1;
-
-		const drawCount = Math.max( 0, drawEnd - drawStart + 1 );
-
-		if ( drawCount === 0 ) return;
-
-		//
-
 		if ( object.isMesh ) {
 
 			if ( material.wireframe === true ) {
@@ -27542,7 +27520,8 @@ function WebGLRenderer( parameters = {} ) {
 
 		} else if ( geometry.isInstancedBufferGeometry ) {
 
-			const instanceCount = Math.min( geometry.instanceCount, geometry._maxInstanceCount );
+			const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity;
+			const instanceCount = Math.min( geometry.instanceCount, maxInstanceCount );
 
 			renderer.renderInstances( drawStart, drawCount, instanceCount );
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä