Pārlūkot izejas kodu

Updated builds.

Mugen87 8 mēneši atpakaļ
vecāks
revīzija
98a7c923df

+ 99 - 33
build/three.cjs

@@ -14198,34 +14198,47 @@ class Object3D extends EventDispatcher {
 			object.drawRanges = this._drawRanges;
 			object.drawRanges = this._drawRanges;
 			object.reservedRanges = this._reservedRanges;
 			object.reservedRanges = this._reservedRanges;
 
 
-			object.visibility = this._visibility;
-			object.active = this._active;
-			object.bounds = this._bounds.map( bound => ( {
-				boxInitialized: bound.boxInitialized,
-				boxMin: bound.box.min.toArray(),
-				boxMax: bound.box.max.toArray(),
-
-				sphereInitialized: bound.sphereInitialized,
-				sphereRadius: bound.sphere.radius,
-				sphereCenter: bound.sphere.center.toArray()
+			object.geometryInfo = this._geometryInfo.map( info => ( {
+				...info,
+				boundingBox: info.boundingBox ? {
+					min: info.boundingBox.min.toArray(),
+					max: info.boundingBox.max.toArray()
+				} : undefined,
+				boundingSphere: info.boundingSphere ? {
+					radius: info.boundingSphere.radius,
+					center: info.boundingSphere.center.toArray()
+				} : undefined
 			} ) );
 			} ) );
+			object.instanceInfo = this._instanceInfo.map( info => ( { ...info } ) );
+
+			object.availableInstanceIds = this._availableInstanceIds.slice();
+			object.availableGeometryIds = this._availableGeometryIds.slice();
+
+			object.nextIndexStart = this._nextIndexStart;
+			object.nextVertexStart = this._nextVertexStart;
+			object.geometryCount = this._geometryCount;
 
 
 			object.maxInstanceCount = this._maxInstanceCount;
 			object.maxInstanceCount = this._maxInstanceCount;
 			object.maxVertexCount = this._maxVertexCount;
 			object.maxVertexCount = this._maxVertexCount;
 			object.maxIndexCount = this._maxIndexCount;
 			object.maxIndexCount = this._maxIndexCount;
 
 
 			object.geometryInitialized = this._geometryInitialized;
 			object.geometryInitialized = this._geometryInitialized;
-			object.geometryCount = this._geometryCount;
 
 
 			object.matricesTexture = this._matricesTexture.toJSON( meta );
 			object.matricesTexture = this._matricesTexture.toJSON( meta );
 
 
-			if ( this._colorsTexture !== null ) object.colorsTexture = this._colorsTexture.toJSON( meta );
+			object.indirectTexture = this._indirectTexture.toJSON( meta );
+
+			if ( this._colorsTexture !== null ) {
+
+				object.colorsTexture = this._colorsTexture.toJSON( meta );
+
+			}
 
 
 			if ( this.boundingSphere !== null ) {
 			if ( this.boundingSphere !== null ) {
 
 
 				object.boundingSphere = {
 				object.boundingSphere = {
-					center: object.boundingSphere.center.toArray(),
-					radius: object.boundingSphere.radius
+					center: this.boundingSphere.center.toArray(),
+					radius: this.boundingSphere.radius
 				};
 				};
 
 
 			}
 			}
@@ -14233,8 +14246,8 @@ class Object3D extends EventDispatcher {
 			if ( this.boundingBox !== null ) {
 			if ( this.boundingBox !== null ) {
 
 
 				object.boundingBox = {
 				object.boundingBox = {
-					min: object.boundingBox.min.toArray(),
-					max: object.boundingBox.max.toArray()
+					min: this.boundingBox.min.toArray(),
+					max: this.boundingBox.max.toArray()
 				};
 				};
 
 
 			}
 			}
@@ -27993,15 +28006,24 @@ class BatchedMesh extends Mesh {
 		} ) );
 		} ) );
 		this._instanceInfo = source._instanceInfo.map( info => ( { ...info } ) );
 		this._instanceInfo = source._instanceInfo.map( info => ( { ...info } ) );
 
 
+		this._availableInstanceIds = source._availableInstanceIds.slice();
+		this._availableGeometryIds = source._availableGeometryIds.slice();
+
+		this._nextIndexStart = source._nextIndexStart;
+		this._nextVertexStart = source._nextVertexStart;
+		this._geometryCount = source._geometryCount;
+
 		this._maxInstanceCount = source._maxInstanceCount;
 		this._maxInstanceCount = source._maxInstanceCount;
 		this._maxVertexCount = source._maxVertexCount;
 		this._maxVertexCount = source._maxVertexCount;
 		this._maxIndexCount = source._maxIndexCount;
 		this._maxIndexCount = source._maxIndexCount;
 
 
 		this._geometryInitialized = source._geometryInitialized;
 		this._geometryInitialized = source._geometryInitialized;
-		this._geometryCount = source._geometryCount;
 		this._multiDrawCounts = source._multiDrawCounts.slice();
 		this._multiDrawCounts = source._multiDrawCounts.slice();
 		this._multiDrawStarts = source._multiDrawStarts.slice();
 		this._multiDrawStarts = source._multiDrawStarts.slice();
 
 
+		this._indirectTexture = source._indirectTexture.clone();
+		this._indirectTexture.image.data = this._indirectTexture.image.data.slice();
+
 		this._matricesTexture = source._matricesTexture.clone();
 		this._matricesTexture = source._matricesTexture.clone();
 		this._matricesTexture.image.data = this._matricesTexture.image.data.slice();
 		this._matricesTexture.image.data = this._matricesTexture.image.data.slice();
 
 
@@ -44800,6 +44822,14 @@ class LightShadow {
 		 */
 		 */
 		this.mapSize = new Vector2( 512, 512 );
 		this.mapSize = new Vector2( 512, 512 );
 
 
+		/**
+		 * The type of shadow texture. The default is `UnsignedByteType`.
+		 *
+		 * @type {number}
+		 * @default UnsignedByteType
+		 */
+		this.mapType = UnsignedByteType;
+
 		/**
 		/**
 		 * The depth map generated using the internal camera; a location beyond a
 		 * The depth map generated using the internal camera; a location beyond a
 		 * pixel's depth is in shadow. Computed internally during rendering.
 		 * pixel's depth is in shadow. Computed internally during rendering.
@@ -48083,37 +48113,73 @@ class ObjectLoader extends Loader {
 				object._drawRanges = data.drawRanges;
 				object._drawRanges = data.drawRanges;
 				object._reservedRanges = data.reservedRanges;
 				object._reservedRanges = data.reservedRanges;
 
 
-				object._visibility = data.visibility;
-				object._active = data.active;
-				object._bounds = data.bounds.map( bound => {
+				object._geometryInfo = data.geometryInfo.map( info => {
 
 
-					const box = new Box3();
-					box.min.fromArray( bound.boxMin );
-					box.max.fromArray( bound.boxMax );
+					let box = null;
+					let sphere = null;
+					if ( info.boundingBox !== undefined ) {
 
 
-					const sphere = new Sphere();
-					sphere.radius = bound.sphereRadius;
-					sphere.center.fromArray( bound.sphereCenter );
+						box = new Box3();
+						box.min.fromArray( info.boundingBox.min );
+						box.max.fromArray( info.boundingBox.max );
 
 
-					return {
-						boxInitialized: bound.boxInitialized,
-						box: box,
+					}
+
+					if ( info.boundingSphere !== undefined ) {
 
 
-						sphereInitialized: bound.sphereInitialized,
-						sphere: sphere
+						sphere = new Sphere();
+						sphere.radius = info.boundingSphere.radius;
+						sphere.center.fromArray( info.boundingSphere.center );
+
+					}
+
+					return {
+						...info,
+						boundingBox: box,
+						boundingSphere: sphere
 					};
 					};
 
 
 				} );
 				} );
+				object._instanceInfo = data.instanceInfo;
+
+				object._availableInstanceIds = data._availableInstanceIds;
+				object._availableGeometryIds = data._availableGeometryIds;
+
+				object._nextIndexStart = data.nextIndexStart;
+				object._nextVertexStart = data.nextVertexStart;
+				object._geometryCount = data.geometryCount;
 
 
 				object._maxInstanceCount = data.maxInstanceCount;
 				object._maxInstanceCount = data.maxInstanceCount;
 				object._maxVertexCount = data.maxVertexCount;
 				object._maxVertexCount = data.maxVertexCount;
 				object._maxIndexCount = data.maxIndexCount;
 				object._maxIndexCount = data.maxIndexCount;
 
 
 				object._geometryInitialized = data.geometryInitialized;
 				object._geometryInitialized = data.geometryInitialized;
-				object._geometryCount = data.geometryCount;
 
 
 				object._matricesTexture = getTexture( data.matricesTexture.uuid );
 				object._matricesTexture = getTexture( data.matricesTexture.uuid );
-				if ( data.colorsTexture !== undefined ) object._colorsTexture = getTexture( data.colorsTexture.uuid );
+
+				object._indirectTexture = getTexture( data.indirectTexture.uuid );
+
+				if ( data.colorsTexture !== undefined ) {
+
+					object._colorsTexture = getTexture( data.colorsTexture.uuid );
+
+				}
+
+				if ( data.boundingSphere !== undefined ) {
+
+					object.boundingSphere = new Sphere();
+					object.boundingSphere.center.fromArray( data.boundingSphere.center );
+					object.boundingSphere.radius = data.boundingSphere.radius;
+
+				}
+
+				if ( data.boundingBox !== undefined ) {
+
+					object.boundingBox = new Box3();
+					object.boundingBox.min.fromArray( data.boundingBox.min );
+					object.boundingBox.max.fromArray( data.boundingBox.max );
+
+				}
 
 
 				break;
 				break;
 
 

+ 99 - 33
build/three.core.js

@@ -14196,34 +14196,47 @@ class Object3D extends EventDispatcher {
 			object.drawRanges = this._drawRanges;
 			object.drawRanges = this._drawRanges;
 			object.reservedRanges = this._reservedRanges;
 			object.reservedRanges = this._reservedRanges;
 
 
-			object.visibility = this._visibility;
-			object.active = this._active;
-			object.bounds = this._bounds.map( bound => ( {
-				boxInitialized: bound.boxInitialized,
-				boxMin: bound.box.min.toArray(),
-				boxMax: bound.box.max.toArray(),
-
-				sphereInitialized: bound.sphereInitialized,
-				sphereRadius: bound.sphere.radius,
-				sphereCenter: bound.sphere.center.toArray()
+			object.geometryInfo = this._geometryInfo.map( info => ( {
+				...info,
+				boundingBox: info.boundingBox ? {
+					min: info.boundingBox.min.toArray(),
+					max: info.boundingBox.max.toArray()
+				} : undefined,
+				boundingSphere: info.boundingSphere ? {
+					radius: info.boundingSphere.radius,
+					center: info.boundingSphere.center.toArray()
+				} : undefined
 			} ) );
 			} ) );
+			object.instanceInfo = this._instanceInfo.map( info => ( { ...info } ) );
+
+			object.availableInstanceIds = this._availableInstanceIds.slice();
+			object.availableGeometryIds = this._availableGeometryIds.slice();
+
+			object.nextIndexStart = this._nextIndexStart;
+			object.nextVertexStart = this._nextVertexStart;
+			object.geometryCount = this._geometryCount;
 
 
 			object.maxInstanceCount = this._maxInstanceCount;
 			object.maxInstanceCount = this._maxInstanceCount;
 			object.maxVertexCount = this._maxVertexCount;
 			object.maxVertexCount = this._maxVertexCount;
 			object.maxIndexCount = this._maxIndexCount;
 			object.maxIndexCount = this._maxIndexCount;
 
 
 			object.geometryInitialized = this._geometryInitialized;
 			object.geometryInitialized = this._geometryInitialized;
-			object.geometryCount = this._geometryCount;
 
 
 			object.matricesTexture = this._matricesTexture.toJSON( meta );
 			object.matricesTexture = this._matricesTexture.toJSON( meta );
 
 
-			if ( this._colorsTexture !== null ) object.colorsTexture = this._colorsTexture.toJSON( meta );
+			object.indirectTexture = this._indirectTexture.toJSON( meta );
+
+			if ( this._colorsTexture !== null ) {
+
+				object.colorsTexture = this._colorsTexture.toJSON( meta );
+
+			}
 
 
 			if ( this.boundingSphere !== null ) {
 			if ( this.boundingSphere !== null ) {
 
 
 				object.boundingSphere = {
 				object.boundingSphere = {
-					center: object.boundingSphere.center.toArray(),
-					radius: object.boundingSphere.radius
+					center: this.boundingSphere.center.toArray(),
+					radius: this.boundingSphere.radius
 				};
 				};
 
 
 			}
 			}
@@ -14231,8 +14244,8 @@ class Object3D extends EventDispatcher {
 			if ( this.boundingBox !== null ) {
 			if ( this.boundingBox !== null ) {
 
 
 				object.boundingBox = {
 				object.boundingBox = {
-					min: object.boundingBox.min.toArray(),
-					max: object.boundingBox.max.toArray()
+					min: this.boundingBox.min.toArray(),
+					max: this.boundingBox.max.toArray()
 				};
 				};
 
 
 			}
 			}
@@ -27991,15 +28004,24 @@ class BatchedMesh extends Mesh {
 		} ) );
 		} ) );
 		this._instanceInfo = source._instanceInfo.map( info => ( { ...info } ) );
 		this._instanceInfo = source._instanceInfo.map( info => ( { ...info } ) );
 
 
+		this._availableInstanceIds = source._availableInstanceIds.slice();
+		this._availableGeometryIds = source._availableGeometryIds.slice();
+
+		this._nextIndexStart = source._nextIndexStart;
+		this._nextVertexStart = source._nextVertexStart;
+		this._geometryCount = source._geometryCount;
+
 		this._maxInstanceCount = source._maxInstanceCount;
 		this._maxInstanceCount = source._maxInstanceCount;
 		this._maxVertexCount = source._maxVertexCount;
 		this._maxVertexCount = source._maxVertexCount;
 		this._maxIndexCount = source._maxIndexCount;
 		this._maxIndexCount = source._maxIndexCount;
 
 
 		this._geometryInitialized = source._geometryInitialized;
 		this._geometryInitialized = source._geometryInitialized;
-		this._geometryCount = source._geometryCount;
 		this._multiDrawCounts = source._multiDrawCounts.slice();
 		this._multiDrawCounts = source._multiDrawCounts.slice();
 		this._multiDrawStarts = source._multiDrawStarts.slice();
 		this._multiDrawStarts = source._multiDrawStarts.slice();
 
 
+		this._indirectTexture = source._indirectTexture.clone();
+		this._indirectTexture.image.data = this._indirectTexture.image.data.slice();
+
 		this._matricesTexture = source._matricesTexture.clone();
 		this._matricesTexture = source._matricesTexture.clone();
 		this._matricesTexture.image.data = this._matricesTexture.image.data.slice();
 		this._matricesTexture.image.data = this._matricesTexture.image.data.slice();
 
 
@@ -44798,6 +44820,14 @@ class LightShadow {
 		 */
 		 */
 		this.mapSize = new Vector2( 512, 512 );
 		this.mapSize = new Vector2( 512, 512 );
 
 
+		/**
+		 * The type of shadow texture. The default is `UnsignedByteType`.
+		 *
+		 * @type {number}
+		 * @default UnsignedByteType
+		 */
+		this.mapType = UnsignedByteType;
+
 		/**
 		/**
 		 * The depth map generated using the internal camera; a location beyond a
 		 * The depth map generated using the internal camera; a location beyond a
 		 * pixel's depth is in shadow. Computed internally during rendering.
 		 * pixel's depth is in shadow. Computed internally during rendering.
@@ -48081,37 +48111,73 @@ class ObjectLoader extends Loader {
 				object._drawRanges = data.drawRanges;
 				object._drawRanges = data.drawRanges;
 				object._reservedRanges = data.reservedRanges;
 				object._reservedRanges = data.reservedRanges;
 
 
-				object._visibility = data.visibility;
-				object._active = data.active;
-				object._bounds = data.bounds.map( bound => {
+				object._geometryInfo = data.geometryInfo.map( info => {
 
 
-					const box = new Box3();
-					box.min.fromArray( bound.boxMin );
-					box.max.fromArray( bound.boxMax );
+					let box = null;
+					let sphere = null;
+					if ( info.boundingBox !== undefined ) {
 
 
-					const sphere = new Sphere();
-					sphere.radius = bound.sphereRadius;
-					sphere.center.fromArray( bound.sphereCenter );
+						box = new Box3();
+						box.min.fromArray( info.boundingBox.min );
+						box.max.fromArray( info.boundingBox.max );
 
 
-					return {
-						boxInitialized: bound.boxInitialized,
-						box: box,
+					}
+
+					if ( info.boundingSphere !== undefined ) {
 
 
-						sphereInitialized: bound.sphereInitialized,
-						sphere: sphere
+						sphere = new Sphere();
+						sphere.radius = info.boundingSphere.radius;
+						sphere.center.fromArray( info.boundingSphere.center );
+
+					}
+
+					return {
+						...info,
+						boundingBox: box,
+						boundingSphere: sphere
 					};
 					};
 
 
 				} );
 				} );
+				object._instanceInfo = data.instanceInfo;
+
+				object._availableInstanceIds = data._availableInstanceIds;
+				object._availableGeometryIds = data._availableGeometryIds;
+
+				object._nextIndexStart = data.nextIndexStart;
+				object._nextVertexStart = data.nextVertexStart;
+				object._geometryCount = data.geometryCount;
 
 
 				object._maxInstanceCount = data.maxInstanceCount;
 				object._maxInstanceCount = data.maxInstanceCount;
 				object._maxVertexCount = data.maxVertexCount;
 				object._maxVertexCount = data.maxVertexCount;
 				object._maxIndexCount = data.maxIndexCount;
 				object._maxIndexCount = data.maxIndexCount;
 
 
 				object._geometryInitialized = data.geometryInitialized;
 				object._geometryInitialized = data.geometryInitialized;
-				object._geometryCount = data.geometryCount;
 
 
 				object._matricesTexture = getTexture( data.matricesTexture.uuid );
 				object._matricesTexture = getTexture( data.matricesTexture.uuid );
-				if ( data.colorsTexture !== undefined ) object._colorsTexture = getTexture( data.colorsTexture.uuid );
+
+				object._indirectTexture = getTexture( data.indirectTexture.uuid );
+
+				if ( data.colorsTexture !== undefined ) {
+
+					object._colorsTexture = getTexture( data.colorsTexture.uuid );
+
+				}
+
+				if ( data.boundingSphere !== undefined ) {
+
+					object.boundingSphere = new Sphere();
+					object.boundingSphere.center.fromArray( data.boundingSphere.center );
+					object.boundingSphere.radius = data.boundingSphere.radius;
+
+				}
+
+				if ( data.boundingBox !== undefined ) {
+
+					object.boundingBox = new Box3();
+					object.boundingBox.min.fromArray( data.boundingBox.min );
+					object.boundingBox.max.fromArray( data.boundingBox.max );
+
+				}
 
 
 				break;
 				break;
 
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
build/three.core.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 439 - 359
build/three.webgpu.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
build/three.webgpu.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 439 - 359
build/three.webgpu.nodes.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
build/three.webgpu.nodes.min.js


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels

粤ICP备19079148号