@babylonjs/core 5.31.0 → 5.31.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.
package/Meshes/mesh.d.ts CHANGED
@@ -181,7 +181,7 @@ export declare class Mesh extends AbstractMesh implements IGetSetVerticesData {
181
181
  static _GetDefaultSideOrientation(orientation?: number): number;
182
182
  private _internalMeshDataInfo;
183
183
  /**
184
- * Determines if the LOD levels are intended to be calculated using screen coverage (surface area ratio) instead of distance
184
+ * Determines if the LOD levels are intended to be calculated using screen coverage (surface area ratio) instead of distance.
185
185
  */
186
186
  get useLODScreenCoverage(): boolean;
187
187
  set useLODScreenCoverage(value: boolean);
@@ -346,6 +346,8 @@ export declare class Mesh extends AbstractMesh implements IGetSetVerticesData {
346
346
  * @see https://doc.babylonjs.com/how_to/how_to_use_lod
347
347
  * @param distanceOrScreenCoverage Either distance from the center of the object to show this level or the screen coverage if `useScreenCoverage` is set to `true`.
348
348
  * If screen coverage, value is a fraction of the screen's total surface, between 0 and 1.
349
+ * Example Playground for distance https://playground.babylonjs.com/#QE7KM#197
350
+ * Example Playground for screen coverage https://playground.babylonjs.com/#QE7KM#196
349
351
  * @param mesh The mesh to be added as LOD level (can be null)
350
352
  * @returns This mesh (for chaining)
351
353
  */
package/Meshes/mesh.js CHANGED
@@ -314,13 +314,14 @@ export class Mesh extends AbstractMesh {
314
314
  return orientation || Mesh.FRONTSIDE; // works as Mesh.FRONTSIDE is 0
315
315
  }
316
316
  /**
317
- * Determines if the LOD levels are intended to be calculated using screen coverage (surface area ratio) instead of distance
317
+ * Determines if the LOD levels are intended to be calculated using screen coverage (surface area ratio) instead of distance.
318
318
  */
319
319
  get useLODScreenCoverage() {
320
320
  return this._internalMeshDataInfo._useLODScreenCoverage;
321
321
  }
322
322
  set useLODScreenCoverage(value) {
323
323
  this._internalMeshDataInfo._useLODScreenCoverage = value;
324
+ this._sortLODLevels();
324
325
  }
325
326
  get computeBonesUsingShaders() {
326
327
  return this._internalAbstractMeshDataInfo._computeBonesUsingShaders;
@@ -567,6 +568,8 @@ export class Mesh extends AbstractMesh {
567
568
  * @see https://doc.babylonjs.com/how_to/how_to_use_lod
568
569
  * @param distanceOrScreenCoverage Either distance from the center of the object to show this level or the screen coverage if `useScreenCoverage` is set to `true`.
569
570
  * If screen coverage, value is a fraction of the screen's total surface, between 0 and 1.
571
+ * Example Playground for distance https://playground.babylonjs.com/#QE7KM#197
572
+ * Example Playground for screen coverage https://playground.babylonjs.com/#QE7KM#196
570
573
  * @param mesh The mesh to be added as LOD level (can be null)
571
574
  * @returns This mesh (for chaining)
572
575
  */