@babylonjs/core 6.20.1 → 6.20.2

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.
Files changed (45) hide show
  1. package/Engines/nativeEngine.js +1 -1
  2. package/Engines/nativeEngine.js.map +1 -1
  3. package/Engines/thinEngine.js +2 -2
  4. package/Engines/thinEngine.js.map +1 -1
  5. package/Materials/effect.js +4 -4
  6. package/Materials/effect.js.map +1 -1
  7. package/Maths/math.vector.d.ts +2 -1
  8. package/Maths/math.vector.js +5 -4
  9. package/Maths/math.vector.js.map +1 -1
  10. package/Meshes/Node/Blocks/Matrices/alignBlock.js +1 -1
  11. package/Meshes/Node/Blocks/Matrices/alignBlock.js.map +1 -1
  12. package/Meshes/Node/Blocks/Teleport/teleportInBlock.js +1 -0
  13. package/Meshes/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
  14. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js +1 -0
  15. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  16. package/Meshes/Node/Blocks/debugBlock.js +1 -0
  17. package/Meshes/Node/Blocks/debugBlock.js.map +1 -1
  18. package/Meshes/Node/Blocks/geometryInputBlock.js +1 -0
  19. package/Meshes/Node/Blocks/geometryInputBlock.js.map +1 -1
  20. package/Meshes/Node/Blocks/geometryOptimizeBlock.js +1 -1
  21. package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
  22. package/Meshes/Node/Blocks/noiseBlock.js +1 -1
  23. package/Meshes/Node/Blocks/noiseBlock.js.map +1 -1
  24. package/Meshes/Node/Blocks/randomBlock.d.ts +12 -0
  25. package/Meshes/Node/Blocks/randomBlock.js +42 -1
  26. package/Meshes/Node/Blocks/randomBlock.js.map +1 -1
  27. package/Meshes/Node/nodeGeometry.js +5 -0
  28. package/Meshes/Node/nodeGeometry.js.map +1 -1
  29. package/Meshes/Node/nodeGeometryBlock.d.ts +8 -3
  30. package/Meshes/Node/nodeGeometryBlock.js +8 -4
  31. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  32. package/Meshes/linesMesh.js +2 -2
  33. package/Meshes/linesMesh.js.map +1 -1
  34. package/Meshes/mesh.vertexData.js +28 -26
  35. package/Meshes/mesh.vertexData.js.map +1 -1
  36. package/Physics/v2/physicsBody.d.ts +1 -0
  37. package/Physics/v2/physicsBody.js +5 -0
  38. package/Physics/v2/physicsBody.js.map +1 -1
  39. package/Physics/v2/physicsShape.d.ts +1 -0
  40. package/Physics/v2/physicsShape.js +5 -0
  41. package/Physics/v2/physicsShape.js.map +1 -1
  42. package/Probes/reflectionProbe.d.ts +2 -1
  43. package/Probes/reflectionProbe.js +4 -1
  44. package/Probes/reflectionProbe.js.map +1 -1
  45. package/package.json +1 -1
@@ -462,106 +462,108 @@ export class VertexData {
462
462
  else {
463
463
  if (!this.normals !== !other.normals) {
464
464
  if (!this.normals) {
465
- this.normals = Array.from(other.normals);
465
+ this.normals = new Float32Array(this.positions.length);
466
466
  }
467
467
  else {
468
- other.normals = Array.from(this.normals);
468
+ other.normals = new Float32Array(other.positions.length);
469
469
  }
470
470
  }
471
471
  if (!this.tangents !== !other.tangents) {
472
472
  if (!this.tangents) {
473
- this.tangents = Array.from(other.tangents);
473
+ this.tangents = new Float32Array((this.positions.length / 3) * 4);
474
474
  }
475
475
  else {
476
- other.tangents = Array.from(this.tangents);
476
+ other.tangents = new Float32Array((other.positions.length / 3) * 4);
477
477
  }
478
478
  }
479
479
  if (!this.uvs !== !other.uvs) {
480
480
  if (!this.uvs) {
481
- this.uvs = Array.from(other.uvs);
481
+ this.uvs = new Float32Array((this.positions.length / 3) * 2);
482
482
  }
483
483
  else {
484
- other.uvs = Array.from(this.uvs);
484
+ other.uvs = new Float32Array((other.positions.length / 3) * 2);
485
485
  }
486
486
  }
487
487
  if (!this.uvs2 !== !other.uvs2) {
488
488
  if (!this.uvs2) {
489
- this.uvs2 = Array.from(other.uvs2);
489
+ this.uvs2 = new Float32Array((this.positions.length / 3) * 2);
490
490
  }
491
491
  else {
492
- other.uvs2 = Array.from(this.uvs2);
492
+ other.uvs2 = new Float32Array((other.positions.length / 3) * 2);
493
493
  }
494
494
  }
495
495
  if (!this.uvs3 !== !other.uvs3) {
496
496
  if (!this.uvs3) {
497
- this.uvs3 = Array.from(other.uvs3);
497
+ this.uvs3 = new Float32Array((this.positions.length / 3) * 2);
498
498
  }
499
499
  else {
500
- other.uvs3 = Array.from(this.uvs3);
500
+ other.uvs3 = new Float32Array((other.positions.length / 3) * 2);
501
501
  }
502
502
  }
503
503
  if (!this.uvs4 !== !other.uvs4) {
504
504
  if (!this.uvs4) {
505
- this.uvs4 = Array.from(other.uvs4);
505
+ this.uvs4 = new Float32Array((this.positions.length / 3) * 2);
506
506
  }
507
507
  else {
508
- other.uvs4 = Array.from(this.uvs4);
508
+ other.uvs4 = new Float32Array((other.positions.length / 3) * 2);
509
509
  }
510
510
  }
511
511
  if (!this.uvs5 !== !other.uvs5) {
512
512
  if (!this.uvs5) {
513
- this.uvs5 = Array.from(other.uvs5);
513
+ this.uvs5 = new Float32Array((this.positions.length / 3) * 2);
514
514
  }
515
515
  else {
516
- other.uvs5 = Array.from(this.uvs5);
516
+ other.uvs5 = new Float32Array((other.positions.length / 3) * 2);
517
517
  }
518
518
  }
519
519
  if (!this.uvs6 !== !other.uvs6) {
520
520
  if (!this.uvs6) {
521
- this.uvs6 = Array.from(other.uvs6);
521
+ this.uvs6 = new Float32Array((this.positions.length / 3) * 2);
522
522
  }
523
523
  else {
524
- other.uvs6 = Array.from(this.uvs6);
524
+ other.uvs6 = new Float32Array((other.positions.length / 3) * 2);
525
525
  }
526
526
  }
527
527
  if (!this.colors !== !other.colors) {
528
528
  if (!this.colors) {
529
- this.colors = Array.from(other.colors);
529
+ this.colors = new Float32Array((this.positions.length / 3) * 4);
530
+ this.colors.fill(1); // Set to white by default
530
531
  }
531
532
  else {
532
- other.colors = Array.from(this.colors);
533
+ other.colors = new Float32Array((other.positions.length / 3) * 4);
534
+ other.colors.fill(1); // Set to white by default
533
535
  }
534
536
  }
535
537
  if (!this.matricesIndices !== !other.matricesIndices) {
536
538
  if (!this.matricesIndices) {
537
- this.matricesIndices = Array.from(other.matricesIndices);
539
+ this.matricesIndices = new Float32Array((this.positions.length / 3) * 4);
538
540
  }
539
541
  else {
540
- other.matricesIndices = Array.from(this.matricesIndices);
542
+ other.matricesIndices = new Float32Array((other.positions.length / 3) * 4);
541
543
  }
542
544
  }
543
545
  if (!this.matricesWeights !== !other.matricesWeights) {
544
546
  if (!this.matricesWeights) {
545
- this.matricesWeights = Array.from(other.matricesWeights);
547
+ this.matricesWeights = new Float32Array((this.positions.length / 3) * 4);
546
548
  }
547
549
  else {
548
- other.matricesWeights = Array.from(this.matricesWeights);
550
+ other.matricesWeights = new Float32Array((other.positions.length / 3) * 4);
549
551
  }
550
552
  }
551
553
  if (!this.matricesIndicesExtra !== !other.matricesIndicesExtra) {
552
554
  if (!this.matricesIndicesExtra) {
553
- this.matricesIndicesExtra = Array.from(other.matricesIndicesExtra);
555
+ this.matricesIndicesExtra = new Float32Array((this.positions.length / 3) * 4);
554
556
  }
555
557
  else {
556
- other.matricesIndicesExtra = Array.from(this.matricesIndicesExtra);
558
+ other.matricesIndicesExtra = new Float32Array((other.positions.length / 3) * 4);
557
559
  }
558
560
  }
559
561
  if (!this.matricesWeightsExtra !== !other.matricesWeightsExtra) {
560
562
  if (!this.matricesWeightsExtra) {
561
- this.matricesWeightsExtra = Array.from(other.matricesWeightsExtra);
563
+ this.matricesWeightsExtra = new Float32Array((this.positions.length / 3) * 4);
562
564
  }
563
565
  else {
564
- other.matricesWeightsExtra = Array.from(this.matricesWeightsExtra);
566
+ other.matricesWeightsExtra = new Float32Array((other.positions.length / 3) * 4);
565
567
  }
566
568
  }
567
569
  }