@babylonjs/lite-compat 1.16.0-preview → 1.17.0-preview

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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { quatFromRotationMatrix, mat4FromQuatInto, createMeshFromData, setMeshVisible, computeAabb, resizeMeshGeometry, removeFromScene, setThinInstances, setThinInstanceColors, cloneTransformNode, createExtrudeShape, createTube, createRibbon, createPolyhedron, createDisc, createTorusKnot, createTorus, createCylinder, createPlane, createGroundFromHeightMap, updateMeshUvs, createGround, createSphere, createBox, createTransformNode, addToScene, setParent } from "@babylonjs/lite";
4
+ import { quatFromRotationMatrix, mat4FromQuatInto, markMaterialUboDirty, rebuildMaterial, createPbrMaterial, createSolidTexture2D, createStandardMaterial, createMeshFromData, setMeshVisible, computeAabb, resizeMeshGeometry, removeFromScene, createLineSystem, createLineMaterial, setLineMaterialColor, setThinInstances, setThinInstanceColors, cloneTransformNode, updateLineSystem, createExtrudeShape, createTube, createRibbon, createPolyhedron, createDisc, createTorusKnot, createTorus, createCylinder, createPlane, createGroundFromHeightMap, updateMeshUvs, createGround, createSphere, createBox, createTransformNode, addToScene, setParent } from "@babylonjs/lite";
5
5
  class LiteCompatError extends Error {
6
6
  constructor(api, detail) {
7
7
  super(detail ? `'${api}' is not supported by the Babylon Lite compat layer. ${detail}` : `'${api}' is not supported by the Babylon Lite compat layer.`);
@@ -391,6 +391,138 @@ class Vector4 {
391
391
  return new Vector4(0, 0, 0, 0);
392
392
  }
393
393
  }
394
+ class Color3 {
395
+ constructor(r = 0, g = 0, b = 0) {
396
+ this.r = r;
397
+ this.g = g;
398
+ this.b = b;
399
+ }
400
+ set(r, g, b) {
401
+ this.r = r;
402
+ this.g = g;
403
+ this.b = b;
404
+ return this;
405
+ }
406
+ copyFrom(source) {
407
+ this.r = source.r;
408
+ this.g = source.g;
409
+ this.b = source.b;
410
+ return this;
411
+ }
412
+ scale(scale) {
413
+ return new Color3(this.r * scale, this.g * scale, this.b * scale);
414
+ }
415
+ scaleInPlace(scale) {
416
+ this.r *= scale;
417
+ this.g *= scale;
418
+ this.b *= scale;
419
+ return this;
420
+ }
421
+ multiply(other) {
422
+ return new Color3(this.r * other.r, this.g * other.g, this.b * other.b);
423
+ }
424
+ add(other) {
425
+ return new Color3(this.r + other.r, this.g + other.g, this.b + other.b);
426
+ }
427
+ clone() {
428
+ return new Color3(this.r, this.g, this.b);
429
+ }
430
+ equals(other) {
431
+ return this.r === other.r && this.g === other.g && this.b === other.b;
432
+ }
433
+ asArray() {
434
+ return [this.r, this.g, this.b];
435
+ }
436
+ toColor4(alpha = 1) {
437
+ return new Color4(this.r, this.g, this.b, alpha);
438
+ }
439
+ toHexString() {
440
+ const intR = Math.round(Math.min(Math.max(this.r, 0), 1) * 255);
441
+ const intG = Math.round(Math.min(Math.max(this.g, 0), 1) * 255);
442
+ const intB = Math.round(Math.min(Math.max(this.b, 0), 1) * 255);
443
+ return "#" + toHex(intR) + toHex(intG) + toHex(intB);
444
+ }
445
+ static Black() {
446
+ return new Color3(0, 0, 0);
447
+ }
448
+ static White() {
449
+ return new Color3(1, 1, 1);
450
+ }
451
+ static Red() {
452
+ return new Color3(1, 0, 0);
453
+ }
454
+ static Green() {
455
+ return new Color3(0, 1, 0);
456
+ }
457
+ static Blue() {
458
+ return new Color3(0, 0, 1);
459
+ }
460
+ static FromArray(array, offset = 0) {
461
+ return new Color3(array[offset] ?? 0, array[offset + 1] ?? 0, array[offset + 2] ?? 0);
462
+ }
463
+ static FromInts(r, g, b) {
464
+ return new Color3(r / 255, g / 255, b / 255);
465
+ }
466
+ static FromHexString(hex) {
467
+ if (hex.charAt(0) !== "#" || hex.length < 7) {
468
+ return new Color3(0, 0, 0);
469
+ }
470
+ const r = parseInt(hex.substring(1, 3), 16);
471
+ const g = parseInt(hex.substring(3, 5), 16);
472
+ const b = parseInt(hex.substring(5, 7), 16);
473
+ return Color3.FromInts(r, g, b);
474
+ }
475
+ static Lerp(start, end, amount) {
476
+ return new Color3(start.r + (end.r - start.r) * amount, start.g + (end.g - start.g) * amount, start.b + (end.b - start.b) * amount);
477
+ }
478
+ }
479
+ class Color4 {
480
+ constructor(r = 0, g = 0, b = 0, a = 1) {
481
+ this.r = r;
482
+ this.g = g;
483
+ this.b = b;
484
+ this.a = a;
485
+ }
486
+ set(r, g, b, a) {
487
+ this.r = r;
488
+ this.g = g;
489
+ this.b = b;
490
+ this.a = a;
491
+ return this;
492
+ }
493
+ copyFrom(source) {
494
+ this.r = source.r;
495
+ this.g = source.g;
496
+ this.b = source.b;
497
+ this.a = source.a;
498
+ return this;
499
+ }
500
+ scale(scale) {
501
+ return new Color4(this.r * scale, this.g * scale, this.b * scale, this.a * scale);
502
+ }
503
+ add(other) {
504
+ return new Color4(this.r + other.r, this.g + other.g, this.b + other.b, this.a + other.a);
505
+ }
506
+ clone() {
507
+ return new Color4(this.r, this.g, this.b, this.a);
508
+ }
509
+ equals(other) {
510
+ return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
511
+ }
512
+ asArray() {
513
+ return [this.r, this.g, this.b, this.a];
514
+ }
515
+ static FromArray(array, offset = 0) {
516
+ return new Color4(array[offset] ?? 0, array[offset + 1] ?? 0, array[offset + 2] ?? 0, array[offset + 3] ?? 1);
517
+ }
518
+ static FromInts(r, g, b, a) {
519
+ return new Color4(r / 255, g / 255, b / 255, a / 255);
520
+ }
521
+ }
522
+ function toHex(value) {
523
+ const hex = value.toString(16).toUpperCase();
524
+ return hex.length === 1 ? "0" + hex : hex;
525
+ }
394
526
  class Quaternion {
395
527
  constructor(x = 0, y = 0, z = 0, w = 1) {
396
528
  this.x = x;
@@ -1162,6 +1294,720 @@ class Node {
1162
1294
  _applyParent(_parent) {
1163
1295
  }
1164
1296
  }
1297
+ class Material {
1298
+ constructor(name, scene) {
1299
+ __publicField(this, "name");
1300
+ /** Common transparency mode flag (Babylon.js `Material.transparencyMode`). */
1301
+ __publicField(this, "transparencyMode", null);
1302
+ /** Back-face culling toggle (Babylon.js `Material.backFaceCulling`). */
1303
+ __publicField(this, "_backFaceCulling", true);
1304
+ /** Wireframe rendering toggle (not honoured by all Lite materials). */
1305
+ __publicField(this, "wireframe", false);
1306
+ /** @internal Owning compat scene, when constructed against one. */
1307
+ __publicField(this, "_scene");
1308
+ this.name = name;
1309
+ this._scene = scene;
1310
+ scene == null ? void 0 : scene._registerMaterial(this);
1311
+ }
1312
+ get backFaceCulling() {
1313
+ return this._backFaceCulling;
1314
+ }
1315
+ set backFaceCulling(value) {
1316
+ this._backFaceCulling = value;
1317
+ this._applyBackFaceCulling(value);
1318
+ this._markDirty();
1319
+ }
1320
+ /** @internal Per-material hook to push culling onto the Lite props (Standard vs PBR differ). */
1321
+ _applyBackFaceCulling(_value) {
1322
+ }
1323
+ getClassName() {
1324
+ return "Material";
1325
+ }
1326
+ /**
1327
+ * @internal Copy the shared base + Lite data-property state onto a freshly
1328
+ * constructed clone. The clone keeps the `_buildGroup`/UBO its own factory
1329
+ * created (internal `_`-prefixed fields are never copied), so only the observable
1330
+ * data properties — colours, scalars, and shared texture references — carry over.
1331
+ */
1332
+ _cloneBaseInto(target) {
1333
+ copyLiteMaterialData(this._lite, target._lite);
1334
+ target.transparencyMode = this.transparencyMode;
1335
+ target.wireframe = this.wireframe;
1336
+ target.backFaceCulling = this._backFaceCulling;
1337
+ }
1338
+ /** The scene this material was constructed against (Babylon.js `Material.getScene`). */
1339
+ getScene() {
1340
+ return this._scene;
1341
+ }
1342
+ /**
1343
+ * The textures currently bound to this material (Babylon.js
1344
+ * `Material.getActiveTextures`). The base material owns no texture slots, so
1345
+ * this returns an empty array; each subclass overrides it to enumerate its own
1346
+ * slots and those of its extensions.
1347
+ */
1348
+ getActiveTextures() {
1349
+ return [];
1350
+ }
1351
+ _markDirty() {
1352
+ markMaterialUboDirty(this._lite);
1353
+ }
1354
+ /**
1355
+ * @internal Finalize GPU-facing resources before the mesh is registered.
1356
+ * Base materials need nothing; PBR overrides this to synthesize the solid
1357
+ * textures Babylon Lite's PBR pipeline requires from factor-only materials.
1358
+ */
1359
+ _ensureRenderable(_engine) {
1360
+ }
1361
+ /**
1362
+ * @internal Adopt an owning scene discovered when the material is first assigned
1363
+ * to a mesh (Babylon.js allows `new StandardMaterial(name)` with no scene, then
1364
+ * `mesh.material = mat`). Needed so the texture-readiness path can reconcile the
1365
+ * material into the running scene. Registers with the scene the first time.
1366
+ */
1367
+ _adoptScene(scene) {
1368
+ if (!this._scene) {
1369
+ this._scene = scene;
1370
+ scene._registerMaterial(this);
1371
+ }
1372
+ }
1373
+ /**
1374
+ * @internal Reconcile this material into its scene when the scene is already
1375
+ * live: finalize GPU-facing resources ({@link _ensureRenderable}) and rebuild
1376
+ * the renderables of every mesh using it. A no-op before engine start (the
1377
+ * boot-time build handles those meshes) or when the material has no scene.
1378
+ * Shared by the mesh `material` setter and the texture-readiness callback.
1379
+ */
1380
+ _refreshInScene() {
1381
+ const scene = this._scene;
1382
+ if (!(scene == null ? void 0 : scene._hasStarted)) {
1383
+ return;
1384
+ }
1385
+ this._ensureRenderable(scene.getEngine()._lite);
1386
+ rebuildMaterial(scene._lite, this._lite);
1387
+ }
1388
+ /**
1389
+ * @internal Rebind + rebuild this material once an asynchronously loaded texture
1390
+ * assigned to it becomes GPU-ready. Babylon.js `Texture`s load in the background,
1391
+ * so a texture assigned to a material (or a material assigned to a mesh) before
1392
+ * the load resolves must go back through the rebuild path once the handle exists.
1393
+ * Fires immediately when the texture is already ready (then gated by scene state).
1394
+ */
1395
+ _watchTexture(texture) {
1396
+ var _a;
1397
+ (_a = texture == null ? void 0 : texture._onReady) == null ? void 0 : _a.call(texture, () => this._refreshInScene());
1398
+ }
1399
+ dispose() {
1400
+ var _a;
1401
+ (_a = this._scene) == null ? void 0 : _a._unregisterMaterial(this);
1402
+ this._scene = void 0;
1403
+ }
1404
+ }
1405
+ class PushMaterial extends Material {
1406
+ getClassName() {
1407
+ return "PushMaterial";
1408
+ }
1409
+ }
1410
+ function readColor3(tuple) {
1411
+ return tuple ? new Color3(tuple[0], tuple[1], tuple[2]) : new Color3(0, 0, 0);
1412
+ }
1413
+ function copyLiteMaterialData(src, dst) {
1414
+ const s = src;
1415
+ const d = dst;
1416
+ for (const key of Object.keys(s)) {
1417
+ if (key.startsWith("_")) {
1418
+ continue;
1419
+ }
1420
+ const value = s[key];
1421
+ d[key] = Array.isArray(value) ? value.slice() : value;
1422
+ }
1423
+ }
1424
+ class StandardMaterial extends PushMaterial {
1425
+ constructor(name, scene) {
1426
+ super(name, scene);
1427
+ /** @internal Underlying Babylon Lite standard-material props. */
1428
+ __publicField(this, "_lite");
1429
+ /**
1430
+ * Babylon.js `StandardMaterial.useAlphaFromDiffuseTexture`. Babylon Lite's
1431
+ * alpha test already samples the diffuse texture's alpha (enabled via
1432
+ * `alphaCutOff`), so this is accepted for parity.
1433
+ */
1434
+ __publicField(this, "useAlphaFromDiffuseTexture", false);
1435
+ __publicField(this, "_diffuseTexture", null);
1436
+ __publicField(this, "_bumpTexture", null);
1437
+ __publicField(this, "_emissiveTexture", null);
1438
+ this._lite = createStandardMaterial();
1439
+ }
1440
+ getClassName() {
1441
+ return "StandardMaterial";
1442
+ }
1443
+ get diffuseColor() {
1444
+ return readColor3(this._lite.diffuseColor);
1445
+ }
1446
+ set diffuseColor(value) {
1447
+ this._lite.diffuseColor = [value.r, value.g, value.b];
1448
+ this._markDirty();
1449
+ }
1450
+ get specularColor() {
1451
+ return readColor3(this._lite.specularColor);
1452
+ }
1453
+ set specularColor(value) {
1454
+ this._lite.specularColor = [value.r, value.g, value.b];
1455
+ this._markDirty();
1456
+ }
1457
+ get emissiveColor() {
1458
+ return readColor3(this._lite.emissiveColor);
1459
+ }
1460
+ set emissiveColor(value) {
1461
+ this._lite.emissiveColor = [value.r, value.g, value.b];
1462
+ this._markDirty();
1463
+ }
1464
+ get ambientColor() {
1465
+ return readColor3(this._lite.ambientColor);
1466
+ }
1467
+ set ambientColor(value) {
1468
+ this._lite.ambientColor = [value.r, value.g, value.b];
1469
+ this._markDirty();
1470
+ }
1471
+ get disableLighting() {
1472
+ return this._lite.disableLighting;
1473
+ }
1474
+ set disableLighting(value) {
1475
+ this._lite.disableLighting = value;
1476
+ this._markDirty();
1477
+ }
1478
+ _applyBackFaceCulling(value) {
1479
+ this._lite.backFaceCulling = value;
1480
+ }
1481
+ get alpha() {
1482
+ return this._lite.alpha;
1483
+ }
1484
+ set alpha(value) {
1485
+ this._lite.alpha = value;
1486
+ this._markDirty();
1487
+ }
1488
+ get diffuseTexture() {
1489
+ return this._diffuseTexture;
1490
+ }
1491
+ set diffuseTexture(texture) {
1492
+ this._diffuseTexture = texture;
1493
+ this._lite.diffuseTexture = (texture == null ? void 0 : texture._lite) ?? null;
1494
+ this._watchTexture(texture);
1495
+ this._markDirty();
1496
+ }
1497
+ /**
1498
+ * Babylon.js `StandardMaterial.alphaCutOff` — alpha-test threshold. Fragments
1499
+ * whose diffuse-texture alpha is below this value are discarded. Babylon Lite's
1500
+ * Standard pipeline alpha-tests against the diffuse texture's alpha when
1501
+ * `alphaCutOff > 0`, so this is wired directly.
1502
+ */
1503
+ get alphaCutOff() {
1504
+ return this._lite.alphaCutOff;
1505
+ }
1506
+ set alphaCutOff(value) {
1507
+ this._lite.alphaCutOff = value;
1508
+ this._markDirty();
1509
+ }
1510
+ get bumpTexture() {
1511
+ return this._bumpTexture;
1512
+ }
1513
+ set bumpTexture(texture) {
1514
+ this._bumpTexture = texture;
1515
+ this._lite.bumpTexture = (texture == null ? void 0 : texture._lite) ?? null;
1516
+ this._watchTexture(texture);
1517
+ this._markDirty();
1518
+ }
1519
+ get emissiveTexture() {
1520
+ return this._emissiveTexture;
1521
+ }
1522
+ set emissiveTexture(texture) {
1523
+ this._emissiveTexture = texture;
1524
+ this._lite.emissiveTexture = (texture == null ? void 0 : texture._lite) ?? null;
1525
+ this._watchTexture(texture);
1526
+ this._markDirty();
1527
+ }
1528
+ /** Enumerate the standard-material texture slots that are bound (Babylon.js `getActiveTextures`). */
1529
+ getActiveTextures() {
1530
+ const textures = [];
1531
+ if (this._diffuseTexture) {
1532
+ textures.push(this._diffuseTexture);
1533
+ }
1534
+ if (this._bumpTexture) {
1535
+ textures.push(this._bumpTexture);
1536
+ }
1537
+ if (this._emissiveTexture) {
1538
+ textures.push(this._emissiveTexture);
1539
+ }
1540
+ return textures;
1541
+ }
1542
+ /**
1543
+ * @internal Re-bind texture maps to the Lite material. Babylon.js `Texture`s
1544
+ * load asynchronously, so when `material.diffuseTexture = new Texture(url)` ran
1545
+ * the Lite handle was still undefined. By engine-start the scene has awaited the
1546
+ * loads, so copy the now-resolved handles (and UV tiling) onto the Lite props.
1547
+ */
1548
+ _ensureRenderable(_engine) {
1549
+ const diff = this._diffuseTexture;
1550
+ if (diff == null ? void 0 : diff._lite) {
1551
+ this._lite.diffuseTexture = diff._lite;
1552
+ if (diff.uScale !== void 0 && diff.vScale !== void 0) {
1553
+ this._lite.uvScale = [diff.uScale, diff.vScale];
1554
+ }
1555
+ }
1556
+ const bump = this._bumpTexture;
1557
+ if (bump == null ? void 0 : bump._lite) {
1558
+ this._lite.bumpTexture = bump._lite;
1559
+ }
1560
+ const emissive = this._emissiveTexture;
1561
+ if (emissive == null ? void 0 : emissive._lite) {
1562
+ this._lite.emissiveTexture = emissive._lite;
1563
+ }
1564
+ this._markDirty();
1565
+ }
1566
+ /**
1567
+ * Babylon.js `StandardMaterial.clone(name)`. Copies the diffuse/specular/emissive/
1568
+ * ambient colours and scalars, shares the diffuse/bump/emissive texture references,
1569
+ * and gives the clone its own Lite standard-material renderable.
1570
+ */
1571
+ clone(name) {
1572
+ const cloned = new StandardMaterial(name, this._scene);
1573
+ this._cloneBaseInto(cloned);
1574
+ cloned.useAlphaFromDiffuseTexture = this.useAlphaFromDiffuseTexture;
1575
+ cloned._diffuseTexture = this._diffuseTexture;
1576
+ cloned._bumpTexture = this._bumpTexture;
1577
+ cloned._emissiveTexture = this._emissiveTexture;
1578
+ return cloned;
1579
+ }
1580
+ }
1581
+ class PBRClearCoatConfiguration {
1582
+ constructor(_props, _markDirty) {
1583
+ this._props = _props;
1584
+ this._markDirty = _markDirty;
1585
+ }
1586
+ get isEnabled() {
1587
+ return this._props.isEnabled ?? false;
1588
+ }
1589
+ set isEnabled(value) {
1590
+ this._props.isEnabled = value;
1591
+ this._markDirty();
1592
+ }
1593
+ get intensity() {
1594
+ return this._props.intensity ?? 1;
1595
+ }
1596
+ set intensity(value) {
1597
+ this._props.intensity = value;
1598
+ this._markDirty();
1599
+ }
1600
+ get roughness() {
1601
+ return this._props.roughness ?? 0;
1602
+ }
1603
+ set roughness(value) {
1604
+ this._props.roughness = value;
1605
+ this._markDirty();
1606
+ }
1607
+ get indexOfRefraction() {
1608
+ return this._props.indexOfRefraction ?? 1.5;
1609
+ }
1610
+ set indexOfRefraction(value) {
1611
+ this._props.indexOfRefraction = value;
1612
+ this._markDirty();
1613
+ }
1614
+ }
1615
+ class PBRSheenConfiguration {
1616
+ constructor(_props, _markDirty) {
1617
+ __publicField(this, "_texture", null);
1618
+ this._props = _props;
1619
+ this._markDirty = _markDirty;
1620
+ }
1621
+ get isEnabled() {
1622
+ return this._props.isEnabled;
1623
+ }
1624
+ set isEnabled(value) {
1625
+ this._props.isEnabled = value;
1626
+ this._markDirty();
1627
+ }
1628
+ get intensity() {
1629
+ return this._props.intensity ?? 1;
1630
+ }
1631
+ set intensity(value) {
1632
+ this._props.intensity = value;
1633
+ this._markDirty();
1634
+ }
1635
+ get roughness() {
1636
+ return this._props.roughness ?? 0;
1637
+ }
1638
+ set roughness(value) {
1639
+ this._props.roughness = value;
1640
+ this._markDirty();
1641
+ }
1642
+ get color() {
1643
+ const c = this._props.color ?? [1, 1, 1];
1644
+ return new Color3(c[0], c[1], c[2]);
1645
+ }
1646
+ set color(value) {
1647
+ this._props.color = [value.r, value.g, value.b];
1648
+ this._markDirty();
1649
+ }
1650
+ /** Babylon.js `sheen.texture`. Retains the wrapper and binds the Lite handle if the texture has resolved. */
1651
+ get texture() {
1652
+ return this._texture;
1653
+ }
1654
+ set texture(value) {
1655
+ this._texture = value;
1656
+ if (value == null ? void 0 : value._lite) {
1657
+ this._props.texture = value._lite;
1658
+ } else {
1659
+ delete this._props.texture;
1660
+ }
1661
+ this._markDirty();
1662
+ }
1663
+ /** Enumerate the sheen texture slot for `Material.getActiveTextures`. */
1664
+ getActiveTextures() {
1665
+ return this._texture ? [this._texture] : [];
1666
+ }
1667
+ }
1668
+ class PBRAnisotropicConfiguration {
1669
+ constructor(_props, _markDirty) {
1670
+ this._props = _props;
1671
+ this._markDirty = _markDirty;
1672
+ }
1673
+ get isEnabled() {
1674
+ return this._props.isEnabled;
1675
+ }
1676
+ set isEnabled(value) {
1677
+ this._props.isEnabled = value;
1678
+ this._markDirty();
1679
+ }
1680
+ get intensity() {
1681
+ return this._props.intensity ?? 1;
1682
+ }
1683
+ set intensity(value) {
1684
+ this._props.intensity = value;
1685
+ this._markDirty();
1686
+ }
1687
+ get direction() {
1688
+ const d = this._props.direction ?? [1, 0];
1689
+ return { x: d[0], y: d[1] };
1690
+ }
1691
+ set direction(value) {
1692
+ this._props.direction = [value.x, value.y];
1693
+ this._markDirty();
1694
+ }
1695
+ }
1696
+ class PBRIridescenceConfiguration {
1697
+ constructor(_props, _markDirty) {
1698
+ this._props = _props;
1699
+ this._markDirty = _markDirty;
1700
+ }
1701
+ get isEnabled() {
1702
+ return this._props.isEnabled ?? false;
1703
+ }
1704
+ set isEnabled(value) {
1705
+ this._props.isEnabled = value;
1706
+ this._markDirty();
1707
+ }
1708
+ get intensity() {
1709
+ return this._props.intensity ?? 1;
1710
+ }
1711
+ set intensity(value) {
1712
+ this._props.intensity = value;
1713
+ this._markDirty();
1714
+ }
1715
+ get indexOfRefraction() {
1716
+ return this._props.indexOfRefraction ?? 1.3;
1717
+ }
1718
+ set indexOfRefraction(value) {
1719
+ this._props.indexOfRefraction = value;
1720
+ this._markDirty();
1721
+ }
1722
+ get minimumThickness() {
1723
+ return this._props.minimumThickness ?? 100;
1724
+ }
1725
+ set minimumThickness(value) {
1726
+ this._props.minimumThickness = value;
1727
+ this._markDirty();
1728
+ }
1729
+ get maximumThickness() {
1730
+ return this._props.maximumThickness ?? 400;
1731
+ }
1732
+ set maximumThickness(value) {
1733
+ this._props.maximumThickness = value;
1734
+ this._markDirty();
1735
+ }
1736
+ }
1737
+ class PBRMaterial extends PushMaterial {
1738
+ constructor(name, scene) {
1739
+ super(name, scene);
1740
+ /** @internal Underlying Babylon Lite PBR-material props. */
1741
+ __publicField(this, "_lite");
1742
+ __publicField(this, "_albedoFactor", [1, 1, 1, 1]);
1743
+ __publicField(this, "_albedoTexture", null);
1744
+ /**
1745
+ * Babylon.js `material.forceIrradianceInFragment`. Babylon Lite computes
1746
+ * irradiance in the fragment stage already, so this is accepted for parity.
1747
+ */
1748
+ __publicField(this, "forceIrradianceInFragment", false);
1749
+ __publicField(this, "_clearCoat");
1750
+ __publicField(this, "_sheen");
1751
+ __publicField(this, "_anisotropy");
1752
+ __publicField(this, "_iridescence");
1753
+ __publicField(this, "_environmentTexture", null);
1754
+ this._lite = createPbrMaterial();
1755
+ if (!this._lite.baseColorFactor) {
1756
+ this._lite.baseColorFactor = [1, 1, 1, 1];
1757
+ }
1758
+ }
1759
+ getClassName() {
1760
+ return "PBRMaterial";
1761
+ }
1762
+ get albedoColor() {
1763
+ return new Color3(this._albedoFactor[0], this._albedoFactor[1], this._albedoFactor[2]);
1764
+ }
1765
+ set albedoColor(value) {
1766
+ this._albedoFactor = [value.r, value.g, value.b, this._albedoFactor[3]];
1767
+ this._lite.baseColorFactor = [...this._albedoFactor];
1768
+ this._markDirty();
1769
+ }
1770
+ /**
1771
+ * Babylon.js `pbr.albedoTexture` (glTF base-color map). The texture loads
1772
+ * asynchronously, so the resolved Lite handle (+ sRGB flag) is bound in
1773
+ * {@link _ensureRenderable} at engine start rather than here.
1774
+ */
1775
+ get albedoTexture() {
1776
+ return this._albedoTexture;
1777
+ }
1778
+ set albedoTexture(texture) {
1779
+ this._albedoTexture = texture;
1780
+ this._watchTexture(texture);
1781
+ this._markDirty();
1782
+ }
1783
+ /**
1784
+ * Enumerate every bound PBR texture slot, including extension sub-configurations
1785
+ * (Babylon.js `PBRMaterial.getActiveTextures`).
1786
+ */
1787
+ getActiveTextures() {
1788
+ const textures = [];
1789
+ if (this._albedoTexture) {
1790
+ textures.push(this._albedoTexture);
1791
+ }
1792
+ const environmentTexture = this.environmentTexture;
1793
+ if (environmentTexture) {
1794
+ textures.push(environmentTexture);
1795
+ }
1796
+ if (this._sheen) {
1797
+ textures.push(...this._sheen.getActiveTextures());
1798
+ }
1799
+ return textures;
1800
+ }
1801
+ get metallic() {
1802
+ return this._lite.metallicFactor ?? 1;
1803
+ }
1804
+ set metallic(value) {
1805
+ this._lite.metallicFactor = value;
1806
+ this._markDirty();
1807
+ }
1808
+ get roughness() {
1809
+ return this._lite.roughnessFactor ?? 1;
1810
+ }
1811
+ set roughness(value) {
1812
+ this._lite.roughnessFactor = value;
1813
+ this._markDirty();
1814
+ }
1815
+ get emissiveColor() {
1816
+ return readColor3(this._lite.emissiveColor);
1817
+ }
1818
+ set emissiveColor(value) {
1819
+ this._lite.emissiveColor = [value.r, value.g, value.b];
1820
+ this._markDirty();
1821
+ }
1822
+ /**
1823
+ * Babylon.js `pbr.usePhysicalLightFalloff`. When false, point/spot lights use
1824
+ * Standard-style linear range falloff instead of physical inverse-square.
1825
+ * Default true (matches Babylon.js PBRMaterial).
1826
+ */
1827
+ get usePhysicalLightFalloff() {
1828
+ return this._lite.usePhysicalLightFalloff ?? true;
1829
+ }
1830
+ set usePhysicalLightFalloff(value) {
1831
+ this._lite.usePhysicalLightFalloff = value;
1832
+ this._markDirty();
1833
+ }
1834
+ get alpha() {
1835
+ return this._lite.alpha ?? 1;
1836
+ }
1837
+ set alpha(value) {
1838
+ this._lite.alpha = value;
1839
+ this._markDirty();
1840
+ }
1841
+ _applyBackFaceCulling(value) {
1842
+ this._lite.doubleSided = !value;
1843
+ }
1844
+ /**
1845
+ * Babylon.js `pbr.clearCoat` sub-configuration. Lazily allocates the Lite
1846
+ * `clearCoat` props on first access and proxies the common fields
1847
+ * (`isEnabled`, `intensity`, `roughness`, `indexOfRefraction`) onto them.
1848
+ */
1849
+ get clearCoat() {
1850
+ if (!this._clearCoat) {
1851
+ if (!this._lite.clearCoat) {
1852
+ this._lite.clearCoat = { isEnabled: false };
1853
+ }
1854
+ this._clearCoat = new PBRClearCoatConfiguration(this._lite.clearCoat, () => this._markDirty());
1855
+ }
1856
+ return this._clearCoat;
1857
+ }
1858
+ /** Babylon.js `pbr.sheen` sub-configuration (Lite `SheenProps`). */
1859
+ get sheen() {
1860
+ if (!this._sheen) {
1861
+ if (!this._lite.sheen) {
1862
+ this._lite.sheen = { isEnabled: false };
1863
+ }
1864
+ this._sheen = new PBRSheenConfiguration(this._lite.sheen, () => this._markDirty());
1865
+ }
1866
+ return this._sheen;
1867
+ }
1868
+ /** Babylon.js `pbr.anisotropy` sub-configuration (Lite `AnisotropyProps`). */
1869
+ get anisotropy() {
1870
+ if (!this._anisotropy) {
1871
+ if (!this._lite.anisotropy) {
1872
+ this._lite.anisotropy = { isEnabled: false };
1873
+ }
1874
+ this._anisotropy = new PBRAnisotropicConfiguration(this._lite.anisotropy, () => this._markDirty());
1875
+ }
1876
+ return this._anisotropy;
1877
+ }
1878
+ /** Babylon.js `pbr.iridescence` sub-configuration (Lite `IridescenceProps`). */
1879
+ get iridescence() {
1880
+ if (!this._iridescence) {
1881
+ if (!this._lite.iridescence) {
1882
+ this._lite.iridescence = { isEnabled: false };
1883
+ }
1884
+ this._iridescence = new PBRIridescenceConfiguration(this._lite.iridescence, () => this._markDirty());
1885
+ }
1886
+ return this._iridescence;
1887
+ }
1888
+ /**
1889
+ * Babylon.js `material.environmentTexture` / `reflectionTexture`. Babylon Lite
1890
+ * applies image-based lighting scene-wide rather than per-material, so a cube
1891
+ * environment assigned to a material is routed to the owning scene's
1892
+ * environment (the dominant single-IBL case Babylon.js scenes use).
1893
+ */
1894
+ get environmentTexture() {
1895
+ var _a;
1896
+ return this._environmentTexture ?? ((_a = this._scene) == null ? void 0 : _a.environmentTexture) ?? null;
1897
+ }
1898
+ set environmentTexture(value) {
1899
+ this._environmentTexture = value;
1900
+ if (this._scene) {
1901
+ this._scene.environmentTexture = value;
1902
+ }
1903
+ }
1904
+ get reflectionTexture() {
1905
+ return this.environmentTexture;
1906
+ }
1907
+ set reflectionTexture(value) {
1908
+ this.environmentTexture = value;
1909
+ }
1910
+ /** @internal Bind resolved textures and synthesize the solid textures Babylon Lite's PBR pipeline requires from a factor-only material. */
1911
+ _ensureRenderable(engine) {
1912
+ const lite = this._lite;
1913
+ const albedo = this._albedoTexture;
1914
+ if (albedo == null ? void 0 : albedo._lite) {
1915
+ lite.baseColorTexture = albedo._lite;
1916
+ lite.baseColorFactor = [...this._albedoFactor];
1917
+ lite.gammaAlbedo = albedo.gammaSpace ?? true;
1918
+ }
1919
+ if (!lite.baseColorTexture) {
1920
+ const f = this._albedoFactor;
1921
+ lite.baseColorTexture = createSolidTexture2D(engine, f[0], f[1], f[2], f[3]);
1922
+ lite.baseColorFactor = [1, 1, 1, 1];
1923
+ }
1924
+ if (!lite.ormTexture) {
1925
+ const rough = lite.roughnessFactor ?? 1;
1926
+ const metal = lite.metallicFactor ?? 1;
1927
+ lite.ormTexture = createSolidTexture2D(engine, 1, rough, metal);
1928
+ lite.roughnessFactor = 1;
1929
+ lite.metallicFactor = 1;
1930
+ }
1931
+ }
1932
+ /**
1933
+ * Babylon.js `PBRMaterial.clone(name)`. Copies the albedo/metallic/roughness/
1934
+ * emissive state, shares the albedo texture reference, gives the clone independent
1935
+ * clearcoat/sheen/anisotropy/iridescence sub-configurations (sharing any nested
1936
+ * texture), and a fresh Lite PBR renderable.
1937
+ */
1938
+ clone(name) {
1939
+ const cloned = new PBRMaterial(name, this._scene);
1940
+ this._clonePbrInto(cloned);
1941
+ return cloned;
1942
+ }
1943
+ /**
1944
+ * @internal Copy PBR-specific compat + Lite state onto a freshly constructed PBR
1945
+ * clone (used by every `PBRMaterial` subclass so each returns its own concrete
1946
+ * type). The base `_cloneBaseInto` shares the sub-config objects by reference; this
1947
+ * re-copies them so the clone's `clearCoat`/`sheen`/… mutate independently while
1948
+ * still sharing any nested texture handle.
1949
+ */
1950
+ _clonePbrInto(target) {
1951
+ this._cloneBaseInto(target);
1952
+ target.forceIrradianceInFragment = this.forceIrradianceInFragment;
1953
+ target._albedoFactor = [...this._albedoFactor];
1954
+ target._albedoTexture = this._albedoTexture;
1955
+ const src = this._lite;
1956
+ const dst = target._lite;
1957
+ if (src.clearCoat) {
1958
+ dst.clearCoat = { ...src.clearCoat };
1959
+ }
1960
+ if (src.sheen) {
1961
+ dst.sheen = { ...src.sheen };
1962
+ }
1963
+ if (src.anisotropy) {
1964
+ dst.anisotropy = { ...src.anisotropy };
1965
+ }
1966
+ if (src.iridescence) {
1967
+ dst.iridescence = { ...src.iridescence };
1968
+ }
1969
+ }
1970
+ }
1971
+ class PBRMetallicRoughnessMaterial extends PBRMaterial {
1972
+ getClassName() {
1973
+ return "PBRMetallicRoughnessMaterial";
1974
+ }
1975
+ /** Alias of `albedoColor` (glTF "base color"). */
1976
+ get baseColor() {
1977
+ return this.albedoColor;
1978
+ }
1979
+ set baseColor(value) {
1980
+ this.albedoColor = value;
1981
+ }
1982
+ clone(name) {
1983
+ const cloned = new PBRMetallicRoughnessMaterial(name, this._scene);
1984
+ this._clonePbrInto(cloned);
1985
+ return cloned;
1986
+ }
1987
+ }
1988
+ class PBRSpecularGlossinessMaterial extends PBRMaterial {
1989
+ getClassName() {
1990
+ return "PBRSpecularGlossinessMaterial";
1991
+ }
1992
+ get diffuseColor() {
1993
+ return this.albedoColor;
1994
+ }
1995
+ set diffuseColor(value) {
1996
+ this.albedoColor = value;
1997
+ }
1998
+ /** Maps glossiness → (1 - roughness). */
1999
+ get glossiness() {
2000
+ return 1 - this.roughness;
2001
+ }
2002
+ set glossiness(value) {
2003
+ this.roughness = 1 - value;
2004
+ }
2005
+ clone(name) {
2006
+ const cloned = new PBRSpecularGlossinessMaterial(name, this._scene);
2007
+ this._clonePbrInto(cloned);
2008
+ return cloned;
2009
+ }
2010
+ }
1165
2011
  function fillFlatNormals(positions, indices, indexOffset, indexCount, vertexBase, out) {
1166
2012
  for (let i = 0; i < indexCount; i += 3) {
1167
2013
  const a = (indices[indexOffset + i] + vertexBase) * 3;
@@ -1262,6 +2108,32 @@ function mergeMeshGeometry(engine, name, meshes) {
1262
2108
  }
1263
2109
  return createMeshFromData(engine, name, positions, normals, indices, uvs);
1264
2110
  }
2111
+ class LinesMaterial extends Material {
2112
+ constructor(name, lite, scene) {
2113
+ super(name, scene);
2114
+ __publicField(this, "_lite");
2115
+ this._lite = lite;
2116
+ }
2117
+ getClassName() {
2118
+ return "ShaderMaterial";
2119
+ }
2120
+ clone(name) {
2121
+ return new LinesMaterial(
2122
+ name,
2123
+ createLineMaterial({
2124
+ name,
2125
+ color: this._lite.color,
2126
+ useVertexColor: this._lite.useVertexColor,
2127
+ useVertexAlpha: this._lite.useVertexAlpha,
2128
+ useThinInstances: this._lite.useThinInstances,
2129
+ useThinInstanceColors: this._lite.useThinInstanceColors,
2130
+ depthWrite: this._lite.depthWrite,
2131
+ depthCompare: this._lite.depthCompare
2132
+ }),
2133
+ this.getScene()
2134
+ );
2135
+ }
2136
+ }
1265
2137
  function isCompatScene(value) {
1266
2138
  return typeof value.getEngine === "function";
1267
2139
  }
@@ -2020,6 +2892,122 @@ class Mesh extends AbstractMesh {
2020
2892
  return merged;
2021
2893
  }
2022
2894
  }
2895
+ function createObservableLineColor(onChange) {
2896
+ const color = new Color3(1, 1, 1);
2897
+ let r = color.r;
2898
+ let g = color.g;
2899
+ let b = color.b;
2900
+ Object.defineProperties(color, {
2901
+ r: {
2902
+ get: () => r,
2903
+ set: (value) => {
2904
+ r = value;
2905
+ onChange(color);
2906
+ },
2907
+ enumerable: true,
2908
+ configurable: true
2909
+ },
2910
+ g: {
2911
+ get: () => g,
2912
+ set: (value) => {
2913
+ g = value;
2914
+ onChange(color);
2915
+ },
2916
+ enumerable: true,
2917
+ configurable: true
2918
+ },
2919
+ b: {
2920
+ get: () => b,
2921
+ set: (value) => {
2922
+ b = value;
2923
+ onChange(color);
2924
+ },
2925
+ enumerable: true,
2926
+ configurable: true
2927
+ }
2928
+ });
2929
+ return color;
2930
+ }
2931
+ class LinesMesh extends Mesh {
2932
+ constructor(name, sceneOrLite, scene, useVertexColor = false, useVertexAlpha = true) {
2933
+ const realScene = isCompatScene(sceneOrLite) ? sceneOrLite : scene;
2934
+ const lite = isCompatScene(sceneOrLite) ? createLineSystem(engineOf(sceneOrLite), {
2935
+ name,
2936
+ lines: [[new Vector3(0, 0, 0)]],
2937
+ ...useVertexColor ? { colors: [[new Color4(1, 1, 1, 1)]] } : {},
2938
+ useVertexAlpha
2939
+ }) : sceneOrLite;
2940
+ const lineMaterial = lite.material;
2941
+ super(name, lite, realScene);
2942
+ __publicField(this, "useVertexColor");
2943
+ __publicField(this, "useVertexAlpha");
2944
+ __publicField(this, "intersectionThreshold", 0.1);
2945
+ __publicField(this, "_lineMaterial");
2946
+ __publicField(this, "_color");
2947
+ __publicField(this, "_alpha", 1);
2948
+ __publicField(this, "_suspendLineColorSync", false);
2949
+ this.useVertexColor = useVertexColor;
2950
+ this.useVertexAlpha = useVertexAlpha;
2951
+ this._lineMaterial = new LinesMaterial("colorShader", lineMaterial, realScene);
2952
+ this.material = this._lineMaterial;
2953
+ this._color = createObservableLineColor(() => {
2954
+ if (!this._suspendLineColorSync) {
2955
+ this._syncLineColor();
2956
+ }
2957
+ });
2958
+ if (isCompatScene(sceneOrLite)) {
2959
+ addPrimitive(this, sceneOrLite);
2960
+ }
2961
+ }
2962
+ getClassName() {
2963
+ return "LinesMesh";
2964
+ }
2965
+ get color() {
2966
+ return this._color;
2967
+ }
2968
+ set color(value) {
2969
+ this._suspendLineColorSync = true;
2970
+ try {
2971
+ this._color.copyFrom(value);
2972
+ } finally {
2973
+ this._suspendLineColorSync = false;
2974
+ }
2975
+ this._syncLineColor();
2976
+ }
2977
+ get alpha() {
2978
+ return this._alpha;
2979
+ }
2980
+ set alpha(value) {
2981
+ this._alpha = value;
2982
+ this._syncLineColor();
2983
+ }
2984
+ thinInstanceSetBuffer(kind, buffer, stride = 16) {
2985
+ super.thinInstanceSetBuffer(kind, buffer, stride);
2986
+ if (buffer && (kind === "matrix" || kind === "color")) {
2987
+ this._enableThinLineMaterial(kind === "color" || this._lineMaterial._lite.useThinInstanceColors);
2988
+ }
2989
+ }
2990
+ _enableThinLineMaterial(useThinInstanceColors) {
2991
+ if (this._lineMaterial._lite.useThinInstances && this._lineMaterial._lite.useThinInstanceColors === useThinInstanceColors) {
2992
+ return;
2993
+ }
2994
+ const lite = createLineMaterial({
2995
+ name: this._lineMaterial.name,
2996
+ color: { r: this._color.r, g: this._color.g, b: this._color.b, a: this._alpha },
2997
+ useVertexColor: this.useVertexColor,
2998
+ useVertexAlpha: this.useVertexAlpha,
2999
+ useThinInstances: true,
3000
+ useThinInstanceColors,
3001
+ depthWrite: this._lineMaterial._lite.depthWrite,
3002
+ depthCompare: this._lineMaterial._lite.depthCompare
3003
+ });
3004
+ this._lineMaterial = new LinesMaterial(this._lineMaterial.name, lite, this.getScene());
3005
+ this.material = this._lineMaterial;
3006
+ }
3007
+ _syncLineColor() {
3008
+ setLineMaterialColor(this._lineMaterial._lite, { r: this._color.r, g: this._color.g, b: this._color.b, a: this._alpha });
3009
+ }
3010
+ }
2023
3011
  class GroundMesh extends Mesh {
2024
3012
  getClassName() {
2025
3013
  return "GroundMesh";
@@ -2204,13 +3192,47 @@ const MeshBuilder = {
2204
3192
  const lite = createExtrudeShape(engineOf(scene), options);
2205
3193
  return addPrimitive(new Mesh(name, lite, scene), scene);
2206
3194
  },
2207
- // ── Known but unsupported (not present in Babylon Lite) ────────────────
2208
- CreateLines() {
2209
- return unsupported("MeshBuilder.CreateLines", "Line meshes are not implemented in Babylon Lite.");
3195
+ CreateLines(name, options, scene) {
3196
+ return CreateLineSystem(
3197
+ name,
3198
+ {
3199
+ lines: [options.points],
3200
+ updatable: options.updatable,
3201
+ instance: options.instance,
3202
+ colors: options.colors ? [options.colors] : void 0,
3203
+ useVertexAlpha: options.useVertexAlpha,
3204
+ material: options.material
3205
+ },
3206
+ scene
3207
+ );
2210
3208
  },
2211
- CreateLineSystem() {
2212
- return unsupported("MeshBuilder.CreateLineSystem", "Line meshes are not implemented in Babylon Lite.");
3209
+ CreateLineSystem(name, options, scene) {
3210
+ if (options.instance) {
3211
+ const instanceScene = options.instance.getScene() ?? scene;
3212
+ if (!instanceScene) {
3213
+ throw new Error("MeshBuilder.CreateLineSystem requires the instance to belong to a scene");
3214
+ }
3215
+ updateLineSystem(engineOf(instanceScene), options.instance._lite, {
3216
+ lines: options.lines,
3217
+ ...options.colors ? { colors: options.colors } : {}
3218
+ });
3219
+ return options.instance;
3220
+ }
3221
+ if (options.material) {
3222
+ return unsupported("MeshBuilder.CreateLineSystem.material", "Custom line materials are not implemented in Babylon Lite compatibility mode.");
3223
+ }
3224
+ if (!scene) {
3225
+ throw new Error("MeshBuilder.CreateLineSystem requires a scene when creating a line system");
3226
+ }
3227
+ const lite = createLineSystem(engineOf(scene), {
3228
+ name,
3229
+ lines: options.lines,
3230
+ ...options.colors ? { colors: options.colors } : {},
3231
+ useVertexAlpha: options.useVertexAlpha
3232
+ });
3233
+ return addPrimitive(new LinesMesh(name, lite, scene, !!options.colors, options.useVertexAlpha ?? true), scene);
2213
3234
  },
3235
+ // ── Known but unsupported (not present in Babylon Lite) ────────────────
2214
3236
  CreateDashedLines() {
2215
3237
  return unsupported("MeshBuilder.CreateDashedLines", "Dashed line meshes are not implemented in Babylon Lite.");
2216
3238
  },
@@ -2254,6 +3276,12 @@ function CreateTorus(name, options, scene) {
2254
3276
  function CreateDisc(name, options, scene) {
2255
3277
  return MeshBuilder.CreateDisc(name, options, scene);
2256
3278
  }
3279
+ function CreateLines(name, options, scene) {
3280
+ return MeshBuilder.CreateLines(name, options, scene);
3281
+ }
3282
+ function CreateLineSystem(name, options, scene) {
3283
+ return MeshBuilder.CreateLineSystem(name, options, scene);
3284
+ }
2257
3285
  function CreateTiledBox(name, options, scene) {
2258
3286
  return MeshBuilder.CreateTiledBox(name, options, scene);
2259
3287
  }
@@ -2263,34 +3291,49 @@ function CreateTiledPlane(name, options, scene) {
2263
3291
  export {
2264
3292
  AbstractMesh as A,
2265
3293
  BoundingBox as B,
2266
- CreateBox as C,
3294
+ Color3 as C,
3295
+ PushMaterial as D,
3296
+ Vector2 as E,
3297
+ Vector4 as F,
2267
3298
  GroundMesh as G,
3299
+ VertexBuffer as H,
2268
3300
  InstancedMesh as I,
3301
+ VertexData as J,
3302
+ transformCoordinates as K,
2269
3303
  LiteCompatError as L,
2270
3304
  Matrix as M,
2271
3305
  Node as N,
3306
+ transformNormal as O,
3307
+ PBRAnisotropicConfiguration as P,
2272
3308
  Quaternion as Q,
3309
+ StandardMaterial as S,
2273
3310
  TransformNode as T,
2274
3311
  Vector3 as V,
2275
- Mesh as a,
2276
- BoundingInfo as b,
2277
- BoundingSphere as c,
2278
- CreateCylinder as d,
2279
- CreateDisc as e,
2280
- CreateGround as f,
2281
- CreatePlane as g,
2282
- CreateSphere as h,
2283
- CreateTiledBox as i,
2284
- CreateTiledPlane as j,
2285
- CreateTorus as k,
3312
+ Color4 as a,
3313
+ Mesh as b,
3314
+ BoundingInfo as c,
3315
+ BoundingSphere as d,
3316
+ CreateBox as e,
3317
+ CreateCylinder as f,
3318
+ CreateDisc as g,
3319
+ CreateGround as h,
3320
+ CreateLineSystem as i,
3321
+ CreateLines as j,
3322
+ CreatePlane as k,
2286
3323
  liteBackedVector3 as l,
2287
- MeshBuilder as m,
2288
- Vector2 as n,
2289
- Vector4 as o,
2290
- VertexBuffer as p,
2291
- VertexData as q,
2292
- transformNormal as r,
2293
- transformCoordinates as t,
2294
- unsupported as u
3324
+ CreateSphere as m,
3325
+ CreateTiledBox as n,
3326
+ CreateTiledPlane as o,
3327
+ CreateTorus as p,
3328
+ LinesMesh as q,
3329
+ Material as r,
3330
+ MeshBuilder as s,
3331
+ PBRClearCoatConfiguration as t,
3332
+ unsupported as u,
3333
+ PBRIridescenceConfiguration as v,
3334
+ PBRMaterial as w,
3335
+ PBRMetallicRoughnessMaterial as x,
3336
+ PBRSheenConfiguration as y,
3337
+ PBRSpecularGlossinessMaterial as z
2295
3338
  };
2296
- //# sourceMappingURL=meshes-DduMsRJk.js.map
3339
+ //# sourceMappingURL=meshes-0TVZfbq3.js.map