提交 f731f415 编写于 作者: M Mr.doob

Updated builds.

上级 ea7eab84
...@@ -13210,17 +13210,15 @@ ...@@ -13210,17 +13210,15 @@
var vertexCounter = 0; var vertexCounter = 0;
var groupCount = 0; var groupCount = 0;
var ix, iy;
var vector = new Vector3(); var vector = new Vector3();
// generate vertices, normals and uvs // generate vertices, normals and uvs
for ( iy = 0; iy < gridY1; iy ++ ) { for ( var iy = 0; iy < gridY1; iy ++ ) {
var y = iy * segmentHeight - heightHalf; var y = iy * segmentHeight - heightHalf;
for ( ix = 0; ix < gridX1; ix ++ ) { for ( var ix = 0; ix < gridX1; ix ++ ) {
var x = ix * segmentWidth - widthHalf; var x = ix * segmentWidth - widthHalf;
...@@ -13263,14 +13261,14 @@ ...@@ -13263,14 +13261,14 @@
// 2. a single segment consists of two faces // 2. a single segment consists of two faces
// 3. so we need to generate six (2*3) indices per segment // 3. so we need to generate six (2*3) indices per segment
for ( iy = 0; iy < gridY; iy ++ ) { for ( var iy$1 = 0; iy$1 < gridY; iy$1 ++ ) {
for ( ix = 0; ix < gridX; ix ++ ) { for ( var ix$1 = 0; ix$1 < gridX; ix$1 ++ ) {
var a = numberOfVertices + ix + gridX1 * iy; var a = numberOfVertices + ix$1 + gridX1 * iy$1;
var b = numberOfVertices + ix + gridX1 * ( iy + 1 ); var b = numberOfVertices + ix$1 + gridX1 * ( iy$1 + 1 );
var c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 ); var c = numberOfVertices + ( ix$1 + 1 ) + gridX1 * ( iy$1 + 1 );
var d = numberOfVertices + ( ix + 1 ) + gridX1 * iy; var d = numberOfVertices + ( ix$1 + 1 ) + gridX1 * iy$1;
// faces // faces
此差异已折叠。
...@@ -13146,7 +13146,7 @@ class BoxBufferGeometry extends BufferGeometry { ...@@ -13146,7 +13146,7 @@ class BoxBufferGeometry extends BufferGeometry {
depthSegments: depthSegments depthSegments: depthSegments
}; };
var scope = this; const scope = this;
width = width || 1; width = width || 1;
height = height || 1; height = height || 1;
...@@ -13160,15 +13160,15 @@ class BoxBufferGeometry extends BufferGeometry { ...@@ -13160,15 +13160,15 @@ class BoxBufferGeometry extends BufferGeometry {
// buffers // buffers
var indices = []; const indices = [];
var vertices = []; const vertices = [];
var normals = []; const normals = [];
var uvs = []; const uvs = [];
// helper variables // helper variables
var numberOfVertices = 0; let numberOfVertices = 0;
var groupStart = 0; let groupStart = 0;
// build each side of the box geometry // build each side of the box geometry
...@@ -13188,32 +13188,30 @@ class BoxBufferGeometry extends BufferGeometry { ...@@ -13188,32 +13188,30 @@ class BoxBufferGeometry extends BufferGeometry {
function buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) { function buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) {
var segmentWidth = width / gridX; const segmentWidth = width / gridX;
var segmentHeight = height / gridY; const segmentHeight = height / gridY;
var widthHalf = width / 2;
var heightHalf = height / 2;
var depthHalf = depth / 2;
var gridX1 = gridX + 1; const widthHalf = width / 2;
var gridY1 = gridY + 1; const heightHalf = height / 2;
const depthHalf = depth / 2;
var vertexCounter = 0; const gridX1 = gridX + 1;
var groupCount = 0; const gridY1 = gridY + 1;
var ix, iy; let vertexCounter = 0;
let groupCount = 0;
var vector = new Vector3(); const vector = new Vector3();
// generate vertices, normals and uvs // generate vertices, normals and uvs
for ( iy = 0; iy < gridY1; iy ++ ) { for ( let iy = 0; iy < gridY1; iy ++ ) {
var y = iy * segmentHeight - heightHalf; const y = iy * segmentHeight - heightHalf;
for ( ix = 0; ix < gridX1; ix ++ ) { for ( let ix = 0; ix < gridX1; ix ++ ) {
var x = ix * segmentWidth - widthHalf; const x = ix * segmentWidth - widthHalf;
// set values to correct vector component // set values to correct vector component
...@@ -13254,14 +13252,14 @@ class BoxBufferGeometry extends BufferGeometry { ...@@ -13254,14 +13252,14 @@ class BoxBufferGeometry extends BufferGeometry {
// 2. a single segment consists of two faces // 2. a single segment consists of two faces
// 3. so we need to generate six (2*3) indices per segment // 3. so we need to generate six (2*3) indices per segment
for ( iy = 0; iy < gridY; iy ++ ) { for ( let iy = 0; iy < gridY; iy ++ ) {
for ( ix = 0; ix < gridX; ix ++ ) { for ( let ix = 0; ix < gridX; ix ++ ) {
var a = numberOfVertices + ix + gridX1 * iy; const a = numberOfVertices + ix + gridX1 * iy;
var b = numberOfVertices + ix + gridX1 * ( iy + 1 ); const b = numberOfVertices + ix + gridX1 * ( iy + 1 );
var c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 ); const c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 );
var d = numberOfVertices + ( ix + 1 ) + gridX1 * iy; const d = numberOfVertices + ( ix + 1 ) + gridX1 * iy;
// faces // faces
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册