@babylonjs/lite-compat 1.39.3 → 1.40.0

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.
@@ -647,6 +647,14 @@ var Color4 = class Color4 {
647
647
  this.a
648
648
  ];
649
649
  }
650
+ toHexString(returnAsColor3 = false) {
651
+ const intR = Math.round(Math.min(Math.max(this.r, 0), 1) * 255);
652
+ const intG = Math.round(Math.min(Math.max(this.g, 0), 1) * 255);
653
+ const intB = Math.round(Math.min(Math.max(this.b, 0), 1) * 255);
654
+ const rgb = "#" + toHex(intR) + toHex(intG) + toHex(intB);
655
+ if (returnAsColor3) return rgb;
656
+ return rgb + toHex(Math.round(Math.min(Math.max(this.a, 0), 1) * 255));
657
+ }
650
658
  static FromArray(array, offset = 0) {
651
659
  return new Color4(array[offset] ?? 0, array[offset + 1] ?? 0, array[offset + 2] ?? 0, array[offset + 3] ?? 1);
652
660
  }
@@ -4499,4 +4507,4 @@ var PolygonBuilder = {
4499
4507
  function RegisterPolygonBuilder() {}
4500
4508
  export { Vector2 as $, Material as A, attachMaterialToScene as B, RegisterPolygonBuilder as C, registerMeshAtStart as D, VertexData as E, PBRMetallicRoughnessMaterial as F, BoundingSphere as G, Observable as H, PBRSheenConfiguration as I, transformNormal as J, Matrix as K, PBRSpecularGlossinessMaterial as L, PBRClearCoatConfiguration as M, PBRIridescenceConfiguration as N, MorphTarget as O, PBRMaterial as P, liteBackedColor3 as Q, PushMaterial as R, PolygonBuilder as S, VertexBuffer as T, BoundingBox as U, Node as V, BoundingInfo as W, Color3 as X, Quaternion as Y, Color4 as Z, GroundMesh as _, CreateDisc as a, Mesh as b, CreateLines as c, CreatePolygonVertexData as d, Vector3 as et, CreateSphere as f, ExtrudePolygon as g, CreateTorus as h, CreateDashedLines as i, unsupported as it, PBRAnisotropicConfiguration as j, MorphTargetManager as k, CreatePlane as l, CreateTiledPlane as m, CreateBox as n, liteBackedVector3 as nt, CreateGround as o, CreateTiledBox as p, transformCoordinates as q, CreateCylinder as r, LiteCompatError as rt, CreateLineSystem as s, AbstractMesh as t, Vector4 as tt, CreatePolygon as u, InstancedMesh as v, TransformNode as w, MeshBuilder as x, LinesMesh as y, StandardMaterial as z };
4501
4509
 
4502
- //# sourceMappingURL=meshes-FwqJpX7D.js.map
4510
+ //# sourceMappingURL=meshes-CdVN59oi.js.map