|
@@ -22,7 +22,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var AdvancedDynamicTexture = (function (_super) {
|
|
__extends(AdvancedDynamicTexture, _super);
|
|
__extends(AdvancedDynamicTexture, _super);
|
|
function AdvancedDynamicTexture(name, width, height, scene, generateMipMaps, samplingMode) {
|
|
function AdvancedDynamicTexture(name, width, height, scene, generateMipMaps, samplingMode) {
|
|
if (width === void 0) { width = 0; }
|
|
if (width === void 0) { width = 0; }
|
|
@@ -462,7 +462,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Measure = /** @class */ (function () {
|
|
|
|
|
|
+ var Measure = (function () {
|
|
function Measure(left, top, width, height) {
|
|
function Measure(left, top, width, height) {
|
|
this.left = left;
|
|
this.left = left;
|
|
this.top = top;
|
|
this.top = top;
|
|
@@ -507,7 +507,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Vector2WithInfo = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Vector2WithInfo = (function (_super) {
|
|
__extends(Vector2WithInfo, _super);
|
|
__extends(Vector2WithInfo, _super);
|
|
function Vector2WithInfo(source, buttonIndex) {
|
|
function Vector2WithInfo(source, buttonIndex) {
|
|
if (buttonIndex === void 0) { buttonIndex = 0; }
|
|
if (buttonIndex === void 0) { buttonIndex = 0; }
|
|
@@ -518,7 +518,7 @@ var BABYLON;
|
|
return Vector2WithInfo;
|
|
return Vector2WithInfo;
|
|
}(BABYLON.Vector2));
|
|
}(BABYLON.Vector2));
|
|
GUI.Vector2WithInfo = Vector2WithInfo;
|
|
GUI.Vector2WithInfo = Vector2WithInfo;
|
|
- var Matrix2D = /** @class */ (function () {
|
|
|
|
|
|
+ var Matrix2D = (function () {
|
|
function Matrix2D(m00, m01, m10, m11, m20, m21) {
|
|
function Matrix2D(m00, m01, m10, m11, m20, m21) {
|
|
this.m = new Float32Array(6);
|
|
this.m = new Float32Array(6);
|
|
this.fromValues(m00, m01, m10, m11, m20, m21);
|
|
this.fromValues(m00, m01, m10, m11, m20, m21);
|
|
@@ -639,7 +639,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var ValueAndUnit = /** @class */ (function () {
|
|
|
|
|
|
+ var ValueAndUnit = (function () {
|
|
function ValueAndUnit(value, unit, negativeValueAllowed) {
|
|
function ValueAndUnit(value, unit, negativeValueAllowed) {
|
|
if (unit === void 0) { unit = ValueAndUnit.UNITMODE_PIXEL; }
|
|
if (unit === void 0) { unit = ValueAndUnit.UNITMODE_PIXEL; }
|
|
if (negativeValueAllowed === void 0) { negativeValueAllowed = true; }
|
|
if (negativeValueAllowed === void 0) { negativeValueAllowed = true; }
|
|
@@ -757,7 +757,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Control = /** @class */ (function () {
|
|
|
|
|
|
+ var Control = (function () {
|
|
// Functions
|
|
// Functions
|
|
function Control(name) {
|
|
function Control(name) {
|
|
this.name = name;
|
|
this.name = name;
|
|
@@ -1803,7 +1803,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Container = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Container = (function (_super) {
|
|
__extends(Container, _super);
|
|
__extends(Container, _super);
|
|
function Container(name) {
|
|
function Container(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -1982,7 +1982,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var StackPanel = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var StackPanel = (function (_super) {
|
|
__extends(StackPanel, _super);
|
|
__extends(StackPanel, _super);
|
|
function StackPanel(name) {
|
|
function StackPanel(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -2124,7 +2124,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Rectangle = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Rectangle = (function (_super) {
|
|
__extends(Rectangle, _super);
|
|
__extends(Rectangle, _super);
|
|
function Rectangle(name) {
|
|
function Rectangle(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -2240,7 +2240,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Ellipse = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Ellipse = (function (_super) {
|
|
__extends(Ellipse, _super);
|
|
__extends(Ellipse, _super);
|
|
function Ellipse(name) {
|
|
function Ellipse(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -2306,7 +2306,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Line = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Line = (function (_super) {
|
|
__extends(Line, _super);
|
|
__extends(Line, _super);
|
|
function Line(name) {
|
|
function Line(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -2506,7 +2506,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Slider = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Slider = (function (_super) {
|
|
__extends(Slider, _super);
|
|
__extends(Slider, _super);
|
|
function Slider(name) {
|
|
function Slider(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -2740,7 +2740,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Checkbox = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Checkbox = (function (_super) {
|
|
__extends(Checkbox, _super);
|
|
__extends(Checkbox, _super);
|
|
function Checkbox(name) {
|
|
function Checkbox(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -2856,7 +2856,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var RadioButton = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var RadioButton = (function (_super) {
|
|
__extends(RadioButton, _super);
|
|
__extends(RadioButton, _super);
|
|
function RadioButton(name) {
|
|
function RadioButton(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -2993,7 +2993,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var TextBlock = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var TextBlock = (function (_super) {
|
|
__extends(TextBlock, _super);
|
|
__extends(TextBlock, _super);
|
|
function TextBlock(name, text) {
|
|
function TextBlock(name, text) {
|
|
if (text === void 0) { text = ""; }
|
|
if (text === void 0) { text = ""; }
|
|
@@ -3202,7 +3202,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Image = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Image = (function (_super) {
|
|
__extends(Image, _super);
|
|
__extends(Image, _super);
|
|
function Image(name, url) {
|
|
function Image(name, url) {
|
|
if (url === void 0) { url = null; }
|
|
if (url === void 0) { url = null; }
|
|
@@ -3215,6 +3215,9 @@ var BABYLON;
|
|
_this._sourceTop = 0;
|
|
_this._sourceTop = 0;
|
|
_this._sourceWidth = 0;
|
|
_this._sourceWidth = 0;
|
|
_this._sourceHeight = 0;
|
|
_this._sourceHeight = 0;
|
|
|
|
+ _this._cellWidth = 0;
|
|
|
|
+ _this._cellHeight = 0;
|
|
|
|
+ _this._cellId = 0;
|
|
_this.source = url;
|
|
_this.source = url;
|
|
return _this;
|
|
return _this;
|
|
}
|
|
}
|
|
@@ -3353,6 +3356,36 @@ var BABYLON;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(Image.prototype, "cellWidth", {
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._cellWidth;
|
|
|
|
+ },
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._cellWidth = value;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
|
|
+ Object.defineProperty(Image.prototype, "cellHeight", {
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._cellHeight;
|
|
|
|
+ },
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._cellHeight = value;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
|
|
+ Object.defineProperty(Image.prototype, "cellId", {
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._cellId;
|
|
|
|
+ },
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._cellId = value;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
Image.prototype._getTypeName = function () {
|
|
Image.prototype._getTypeName = function () {
|
|
return "Image";
|
|
return "Image";
|
|
};
|
|
};
|
|
@@ -3397,6 +3430,12 @@ var BABYLON;
|
|
this._root.height = this.height;
|
|
this._root.height = this.height;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
|
|
+ case Image.ANIMATION_SHEET:
|
|
|
|
+ var rowCount = this._domImage.naturalWidth / this.cellWidth;
|
|
|
|
+ var column = (this.cellId / rowCount) >> 0;
|
|
|
|
+ var row = this.cellId % rowCount;
|
|
|
|
+ context.drawImage(this._domImage, this.cellWidth * row, this.cellHeight * column, this.cellWidth, this.cellHeight, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3430,11 +3469,19 @@ var BABYLON;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(Image, "ANIMATION_SHEET", {
|
|
|
|
+ get: function () {
|
|
|
|
+ return Image._ANIMATION_SHEET;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
// Static
|
|
// Static
|
|
Image._STRETCH_NONE = 0;
|
|
Image._STRETCH_NONE = 0;
|
|
Image._STRETCH_FILL = 1;
|
|
Image._STRETCH_FILL = 1;
|
|
Image._STRETCH_UNIFORM = 2;
|
|
Image._STRETCH_UNIFORM = 2;
|
|
Image._STRETCH_EXTEND = 3;
|
|
Image._STRETCH_EXTEND = 3;
|
|
|
|
+ Image._ANIMATION_SHEET = 4;
|
|
return Image;
|
|
return Image;
|
|
}(GUI.Control));
|
|
}(GUI.Control));
|
|
GUI.Image = Image;
|
|
GUI.Image = Image;
|
|
@@ -3449,7 +3496,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var Button = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var Button = (function (_super) {
|
|
__extends(Button, _super);
|
|
__extends(Button, _super);
|
|
function Button(name) {
|
|
function Button(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -3578,7 +3625,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var ColorPicker = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var ColorPicker = (function (_super) {
|
|
__extends(ColorPicker, _super);
|
|
__extends(ColorPicker, _super);
|
|
function ColorPicker(name) {
|
|
function ColorPicker(name) {
|
|
var _this = _super.call(this, name) || this;
|
|
var _this = _super.call(this, name) || this;
|
|
@@ -3924,7 +3971,7 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var InputText = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var InputText = (function (_super) {
|
|
__extends(InputText, _super);
|
|
__extends(InputText, _super);
|
|
function InputText(name, text) {
|
|
function InputText(name, text) {
|
|
if (text === void 0) { text = ""; }
|
|
if (text === void 0) { text = ""; }
|
|
@@ -4173,12 +4220,12 @@ var BABYLON;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
// Printable characters
|
|
// Printable characters
|
|
- if ((keyCode === -1) || // Direct access
|
|
|
|
- (keyCode === 32) || // Space
|
|
|
|
- (keyCode > 47 && keyCode < 58) || // Numbers
|
|
|
|
- (keyCode > 64 && keyCode < 91) || // Letters
|
|
|
|
- (keyCode > 185 && keyCode < 193) || // Special characters
|
|
|
|
- (keyCode > 218 && keyCode < 223) || // Special characters
|
|
|
|
|
|
+ if ((keyCode === -1) ||
|
|
|
|
+ (keyCode === 32) ||
|
|
|
|
+ (keyCode > 47 && keyCode < 58) ||
|
|
|
|
+ (keyCode > 64 && keyCode < 91) ||
|
|
|
|
+ (keyCode > 185 && keyCode < 193) ||
|
|
|
|
+ (keyCode > 218 && keyCode < 223) ||
|
|
(keyCode > 95 && keyCode < 112)) {
|
|
(keyCode > 95 && keyCode < 112)) {
|
|
if (this._cursorOffset === 0) {
|
|
if (this._cursorOffset === 0) {
|
|
this.text += key;
|
|
this.text += key;
|
|
@@ -4337,13 +4384,13 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var GUI;
|
|
var GUI;
|
|
(function (GUI) {
|
|
(function (GUI) {
|
|
- var KeyPropertySet = /** @class */ (function () {
|
|
|
|
|
|
+ var KeyPropertySet = (function () {
|
|
function KeyPropertySet() {
|
|
function KeyPropertySet() {
|
|
}
|
|
}
|
|
return KeyPropertySet;
|
|
return KeyPropertySet;
|
|
}());
|
|
}());
|
|
GUI.KeyPropertySet = KeyPropertySet;
|
|
GUI.KeyPropertySet = KeyPropertySet;
|
|
- var VirtualKeyboard = /** @class */ (function (_super) {
|
|
|
|
|
|
+ var VirtualKeyboard = (function (_super) {
|
|
__extends(VirtualKeyboard, _super);
|
|
__extends(VirtualKeyboard, _super);
|
|
function VirtualKeyboard() {
|
|
function VirtualKeyboard() {
|
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|