babylonjs-gui 5.22.0 → 5.22.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/babylon.gui.d.ts +6 -0
- package/babylon.gui.js +15 -0
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +1 -1
- package/babylon.gui.min.js.map +1 -1
- package/babylon.gui.module.d.ts +12 -0
- package/package.json +2 -2
package/babylon.gui.d.ts
CHANGED
|
@@ -423,6 +423,12 @@ declare module BABYLON.GUI {
|
|
|
423
423
|
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
424
424
|
*/
|
|
425
425
|
parseSerializedObject(serializedObject: any, scaleToSize?: boolean): void;
|
|
426
|
+
/**
|
|
427
|
+
* Clones the ADT
|
|
428
|
+
* @param newName defines the name of the new ADT
|
|
429
|
+
* @returns the clone of the ADT
|
|
430
|
+
*/
|
|
431
|
+
clone(newName?: string): AdvancedDynamicTexture;
|
|
426
432
|
/**
|
|
427
433
|
* Recreate the content of the ADT from a JSON object
|
|
428
434
|
* @param serializedObject define the JSON serialized object to restore from
|
package/babylon.gui.js
CHANGED
|
@@ -1653,6 +1653,21 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
1655
|
};
|
|
1656
|
+
/**
|
|
1657
|
+
* Clones the ADT
|
|
1658
|
+
* @param newName defines the name of the new ADT
|
|
1659
|
+
* @returns the clone of the ADT
|
|
1660
|
+
*/
|
|
1661
|
+
AdvancedDynamicTexture.prototype.clone = function (newName) {
|
|
1662
|
+
var scene = this.getScene();
|
|
1663
|
+
if (!scene) {
|
|
1664
|
+
return this;
|
|
1665
|
+
}
|
|
1666
|
+
var data = this.serializeContent();
|
|
1667
|
+
var clone = AdvancedDynamicTexture.CreateFullscreenUI(newName || "Clone of " + this.name, this.isForeground, scene, this.samplingMode);
|
|
1668
|
+
clone.parseSerializedObject(data);
|
|
1669
|
+
return clone;
|
|
1670
|
+
};
|
|
1656
1671
|
/**
|
|
1657
1672
|
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
1658
1673
|
* @param snippetId defines the snippet to load
|