@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.
@@ -65787,9 +65787,19 @@ class TrianglesInstancingLayer {
65787
65787
  return;
65788
65788
  }
65789
65789
  this._updateBackfaceCull(renderFlags, frameCtx);
65790
- if (this._instancingRenderers.pickNormalsRenderer) {
65791
- this._instancingRenderers.pickNormalsRenderer.drawLayer(frameCtx, this, RENDER_PASSES.PICK);
65792
- }
65790
+
65791
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
65792
+ // TODO
65793
+ // if (this._state.normalsBuf) {
65794
+ // if (this._instancingRenderers.pickNormalsRenderer) {
65795
+ // this._instancingRenderers.pickNormalsRenderer.drawLayer(frameCtx, this, RENDER_PASSES.PICK);
65796
+ // }
65797
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
65798
+ // } else {
65799
+ if (this._instancingRenderers.pickNormalsFlatRenderer) {
65800
+ this._instancingRenderers.pickNormalsFlatRenderer.drawLayer(frameCtx, this, RENDER_PASSES.PICK);
65801
+ }
65802
+ // }
65793
65803
  }
65794
65804
 
65795
65805
  drawSnapInitDepthBuf(renderFlags, frameCtx) {
@@ -78671,13 +78681,28 @@ class TrianglesDataTextureBuffer {
78671
78681
 
78672
78682
  constructor() {
78673
78683
  this.positionsCompressed = [];
78684
+ this.lenPositionsCompressed = 0;
78685
+
78674
78686
  this.metallicRoughness = [];
78687
+
78675
78688
  this.indices8Bits = [];
78689
+ this.lenIndices8Bits = 0;
78690
+
78676
78691
  this.indices16Bits = [];
78692
+ this.lenIndices16Bits = 0;
78693
+
78677
78694
  this.indices32Bits = [];
78695
+ this.lenIndices32Bits = 0;
78696
+
78678
78697
  this.edgeIndices8Bits = [];
78698
+ this.lenEdgeIndices8Bits = 0;
78699
+
78679
78700
  this.edgeIndices16Bits = [];
78701
+ this.lenEdgeIndices16Bits = 0;
78702
+
78680
78703
  this.edgeIndices32Bits = [];
78704
+ this.lenEdgeIndices32Bits = 0;
78705
+
78681
78706
  this.perObjectColors = [];
78682
78707
  this.perObjectPickColors = [];
78683
78708
  this.perObjectSolid = [];
@@ -79248,16 +79273,17 @@ class DataTextureGenerator {
79248
79273
 
79249
79274
  /**
79250
79275
  * @param {WebGL2RenderingContext} gl
79251
- * @param {ArrayLike<int>} indices
79276
+ * @param indicesArrays
79277
+ * @param lenIndices
79252
79278
  *
79253
79279
  * @returns {BindableDataTexture}
79254
79280
  */
79255
- generateTextureFor8BitIndices(gl, indices) {
79256
- if (indices.length === 0) {
79281
+ generateTextureFor8BitIndices(gl, indicesArrays, lenIndices) {
79282
+ if (lenIndices === 0) {
79257
79283
  return {texture: null, textureHeight: 0,};
79258
79284
  }
79259
79285
  const textureWidth = 4096;
79260
- const textureHeight = Math.ceil(indices.length / 3 / textureWidth);
79286
+ const textureHeight = Math.ceil(lenIndices / 3 / textureWidth);
79261
79287
  if (textureHeight === 0) {
79262
79288
  throw "texture height===0";
79263
79289
  }
@@ -79265,8 +79291,11 @@ class DataTextureGenerator {
79265
79291
  const texArray = new Uint8Array(texArraySize);
79266
79292
  dataTextureRamStats.sizeDataTextureIndices += texArray.byteLength;
79267
79293
  dataTextureRamStats.numberOfTextures++;
79268
- texArray.fill(0);
79269
- texArray.set(indices, 0);
79294
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79295
+ const pc = indicesArrays[i];
79296
+ texArray.set(pc, j);
79297
+ j += pc.length;
79298
+ }
79270
79299
  const texture = gl.createTexture();
79271
79300
  gl.bindTexture(gl.TEXTURE_2D, texture);
79272
79301
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB8UI, textureWidth, textureHeight);
@@ -79278,16 +79307,17 @@ class DataTextureGenerator {
79278
79307
 
79279
79308
  /**
79280
79309
  * @param {WebGL2RenderingContext} gl
79281
- * @param {ArrayLike<int>} indices
79310
+ * @param indicesArrays
79311
+ * @param lenIndices
79282
79312
  *
79283
79313
  * @returns {BindableDataTexture}
79284
79314
  */
79285
- generateTextureFor16BitIndices(gl, indices) {
79286
- if (indices.length === 0) {
79315
+ generateTextureFor16BitIndices(gl, indicesArrays, lenIndices) {
79316
+ if (lenIndices === 0) {
79287
79317
  return {texture: null, textureHeight: 0,};
79288
79318
  }
79289
79319
  const textureWidth = 4096;
79290
- const textureHeight = Math.ceil(indices.length / 3 / textureWidth);
79320
+ const textureHeight = Math.ceil(lenIndices / 3 / textureWidth);
79291
79321
  if (textureHeight === 0) {
79292
79322
  throw "texture height===0";
79293
79323
  }
@@ -79295,8 +79325,11 @@ class DataTextureGenerator {
79295
79325
  const texArray = new Uint16Array(texArraySize);
79296
79326
  dataTextureRamStats.sizeDataTextureIndices += texArray.byteLength;
79297
79327
  dataTextureRamStats.numberOfTextures++;
79298
- texArray.fill(0);
79299
- texArray.set(indices, 0);
79328
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79329
+ const pc = indicesArrays[i];
79330
+ texArray.set(pc, j);
79331
+ j += pc.length;
79332
+ }
79300
79333
  const texture = gl.createTexture();
79301
79334
  gl.bindTexture(gl.TEXTURE_2D, texture);
79302
79335
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB16UI, textureWidth, textureHeight);
@@ -79308,16 +79341,17 @@ class DataTextureGenerator {
79308
79341
 
79309
79342
  /**
79310
79343
  * @param {WebGL2RenderingContext} gl
79311
- * @param {ArrayLike<int>} indices
79344
+ * @param indicesArrays
79345
+ * @param lenIndices
79312
79346
  *
79313
79347
  * @returns {BindableDataTexture}
79314
79348
  */
79315
- generateTextureFor32BitIndices(gl, indices) {
79316
- if (indices.length === 0) {
79317
- return {texture: null, textureHeight: 0};
79349
+ generateTextureFor32BitIndices(gl, indicesArrays, lenIndices) {
79350
+ if (lenIndices === 0) {
79351
+ return {texture: null, textureHeight: 0,};
79318
79352
  }
79319
79353
  const textureWidth = 4096;
79320
- const textureHeight = Math.ceil(indices.length / 3 / textureWidth);
79354
+ const textureHeight = Math.ceil(lenIndices / 3 / textureWidth);
79321
79355
  if (textureHeight === 0) {
79322
79356
  throw "texture height===0";
79323
79357
  }
@@ -79325,8 +79359,11 @@ class DataTextureGenerator {
79325
79359
  const texArray = new Uint32Array(texArraySize);
79326
79360
  dataTextureRamStats.sizeDataTextureIndices += texArray.byteLength;
79327
79361
  dataTextureRamStats.numberOfTextures++;
79328
- texArray.fill(0);
79329
- texArray.set(indices, 0);
79362
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79363
+ const pc = indicesArrays[i];
79364
+ texArray.set(pc, j);
79365
+ j += pc.length;
79366
+ }
79330
79367
  const texture = gl.createTexture();
79331
79368
  gl.bindTexture(gl.TEXTURE_2D, texture);
79332
79369
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB32UI, textureWidth, textureHeight);
@@ -79338,16 +79375,17 @@ class DataTextureGenerator {
79338
79375
 
79339
79376
  /**
79340
79377
  * @param {WebGL2RenderingContext} gl
79341
- * @param {ArrayLike<int>} edgeIndices
79378
+ * @param indicesArrays
79379
+ * @param lenIndices
79342
79380
  *
79343
79381
  * @returns {BindableDataTexture}
79344
79382
  */
79345
- generateTextureFor8BitsEdgeIndices(gl, edgeIndices) {
79346
- if (edgeIndices.length === 0) {
79347
- return {texture: null, textureHeight: 0};
79383
+ generateTextureFor8BitsEdgeIndices(gl, indicesArrays, lenIndices) {
79384
+ if (lenIndices === 0) {
79385
+ return {texture: null, textureHeight: 0,};
79348
79386
  }
79349
79387
  const textureWidth = 4096;
79350
- const textureHeight = Math.ceil(edgeIndices.length / 2 / textureWidth);
79388
+ const textureHeight = Math.ceil(lenIndices / 2 / textureWidth);
79351
79389
  if (textureHeight === 0) {
79352
79390
  throw "texture height===0";
79353
79391
  }
@@ -79355,8 +79393,11 @@ class DataTextureGenerator {
79355
79393
  const texArray = new Uint8Array(texArraySize);
79356
79394
  dataTextureRamStats.sizeDataTextureEdgeIndices += texArray.byteLength;
79357
79395
  dataTextureRamStats.numberOfTextures++;
79358
- texArray.fill(0);
79359
- texArray.set(edgeIndices, 0);
79396
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79397
+ const pc = indicesArrays[i];
79398
+ texArray.set(pc, j);
79399
+ j += pc.length;
79400
+ }
79360
79401
  const texture = gl.createTexture();
79361
79402
  gl.bindTexture(gl.TEXTURE_2D, texture);
79362
79403
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RG8UI, textureWidth, textureHeight);
@@ -79368,16 +79409,17 @@ class DataTextureGenerator {
79368
79409
 
79369
79410
  /**
79370
79411
  * @param {WebGL2RenderingContext} gl
79371
- * @param {ArrayLike<int>} edgeIndices
79412
+ * @param indicesArrays
79413
+ * @param lenIndices
79372
79414
  *
79373
79415
  * @returns {BindableDataTexture}
79374
79416
  */
79375
- generateTextureFor16BitsEdgeIndices(gl, edgeIndices) {
79376
- if (edgeIndices.length === 0) {
79377
- return {texture: null, textureHeight: 0};
79417
+ generateTextureFor16BitsEdgeIndices(gl, indicesArrays, lenIndices) {
79418
+ if (lenIndices === 0) {
79419
+ return {texture: null, textureHeight: 0,};
79378
79420
  }
79379
79421
  const textureWidth = 4096;
79380
- const textureHeight = Math.ceil(edgeIndices.length / 2 / textureWidth);
79422
+ const textureHeight = Math.ceil(lenIndices / 2 / textureWidth);
79381
79423
  if (textureHeight === 0) {
79382
79424
  throw "texture height===0";
79383
79425
  }
@@ -79385,8 +79427,11 @@ class DataTextureGenerator {
79385
79427
  const texArray = new Uint16Array(texArraySize);
79386
79428
  dataTextureRamStats.sizeDataTextureEdgeIndices += texArray.byteLength;
79387
79429
  dataTextureRamStats.numberOfTextures++;
79388
- texArray.fill(0);
79389
- texArray.set(edgeIndices, 0);
79430
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79431
+ const pc = indicesArrays[i];
79432
+ texArray.set(pc, j);
79433
+ j += pc.length;
79434
+ }
79390
79435
  const texture = gl.createTexture();
79391
79436
  gl.bindTexture(gl.TEXTURE_2D, texture);
79392
79437
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RG16UI, textureWidth, textureHeight);
@@ -79398,16 +79443,17 @@ class DataTextureGenerator {
79398
79443
 
79399
79444
  /**
79400
79445
  * @param {WebGL2RenderingContext} gl
79401
- * @param {ArrayLike<int>} edgeIndices
79446
+ * @param indicesArrays
79447
+ * @param lenIndices
79402
79448
  *
79403
79449
  * @returns {BindableDataTexture}
79404
79450
  */
79405
- generateTextureFor32BitsEdgeIndices(gl, edgeIndices) {
79406
- if (edgeIndices.length === 0) {
79451
+ generateTextureFor32BitsEdgeIndices(gl, indicesArrays, lenIndices) {
79452
+ if (lenIndices === 0) {
79407
79453
  return {texture: null, textureHeight: 0,};
79408
79454
  }
79409
79455
  const textureWidth = 4096;
79410
- const textureHeight = Math.ceil(edgeIndices.length / 2 / textureWidth);
79456
+ const textureHeight = Math.ceil(lenIndices / 2 / textureWidth);
79411
79457
  if (textureHeight === 0) {
79412
79458
  throw "texture height===0";
79413
79459
  }
@@ -79415,8 +79461,11 @@ class DataTextureGenerator {
79415
79461
  const texArray = new Uint32Array(texArraySize);
79416
79462
  dataTextureRamStats.sizeDataTextureEdgeIndices += texArray.byteLength;
79417
79463
  dataTextureRamStats.numberOfTextures++;
79418
- texArray.fill(0);
79419
- texArray.set(edgeIndices, 0);
79464
+ for (let i = 0, j = 0, len = indicesArrays.length; i < len; i++) {
79465
+ const pc = indicesArrays[i];
79466
+ texArray.set(pc, j);
79467
+ j += pc.length;
79468
+ }
79420
79469
  const texture = gl.createTexture();
79421
79470
  gl.bindTexture(gl.TEXTURE_2D, texture);
79422
79471
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RG32UI, textureWidth, textureHeight);
@@ -79428,7 +79477,8 @@ class DataTextureGenerator {
79428
79477
 
79429
79478
  /**
79430
79479
  * @param {WebGL2RenderingContext} gl
79431
- * @param {ArrayLike<int>} positions Array of (uniquified) quantized positions in the layer
79480
+ * @param {ArrayLike<int>} positionsArrays Arrays of quantized positions in the layer
79481
+ * @param lenPositions
79432
79482
  *
79433
79483
  * This will generate a texture for positions in the layer.
79434
79484
  *
@@ -79438,8 +79488,8 @@ class DataTextureGenerator {
79438
79488
  *
79439
79489
  * @returns {BindableDataTexture}
79440
79490
  */
79441
- generateTextureForPositions(gl, positions) {
79442
- const numVertices = positions.length / 3;
79491
+ generateTextureForPositions(gl, positionsArrays, lenPositions) {
79492
+ const numVertices = lenPositions / 3;
79443
79493
  const textureWidth = 4096;
79444
79494
  const textureHeight = Math.ceil(numVertices / textureWidth);
79445
79495
  if (textureHeight === 0) {
@@ -79449,8 +79499,11 @@ class DataTextureGenerator {
79449
79499
  const texArray = new Uint16Array(texArraySize);
79450
79500
  dataTextureRamStats.sizeDataTexturePositions += texArray.byteLength;
79451
79501
  dataTextureRamStats.numberOfTextures++;
79452
- texArray.fill(0);
79453
- texArray.set(positions, 0);
79502
+ for (let i = 0, j = 0, len = positionsArrays.length; i < len; i++) {
79503
+ const pc = positionsArrays[i];
79504
+ texArray.set(pc, j);
79505
+ j += pc.length;
79506
+ }
79454
79507
  const texture = gl.createTexture();
79455
79508
  gl.bindTexture(gl.TEXTURE_2D, texture);
79456
79509
  gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGB16UI, textureWidth, textureHeight);
@@ -79558,7 +79611,6 @@ class TrianglesDataTextureLayer {
79558
79611
  this._state = new RenderState({
79559
79612
  origin: math.vec3(cfg.origin),
79560
79613
  metallicRoughnessBuf: null,
79561
- positionsDecodeMatrix: math.mat4(),
79562
79614
  textureState: this._dataTextureState,
79563
79615
  numIndices8Bits: 0,
79564
79616
  numIndices16Bits: 0,
@@ -79743,12 +79795,11 @@ class TrianglesDataTextureLayer {
79743
79795
  const indices = bucket.indices;
79744
79796
  const edgeIndices = bucket.edgeIndices;
79745
79797
  const buffer = this._buffer;
79746
- const vertexBase = buffer.positionsCompressed.length / 3;
79747
- const numVertices = positionsCompressed.length / 3;
79748
79798
 
79749
- for (let i = 0, len = positionsCompressed.length; i < len; i++) {
79750
- buffer.positionsCompressed.push(positionsCompressed[i]);
79751
- }
79799
+ buffer.positionsCompressed.push(positionsCompressed);
79800
+ const vertexBase = buffer.lenPositionsCompressed / 3;
79801
+ const numVertices = positionsCompressed.length / 3;
79802
+ buffer.lenPositionsCompressed += positionsCompressed.length;
79752
79803
 
79753
79804
  let indicesBase;
79754
79805
  let numTriangles = 0;
@@ -79757,15 +79808,18 @@ class TrianglesDataTextureLayer {
79757
79808
  let indicesBuffer;
79758
79809
  if (numVertices <= (1 << 8)) {
79759
79810
  indicesBuffer = buffer.indices8Bits;
79811
+ indicesBase = buffer.lenIndices8Bits / 3;
79812
+ buffer.lenIndices8Bits += indices.length;
79760
79813
  } else if (numVertices <= (1 << 16)) {
79761
79814
  indicesBuffer = buffer.indices16Bits;
79815
+ indicesBase = buffer.lenIndices16Bits / 3;
79816
+ buffer.lenIndices16Bits += indices.length;
79762
79817
  } else {
79763
79818
  indicesBuffer = buffer.indices32Bits;
79819
+ indicesBase = buffer.lenIndices32Bits / 3;
79820
+ buffer.lenIndices32Bits += indices.length;
79764
79821
  }
79765
- indicesBase = indicesBuffer.length / 3;
79766
- for (let i = 0, len = indices.length; i < len; i++) {
79767
- indicesBuffer.push(indices[i]);
79768
- }
79822
+ indicesBuffer.push(indices);
79769
79823
  }
79770
79824
 
79771
79825
  let edgeIndicesBase;
@@ -79775,15 +79829,18 @@ class TrianglesDataTextureLayer {
79775
79829
  let edgeIndicesBuffer;
79776
79830
  if (numVertices <= (1 << 8)) {
79777
79831
  edgeIndicesBuffer = buffer.edgeIndices8Bits;
79832
+ edgeIndicesBase = buffer.lenEdgeIndices8Bits / 2;
79833
+ buffer.lenEdgeIndices8Bits += edgeIndices.length;
79778
79834
  } else if (numVertices <= (1 << 16)) {
79779
79835
  edgeIndicesBuffer = buffer.edgeIndices16Bits;
79836
+ edgeIndicesBase = buffer.lenEdgeIndices16Bits / 2;
79837
+ buffer.lenEdgeIndices16Bits += edgeIndices.length;
79780
79838
  } else {
79781
79839
  edgeIndicesBuffer = buffer.edgeIndices32Bits;
79840
+ edgeIndicesBase = buffer.lenEdgeIndices32Bits / 2;
79841
+ buffer.lenEdgeIndices32Bits += edgeIndices.length;
79782
79842
  }
79783
- edgeIndicesBase = edgeIndicesBuffer.length / 2;
79784
- for (let i = 0, len = edgeIndices.length; i < len; i++) {
79785
- edgeIndicesBuffer.push(edgeIndices[i]);
79786
- }
79843
+ edgeIndicesBuffer.push(edgeIndices);
79787
79844
  }
79788
79845
 
79789
79846
  this._state.numVertices += numVertices;
@@ -79954,7 +80011,6 @@ class TrianglesDataTextureLayer {
79954
80011
  const buffer = this._buffer;
79955
80012
 
79956
80013
  state.gl = gl;
79957
-
79958
80014
  textureState.texturePerObjectIdColorsAndFlags = this._dataTextureGenerator.generateTextureForColorsAndFlags(
79959
80015
  gl,
79960
80016
  buffer.perObjectColors,
@@ -79972,9 +80028,17 @@ class TrianglesDataTextureLayer {
79972
80028
  buffer.perObjectPositionsDecodeMatrices,
79973
80029
  buffer.perObjectInstancePositioningMatrices);
79974
80030
 
80031
+ // const positionsCompressed = new Uint16Array(buffer.lenPositionsCompressed);
80032
+ // for (let i = 0, j = 0, len = buffer.positionsCompressed.length; i < len; i++) {
80033
+ // const pc = buffer.positionsCompressed[i];
80034
+ // positionsCompressed.set(pc, j);
80035
+ // j += pc.length;
80036
+ // }
80037
+
79975
80038
  textureState.texturePerVertexIdCoordinates = this._dataTextureGenerator.generateTextureForPositions(
79976
80039
  gl,
79977
- buffer.positionsCompressed);
80040
+ buffer.positionsCompressed,
80041
+ buffer.lenPositionsCompressed );
79978
80042
 
79979
80043
  textureState.texturePerPolygonIdPortionIds8Bits = this._dataTextureGenerator.generateTextureForPackedPortionIds(
79980
80044
  gl,
@@ -80000,47 +80064,46 @@ class TrianglesDataTextureLayer {
80000
80064
  buffer.perEdgeNumberPortionId16Bits);
80001
80065
  }
80002
80066
 
80003
-
80004
80067
  if (buffer.perEdgeNumberPortionId32Bits.length > 0) {
80005
80068
  textureState.texturePerEdgeIdPortionIds32Bits = this._dataTextureGenerator.generateTextureForPackedPortionIds(
80006
80069
  gl,
80007
80070
  buffer.perEdgeNumberPortionId32Bits);
80008
80071
  }
80009
80072
 
80010
- if (buffer.indices8Bits.length > 0) {
80073
+ if (buffer.lenIndices8Bits > 0) {
80011
80074
  textureState.texturePerPolygonIdIndices8Bits = this._dataTextureGenerator.generateTextureFor8BitIndices(
80012
80075
  gl,
80013
- buffer.indices8Bits);
80076
+ buffer.indices8Bits, buffer.lenIndices8Bits);
80014
80077
  }
80015
80078
 
80016
- if (buffer.indices16Bits.length > 0) {
80079
+ if (buffer.lenIndices16Bits > 0) {
80017
80080
  textureState.texturePerPolygonIdIndices16Bits = this._dataTextureGenerator.generateTextureFor16BitIndices(
80018
80081
  gl,
80019
- buffer.indices16Bits);
80082
+ buffer.indices16Bits, buffer.lenIndices16Bits);
80020
80083
  }
80021
80084
 
80022
- if (buffer.indices32Bits.length > 0) {
80085
+ if (buffer.lenIndices32Bits > 0) {
80023
80086
  textureState.texturePerPolygonIdIndices32Bits = this._dataTextureGenerator.generateTextureFor32BitIndices(
80024
80087
  gl,
80025
- buffer.indices32Bits);
80088
+ buffer.indices32Bits, buffer.lenIndices32Bits);
80026
80089
  }
80027
80090
 
80028
- if (buffer.edgeIndices8Bits.length > 0) {
80091
+ if (buffer.lenEdgeIndices8Bits > 0) {
80029
80092
  textureState.texturePerPolygonIdEdgeIndices8Bits = this._dataTextureGenerator.generateTextureFor8BitsEdgeIndices(
80030
80093
  gl,
80031
- buffer.edgeIndices8Bits);
80094
+ buffer.edgeIndices8Bits, buffer.lenEdgeIndices8Bits);
80032
80095
  }
80033
80096
 
80034
- if (buffer.edgeIndices16Bits.length > 0) {
80097
+ if (buffer.lenEdgeIndices16Bits > 0) {
80035
80098
  textureState.texturePerPolygonIdEdgeIndices16Bits = this._dataTextureGenerator.generateTextureFor16BitsEdgeIndices(
80036
80099
  gl,
80037
- buffer.edgeIndices16Bits);
80100
+ buffer.edgeIndices16Bits, buffer.lenEdgeIndices16Bits);
80038
80101
  }
80039
80102
 
80040
- if (buffer.edgeIndices32Bits.length > 0) {
80103
+ if (buffer.lenEdgeIndices32Bits > 0) {
80041
80104
  textureState.texturePerPolygonIdEdgeIndices32Bits = this._dataTextureGenerator.generateTextureFor32BitsEdgeIndices(
80042
80105
  gl,
80043
- buffer.edgeIndices32Bits);
80106
+ buffer.edgeIndices32Bits, buffer.lenEdgeIndices32Bits);
80044
80107
  }
80045
80108
 
80046
80109
  textureState.finalize();