浏览代码

Updated builds.

Mugen87 1 年之前
父节点
当前提交
58302da86d
共有 5 个文件被更改,包括 389 次插入51 次删除
  1. 7 7
      build/three.cjs
  2. 7 7
      build/three.module.js
  3. 0 0
      build/three.module.min.js
  4. 375 37
      build/three.webgpu.js
  5. 0 0
      build/three.webgpu.min.js

+ 7 - 7
build/three.cjs

@@ -28407,27 +28407,27 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
 
 
 					const info = getUniformSize( value );
 					const info = getUniformSize( value );
 
 
-					// Calculate the chunk offset
-					const chunkOffsetUniform = offset % chunkSize;
+					const chunkOffset = offset % chunkSize; // offset in the current chunk
+					const chunkPadding = chunkOffset % info.boundary; // required padding to match boundary
+					const chunkStart = chunkOffset + chunkPadding; // the start position in the current chunk for the data
+
+					offset += chunkPadding;
 
 
 					// Check for chunk overflow
 					// Check for chunk overflow
-					if ( chunkOffsetUniform !== 0 && ( chunkSize - chunkOffsetUniform ) < info.boundary ) {
+					if ( chunkStart !== 0 && ( chunkSize - chunkStart ) < info.storage ) {
 
 
 						// Add padding and adjust offset
 						// Add padding and adjust offset
-						offset += ( chunkSize - chunkOffsetUniform );
+						offset += ( chunkSize - chunkStart );
 
 
 					}
 					}
 
 
 					// the following two properties will be used for partial buffer updates
 					// the following two properties will be used for partial buffer updates
-
 					uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT );
 					uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT );
 					uniform.__offset = offset;
 					uniform.__offset = offset;
 
 
-
 					// Update the global offset
 					// Update the global offset
 					offset += info.storage;
 					offset += info.storage;
 
 
-
 				}
 				}
 
 
 			}
 			}

+ 7 - 7
build/three.module.js

@@ -28405,27 +28405,27 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
 
 
 					const info = getUniformSize( value );
 					const info = getUniformSize( value );
 
 
-					// Calculate the chunk offset
-					const chunkOffsetUniform = offset % chunkSize;
+					const chunkOffset = offset % chunkSize; // offset in the current chunk
+					const chunkPadding = chunkOffset % info.boundary; // required padding to match boundary
+					const chunkStart = chunkOffset + chunkPadding; // the start position in the current chunk for the data
+
+					offset += chunkPadding;
 
 
 					// Check for chunk overflow
 					// Check for chunk overflow
-					if ( chunkOffsetUniform !== 0 && ( chunkSize - chunkOffsetUniform ) < info.boundary ) {
+					if ( chunkStart !== 0 && ( chunkSize - chunkStart ) < info.storage ) {
 
 
 						// Add padding and adjust offset
 						// Add padding and adjust offset
-						offset += ( chunkSize - chunkOffsetUniform );
+						offset += ( chunkSize - chunkStart );
 
 
 					}
 					}
 
 
 					// the following two properties will be used for partial buffer updates
 					// the following two properties will be used for partial buffer updates
-
 					uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT );
 					uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT );
 					uniform.__offset = offset;
 					uniform.__offset = offset;
 
 
-
 					// Update the global offset
 					// Update the global offset
 					offset += info.storage;
 					offset += info.storage;
 
 
-
 				}
 				}
 
 
 			}
 			}

文件差异内容过多而无法显示
+ 0 - 0
build/three.module.min.js


文件差异内容过多而无法显示
+ 375 - 37
build/three.webgpu.js


文件差异内容过多而无法显示
+ 0 - 0
build/three.webgpu.min.js


部分文件因为文件数量过多而无法显示