Explorar el Código

Updated builds.

Mr.doob hace 1 año
padre
commit
296e0829aa

+ 40 - 1
build/three.cjs

@@ -10881,7 +10881,9 @@ class BufferGeometry extends EventDispatcher {
 
 		} else {
 
-			for ( let i = 0, l = positionAttribute.count; i < l; i ++ ) {
+			const l = Math.min( points.length, positionAttribute.count ); // make sure data do not exceed buffer size
+
+			for ( let i = 0; i < l; i ++ ) {
 
 				const point = points[ i ];
 				positionAttribute.setXYZ( i, point.x, point.y, point.z || 0 );
@@ -31253,6 +31255,43 @@ class Audio extends Object3D {
 
 	}
 
+	copy( source, recursive ) {
+
+		super.copy( source, recursive );
+
+		if ( source.sourceType !== 'buffer' ) {
+
+			console.warn( 'THREE.Audio: Audio source type cannot be copied.' );
+
+			return this;
+
+		}
+
+		this.autoplay = source.autoplay;
+
+		this.buffer = source.buffer;
+		this.detune = source.detune;
+		this.loop = source.loop;
+		this.loopStart = source.loopStart;
+		this.loopEnd = source.loopEnd;
+		this.offset = source.offset;
+		this.duration = source.duration;
+		this.playbackRate = source.playbackRate;
+		this.hasPlaybackControl = source.hasPlaybackControl;
+		this.sourceType = source.sourceType;
+
+		this.filters = source.filters.slice();
+
+		return this;
+
+	}
+
+	clone( recursive ) {
+
+		return new this.constructor( this.listener ).copy( this, recursive );
+
+	}
+
 }
 
 const _position = /*@__PURE__*/ new Vector3();

+ 40 - 1
build/three.core.js

@@ -10879,7 +10879,9 @@ class BufferGeometry extends EventDispatcher {
 
 		} else {
 
-			for ( let i = 0, l = positionAttribute.count; i < l; i ++ ) {
+			const l = Math.min( points.length, positionAttribute.count ); // make sure data do not exceed buffer size
+
+			for ( let i = 0; i < l; i ++ ) {
 
 				const point = points[ i ];
 				positionAttribute.setXYZ( i, point.x, point.y, point.z || 0 );
@@ -31251,6 +31253,43 @@ class Audio extends Object3D {
 
 	}
 
+	copy( source, recursive ) {
+
+		super.copy( source, recursive );
+
+		if ( source.sourceType !== 'buffer' ) {
+
+			console.warn( 'THREE.Audio: Audio source type cannot be copied.' );
+
+			return this;
+
+		}
+
+		this.autoplay = source.autoplay;
+
+		this.buffer = source.buffer;
+		this.detune = source.detune;
+		this.loop = source.loop;
+		this.loopStart = source.loopStart;
+		this.loopEnd = source.loopEnd;
+		this.offset = source.offset;
+		this.duration = source.duration;
+		this.playbackRate = source.playbackRate;
+		this.hasPlaybackControl = source.hasPlaybackControl;
+		this.sourceType = source.sourceType;
+
+		this.filters = source.filters.slice();
+
+		return this;
+
+	}
+
+	clone( recursive ) {
+
+		return new this.constructor( this.listener ).copy( this, recursive );
+
+	}
+
 }
 
 const _position = /*@__PURE__*/ new Vector3();

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.core.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.webgpu.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.webgpu.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.webgpu.nodes.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/three.webgpu.nodes.min.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio

粤ICP备19079148号