@xeokit/xeokit-sdk 2.4.1 → 2.4.2-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65791,9 +65791,19 @@ class TrianglesInstancingLayer {
65791
65791
  return;
65792
65792
  }
65793
65793
  this._updateBackfaceCull(renderFlags, frameCtx);
65794
- if (this._instancingRenderers.pickNormalsRenderer) {
65795
- this._instancingRenderers.pickNormalsRenderer.drawLayer(frameCtx, this, RENDER_PASSES.PICK);
65796
- }
65794
+
65795
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
65796
+ // TODO
65797
+ // if (this._state.normalsBuf) {
65798
+ // if (this._instancingRenderers.pickNormalsRenderer) {
65799
+ // this._instancingRenderers.pickNormalsRenderer.drawLayer(frameCtx, this, RENDER_PASSES.PICK);
65800
+ // }
65801
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
65802
+ // } else {
65803
+ if (this._instancingRenderers.pickNormalsFlatRenderer) {
65804
+ this._instancingRenderers.pickNormalsFlatRenderer.drawLayer(frameCtx, this, RENDER_PASSES.PICK);
65805
+ }
65806
+ // }
65797
65807
  }
65798
65808
 
65799
65809
  drawSnapInitDepthBuf(renderFlags, frameCtx) {
@@ -78675,13 +78685,28 @@ class TrianglesDataTextureBuffer {
78675
78685
 
78676
78686
  constructor() {
78677
78687
  this.positionsCompressed = [];
78688
+ this.lenPositionsCompressed = 0;
78689
+
78678
78690
  this.metallicRoughness = [];
78691
+
78679
78692
  this.indices8Bits = [];
78693
+ this.lenIndices8Bits = 0;
78694
+
78680
78695
  this.indices16Bits = [];
78696
+ this.lenIndices16Bits = 0;
78697
+
78681
78698
  this.indices32Bits = [];
78699
+ this.lenIndices32Bits = 0;
78700
+
78682
78701
  this.edgeIndices8Bits = [];
78702
+ this.lenEdgeIndices8Bits = 0;
78703
+
78683
78704
  this.edgeIndices16Bits = [];
78705
+ this.lenEdgeIndices16Bits = 0;
78706
+
78684
78707
  this.edgeIndices32Bits = [];
78708
+ this.lenEdgeIndices32Bits = 0;
78709
+
78685
78710
  this.perObjectColors = [];
78686
78711
  this.perObjectPickColors = [];
78687
78712
  this.perObjectSolid = [];
@@ -79252,16 +79277,17 @@ class DataTextureGenerator {
79252
79277
 
79253
79278
  /**
79254
79279
  * @param {WebGL2RenderingContext} gl
79255
- * @param {ArrayLike<int>} indices
79280
+ * @param indicesArrays
79281
+ * @param lenIndices
79256
79282
  *
79257
79283
  * @returns {BindableDataTexture}
79258
79284
  */
79259
- generateTextureFor8BitIndices(gl, indices) {
79260
- if (indices.length === 0) {
79285
+ generateTextureFor8BitIndices(gl, indicesArrays, lenIndices) {
79286
+ if (lenIndices === 0) {
79261
79287
  return {texture: null, textureHeight: 0,};
79262
79288
  }
79263
79289
  const textureWidth = 4096;
79264
- const textureHeight = Math.ceil(indices.length / 3 / textureWidth);
79290
+ const textureHeight = Math.ceil(lenIndices / 3 / textureWidth);
79265
79291
  if (textureHeight === 0) {
79266
79292
  throw "texture height===0";
79267
79293
  }
@@ -79269,8 +79295,11 @@ class DataTextureGenerator {
79269
79295
  const texArray = new Uint8Array(texArraySize);
79270
79296
  dataTextureRamStats.sizeDataTextureIndices += texArray.byteLength;
79271
79297
  dataTextureRamStats.numberOfTextures++;
79272
- texArray.fill(0);
79273
- texArray.set(indices, 0);
79298
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79299
+ const pc = indicesArrays[i];
79300
+ texArray.set(pc, j);
79301
+ j += pc.length;
79302
+ }
79274
79303
  const texture = gl.createTexture();
79275
79304
  gl.bindTexture(gl.TEXTURE_2D, texture);
79276
79305
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB8UI, textureWidth, textureHeight);
@@ -79282,16 +79311,17 @@ class DataTextureGenerator {
79282
79311
 
79283
79312
  /**
79284
79313
  * @param {WebGL2RenderingContext} gl
79285
- * @param {ArrayLike<int>} indices
79314
+ * @param indicesArrays
79315
+ * @param lenIndices
79286
79316
  *
79287
79317
  * @returns {BindableDataTexture}
79288
79318
  */
79289
- generateTextureFor16BitIndices(gl, indices) {
79290
- if (indices.length === 0) {
79319
+ generateTextureFor16BitIndices(gl, indicesArrays, lenIndices) {
79320
+ if (lenIndices === 0) {
79291
79321
  return {texture: null, textureHeight: 0,};
79292
79322
  }
79293
79323
  const textureWidth = 4096;
79294
- const textureHeight = Math.ceil(indices.length / 3 / textureWidth);
79324
+ const textureHeight = Math.ceil(lenIndices / 3 / textureWidth);
79295
79325
  if (textureHeight === 0) {
79296
79326
  throw "texture height===0";
79297
79327
  }
@@ -79299,8 +79329,11 @@ class DataTextureGenerator {
79299
79329
  const texArray = new Uint16Array(texArraySize);
79300
79330
  dataTextureRamStats.sizeDataTextureIndices += texArray.byteLength;
79301
79331
  dataTextureRamStats.numberOfTextures++;
79302
- texArray.fill(0);
79303
- texArray.set(indices, 0);
79332
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79333
+ const pc = indicesArrays[i];
79334
+ texArray.set(pc, j);
79335
+ j += pc.length;
79336
+ }
79304
79337
  const texture = gl.createTexture();
79305
79338
  gl.bindTexture(gl.TEXTURE_2D, texture);
79306
79339
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB16UI, textureWidth, textureHeight);
@@ -79312,16 +79345,17 @@ class DataTextureGenerator {
79312
79345
 
79313
79346
  /**
79314
79347
  * @param {WebGL2RenderingContext} gl
79315
- * @param {ArrayLike<int>} indices
79348
+ * @param indicesArrays
79349
+ * @param lenIndices
79316
79350
  *
79317
79351
  * @returns {BindableDataTexture}
79318
79352
  */
79319
- generateTextureFor32BitIndices(gl, indices) {
79320
- if (indices.length === 0) {
79321
- return {texture: null, textureHeight: 0};
79353
+ generateTextureFor32BitIndices(gl, indicesArrays, lenIndices) {
79354
+ if (lenIndices === 0) {
79355
+ return {texture: null, textureHeight: 0,};
79322
79356
  }
79323
79357
  const textureWidth = 4096;
79324
- const textureHeight = Math.ceil(indices.length / 3 / textureWidth);
79358
+ const textureHeight = Math.ceil(lenIndices / 3 / textureWidth);
79325
79359
  if (textureHeight === 0) {
79326
79360
  throw "texture height===0";
79327
79361
  }
@@ -79329,8 +79363,11 @@ class DataTextureGenerator {
79329
79363
  const texArray = new Uint32Array(texArraySize);
79330
79364
  dataTextureRamStats.sizeDataTextureIndices += texArray.byteLength;
79331
79365
  dataTextureRamStats.numberOfTextures++;
79332
- texArray.fill(0);
79333
- texArray.set(indices, 0);
79366
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79367
+ const pc = indicesArrays[i];
79368
+ texArray.set(pc, j);
79369
+ j += pc.length;
79370
+ }
79334
79371
  const texture = gl.createTexture();
79335
79372
  gl.bindTexture(gl.TEXTURE_2D, texture);
79336
79373
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB32UI, textureWidth, textureHeight);
@@ -79342,16 +79379,17 @@ class DataTextureGenerator {
79342
79379
 
79343
79380
  /**
79344
79381
  * @param {WebGL2RenderingContext} gl
79345
- * @param {ArrayLike<int>} edgeIndices
79382
+ * @param indicesArrays
79383
+ * @param lenIndices
79346
79384
  *
79347
79385
  * @returns {BindableDataTexture}
79348
79386
  */
79349
- generateTextureFor8BitsEdgeIndices(gl, edgeIndices) {
79350
- if (edgeIndices.length === 0) {
79351
- return {texture: null, textureHeight: 0};
79387
+ generateTextureFor8BitsEdgeIndices(gl, indicesArrays, lenIndices) {
79388
+ if (lenIndices === 0) {
79389
+ return {texture: null, textureHeight: 0,};
79352
79390
  }
79353
79391
  const textureWidth = 4096;
79354
- const textureHeight = Math.ceil(edgeIndices.length / 2 / textureWidth);
79392
+ const textureHeight = Math.ceil(lenIndices / 2 / textureWidth);
79355
79393
  if (textureHeight === 0) {
79356
79394
  throw "texture height===0";
79357
79395
  }
@@ -79359,8 +79397,11 @@ class DataTextureGenerator {
79359
79397
  const texArray = new Uint8Array(texArraySize);
79360
79398
  dataTextureRamStats.sizeDataTextureEdgeIndices += texArray.byteLength;
79361
79399
  dataTextureRamStats.numberOfTextures++;
79362
- texArray.fill(0);
79363
- texArray.set(edgeIndices, 0);
79400
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79401
+ const pc = indicesArrays[i];
79402
+ texArray.set(pc, j);
79403
+ j += pc.length;
79404
+ }
79364
79405
  const texture = gl.createTexture();
79365
79406
  gl.bindTexture(gl.TEXTURE_2D, texture);
79366
79407
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RG8UI, textureWidth, textureHeight);
@@ -79372,16 +79413,17 @@ class DataTextureGenerator {
79372
79413
 
79373
79414
  /**
79374
79415
  * @param {WebGL2RenderingContext} gl
79375
- * @param {ArrayLike<int>} edgeIndices
79416
+ * @param indicesArrays
79417
+ * @param lenIndices
79376
79418
  *
79377
79419
  * @returns {BindableDataTexture}
79378
79420
  */
79379
- generateTextureFor16BitsEdgeIndices(gl, edgeIndices) {
79380
- if (edgeIndices.length === 0) {
79381
- return {texture: null, textureHeight: 0};
79421
+ generateTextureFor16BitsEdgeIndices(gl, indicesArrays, lenIndices) {
79422
+ if (lenIndices === 0) {
79423
+ return {texture: null, textureHeight: 0,};
79382
79424
  }
79383
79425
  const textureWidth = 4096;
79384
- const textureHeight = Math.ceil(edgeIndices.length / 2 / textureWidth);
79426
+ const textureHeight = Math.ceil(lenIndices / 2 / textureWidth);
79385
79427
  if (textureHeight === 0) {
79386
79428
  throw "texture height===0";
79387
79429
  }
@@ -79389,8 +79431,11 @@ class DataTextureGenerator {
79389
79431
  const texArray = new Uint16Array(texArraySize);
79390
79432
  dataTextureRamStats.sizeDataTextureEdgeIndices += texArray.byteLength;
79391
79433
  dataTextureRamStats.numberOfTextures++;
79392
- texArray.fill(0);
79393
- texArray.set(edgeIndices, 0);
79434
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79435
+ const pc = indicesArrays[i];
79436
+ texArray.set(pc, j);
79437
+ j += pc.length;
79438
+ }
79394
79439
  const texture = gl.createTexture();
79395
79440
  gl.bindTexture(gl.TEXTURE_2D, texture);
79396
79441
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RG16UI, textureWidth, textureHeight);
@@ -79402,16 +79447,17 @@ class DataTextureGenerator {
79402
79447
 
79403
79448
  /**
79404
79449
  * @param {WebGL2RenderingContext} gl
79405
- * @param {ArrayLike<int>} edgeIndices
79450
+ * @param indicesArrays
79451
+ * @param lenIndices
79406
79452
  *
79407
79453
  * @returns {BindableDataTexture}
79408
79454
  */
79409
- generateTextureFor32BitsEdgeIndices(gl, edgeIndices) {
79410
- if (edgeIndices.length === 0) {
79455
+ generateTextureFor32BitsEdgeIndices(gl, indicesArrays, lenIndices) {
79456
+ if (lenIndices === 0) {
79411
79457
  return {texture: null, textureHeight: 0,};
79412
79458
  }
79413
79459
  const textureWidth = 4096;
79414
- const textureHeight = Math.ceil(edgeIndices.length / 2 / textureWidth);
79460
+ const textureHeight = Math.ceil(lenIndices / 2 / textureWidth);
79415
79461
  if (textureHeight === 0) {
79416
79462
  throw "texture height===0";
79417
79463
  }
@@ -79419,8 +79465,11 @@ class DataTextureGenerator {
79419
79465
  const texArray = new Uint32Array(texArraySize);
79420
79466
  dataTextureRamStats.sizeDataTextureEdgeIndices += texArray.byteLength;
79421
79467
  dataTextureRamStats.numberOfTextures++;
79422
- texArray.fill(0);
79423
- texArray.set(edgeIndices, 0);
79468
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79469
+ const pc = indicesArrays[i];
79470
+ texArray.set(pc, j);
79471
+ j += pc.length;
79472
+ }
79424
79473
  const texture = gl.createTexture();
79425
79474
  gl.bindTexture(gl.TEXTURE_2D, texture);
79426
79475
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RG32UI, textureWidth, textureHeight);
@@ -79432,7 +79481,8 @@ class DataTextureGenerator {
79432
79481
 
79433
79482
  /**
79434
79483
  * @param {WebGL2RenderingContext} gl
79435
- * @param {ArrayLike<int>} positions Array of (uniquified) quantized positions in the layer
79484
+ * @param {ArrayLike<int>} positionsArrays Arrays of quantized positions in the layer
79485
+ * @param lenPositions
79436
79486
  *
79437
79487
  * This will generate a texture for positions in the layer.
79438
79488
  *
@@ -79442,8 +79492,8 @@ class DataTextureGenerator {
79442
79492
  *
79443
79493
  * @returns {BindableDataTexture}
79444
79494
  */
79445
- generateTextureForPositions(gl, positions) {
79446
- const numVertices = positions.length / 3;
79495
+ generateTextureForPositions(gl, positionsArrays, lenPositions) {
79496
+ const numVertices = lenPositions / 3;
79447
79497
  const textureWidth = 4096;
79448
79498
  const textureHeight = Math.ceil(numVertices / textureWidth);
79449
79499
  if (textureHeight === 0) {
@@ -79453,8 +79503,11 @@ class DataTextureGenerator {
79453
79503
  const texArray = new Uint16Array(texArraySize);
79454
79504
  dataTextureRamStats.sizeDataTexturePositions += texArray.byteLength;
79455
79505
  dataTextureRamStats.numberOfTextures++;
79456
- texArray.fill(0);
79457
- texArray.set(positions, 0);
79506
+ for (let i = 0, j = 0, len = positionsArrays.length; i < len; i++) {
79507
+ const pc = positionsArrays[i];
79508
+ texArray.set(pc, j);
79509
+ j += pc.length;
79510
+ }
79458
79511
  const texture = gl.createTexture();
79459
79512
  gl.bindTexture(gl.TEXTURE_2D, texture);
79460
79513
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB16UI, textureWidth, textureHeight);
@@ -79562,7 +79615,6 @@ class TrianglesDataTextureLayer {
79562
79615
  this._state = new RenderState({
79563
79616
  origin: math.vec3(cfg.origin),
79564
79617
  metallicRoughnessBuf: null,
79565
- positionsDecodeMatrix: math.mat4(),
79566
79618
  textureState: this._dataTextureState,
79567
79619
  numIndices8Bits: 0,
79568
79620
  numIndices16Bits: 0,
@@ -79747,12 +79799,11 @@ class TrianglesDataTextureLayer {
79747
79799
  const indices = bucket.indices;
79748
79800
  const edgeIndices = bucket.edgeIndices;
79749
79801
  const buffer = this._buffer;
79750
- const vertexBase = buffer.positionsCompressed.length / 3;
79751
- const numVertices = positionsCompressed.length / 3;
79752
79802
 
79753
- for (let i = 0, len = positionsCompressed.length; i < len; i++) {
79754
- buffer.positionsCompressed.push(positionsCompressed[i]);
79755
- }
79803
+ buffer.positionsCompressed.push(positionsCompressed);
79804
+ const vertexBase = buffer.lenPositionsCompressed / 3;
79805
+ const numVertices = positionsCompressed.length / 3;
79806
+ buffer.lenPositionsCompressed += positionsCompressed.length;
79756
79807
 
79757
79808
  let indicesBase;
79758
79809
  let numTriangles = 0;
@@ -79761,15 +79812,18 @@ class TrianglesDataTextureLayer {
79761
79812
  let indicesBuffer;
79762
79813
  if (numVertices <= (1 << 8)) {
79763
79814
  indicesBuffer = buffer.indices8Bits;
79815
+ indicesBase = buffer.lenIndices8Bits / 3;
79816
+ buffer.lenIndices8Bits += indices.length;
79764
79817
  } else if (numVertices <= (1 << 16)) {
79765
79818
  indicesBuffer = buffer.indices16Bits;
79819
+ indicesBase = buffer.lenIndices16Bits / 3;
79820
+ buffer.lenIndices16Bits += indices.length;
79766
79821
  } else {
79767
79822
  indicesBuffer = buffer.indices32Bits;
79823
+ indicesBase = buffer.lenIndices32Bits / 3;
79824
+ buffer.lenIndices32Bits += indices.length;
79768
79825
  }
79769
- indicesBase = indicesBuffer.length / 3;
79770
- for (let i = 0, len = indices.length; i < len; i++) {
79771
- indicesBuffer.push(indices[i]);
79772
- }
79826
+ indicesBuffer.push(indices);
79773
79827
  }
79774
79828
 
79775
79829
  let edgeIndicesBase;
@@ -79779,15 +79833,18 @@ class TrianglesDataTextureLayer {
79779
79833
  let edgeIndicesBuffer;
79780
79834
  if (numVertices <= (1 << 8)) {
79781
79835
  edgeIndicesBuffer = buffer.edgeIndices8Bits;
79836
+ edgeIndicesBase = buffer.lenEdgeIndices8Bits / 2;
79837
+ buffer.lenEdgeIndices8Bits += edgeIndices.length;
79782
79838
  } else if (numVertices <= (1 << 16)) {
79783
79839
  edgeIndicesBuffer = buffer.edgeIndices16Bits;
79840
+ edgeIndicesBase = buffer.lenEdgeIndices16Bits / 2;
79841
+ buffer.lenEdgeIndices16Bits += edgeIndices.length;
79784
79842
  } else {
79785
79843
  edgeIndicesBuffer = buffer.edgeIndices32Bits;
79844
+ edgeIndicesBase = buffer.lenEdgeIndices32Bits / 2;
79845
+ buffer.lenEdgeIndices32Bits += edgeIndices.length;
79786
79846
  }
79787
- edgeIndicesBase = edgeIndicesBuffer.length / 2;
79788
- for (let i = 0, len = edgeIndices.length; i < len; i++) {
79789
- edgeIndicesBuffer.push(edgeIndices[i]);
79790
- }
79847
+ edgeIndicesBuffer.push(edgeIndices);
79791
79848
  }
79792
79849
 
79793
79850
  this._state.numVertices += numVertices;
@@ -79958,7 +80015,6 @@ class TrianglesDataTextureLayer {
79958
80015
  const buffer = this._buffer;
79959
80016
 
79960
80017
  state.gl = gl;
79961
-
79962
80018
  textureState.texturePerObjectIdColorsAndFlags = this._dataTextureGenerator.generateTextureForColorsAndFlags(
79963
80019
  gl,
79964
80020
  buffer.perObjectColors,
@@ -79976,9 +80032,17 @@ class TrianglesDataTextureLayer {
79976
80032
  buffer.perObjectPositionsDecodeMatrices,
79977
80033
  buffer.perObjectInstancePositioningMatrices);
79978
80034
 
80035
+ // const positionsCompressed = new Uint16Array(buffer.lenPositionsCompressed);
80036
+ // for (let i = 0, j = 0, len = buffer.positionsCompressed.length; i < len; i++) {
80037
+ // const pc = buffer.positionsCompressed[i];
80038
+ // positionsCompressed.set(pc, j);
80039
+ // j += pc.length;
80040
+ // }
80041
+
79979
80042
  textureState.texturePerVertexIdCoordinates = this._dataTextureGenerator.generateTextureForPositions(
79980
80043
  gl,
79981
- buffer.positionsCompressed);
80044
+ buffer.positionsCompressed,
80045
+ buffer.lenPositionsCompressed );
79982
80046
 
79983
80047
  textureState.texturePerPolygonIdPortionIds8Bits = this._dataTextureGenerator.generateTextureForPackedPortionIds(
79984
80048
  gl,
@@ -80004,47 +80068,46 @@ class TrianglesDataTextureLayer {
80004
80068
  buffer.perEdgeNumberPortionId16Bits);
80005
80069
  }
80006
80070
 
80007
-
80008
80071
  if (buffer.perEdgeNumberPortionId32Bits.length > 0) {
80009
80072
  textureState.texturePerEdgeIdPortionIds32Bits = this._dataTextureGenerator.generateTextureForPackedPortionIds(
80010
80073
  gl,
80011
80074
  buffer.perEdgeNumberPortionId32Bits);
80012
80075
  }
80013
80076
 
80014
- if (buffer.indices8Bits.length > 0) {
80077
+ if (buffer.lenIndices8Bits > 0) {
80015
80078
  textureState.texturePerPolygonIdIndices8Bits = this._dataTextureGenerator.generateTextureFor8BitIndices(
80016
80079
  gl,
80017
- buffer.indices8Bits);
80080
+ buffer.indices8Bits, buffer.lenIndices8Bits);
80018
80081
  }
80019
80082
 
80020
- if (buffer.indices16Bits.length > 0) {
80083
+ if (buffer.lenIndices16Bits > 0) {
80021
80084
  textureState.texturePerPolygonIdIndices16Bits = this._dataTextureGenerator.generateTextureFor16BitIndices(
80022
80085
  gl,
80023
- buffer.indices16Bits);
80086
+ buffer.indices16Bits, buffer.lenIndices16Bits);
80024
80087
  }
80025
80088
 
80026
- if (buffer.indices32Bits.length > 0) {
80089
+ if (buffer.lenIndices32Bits > 0) {
80027
80090
  textureState.texturePerPolygonIdIndices32Bits = this._dataTextureGenerator.generateTextureFor32BitIndices(
80028
80091
  gl,
80029
- buffer.indices32Bits);
80092
+ buffer.indices32Bits, buffer.lenIndices32Bits);
80030
80093
  }
80031
80094
 
80032
- if (buffer.edgeIndices8Bits.length > 0) {
80095
+ if (buffer.lenEdgeIndices8Bits > 0) {
80033
80096
  textureState.texturePerPolygonIdEdgeIndices8Bits = this._dataTextureGenerator.generateTextureFor8BitsEdgeIndices(
80034
80097
  gl,
80035
- buffer.edgeIndices8Bits);
80098
+ buffer.edgeIndices8Bits, buffer.lenEdgeIndices8Bits);
80036
80099
  }
80037
80100
 
80038
- if (buffer.edgeIndices16Bits.length > 0) {
80101
+ if (buffer.lenEdgeIndices16Bits > 0) {
80039
80102
  textureState.texturePerPolygonIdEdgeIndices16Bits = this._dataTextureGenerator.generateTextureFor16BitsEdgeIndices(
80040
80103
  gl,
80041
- buffer.edgeIndices16Bits);
80104
+ buffer.edgeIndices16Bits, buffer.lenEdgeIndices16Bits);
80042
80105
  }
80043
80106
 
80044
- if (buffer.edgeIndices32Bits.length > 0) {
80107
+ if (buffer.lenEdgeIndices32Bits > 0) {
80045
80108
  textureState.texturePerPolygonIdEdgeIndices32Bits = this._dataTextureGenerator.generateTextureFor32BitsEdgeIndices(
80046
80109
  gl,
80047
- buffer.edgeIndices32Bits);
80110
+ buffer.edgeIndices32Bits, buffer.lenEdgeIndices32Bits);
80048
80111
  }
80049
80112
 
80050
80113
  textureState.finalize();