|
@@ -16599,6 +16599,11 @@ var BABYLON;
|
|
|
if (scene === void 0) { scene = null; }
|
|
|
if (isPure === void 0) { isPure = true; }
|
|
|
var _this = _super.call(this, name, scene) || this;
|
|
|
+ _this._forward = new BABYLON.Vector3(0, 0, 1);
|
|
|
+ _this._forwardInverted = new BABYLON.Vector3(0, 0, -1);
|
|
|
+ _this._up = new BABYLON.Vector3(0, 1, 0);
|
|
|
+ _this._right = new BABYLON.Vector3(1, 0, 0);
|
|
|
+ _this._rightInverted = new BABYLON.Vector3(-1, 0, 0);
|
|
|
// Properties
|
|
|
_this._rotation = BABYLON.Vector3.Zero();
|
|
|
_this._scaling = BABYLON.Vector3.One();
|
|
@@ -16684,6 +16689,36 @@ var BABYLON;
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
+ Object.defineProperty(TransformNode.prototype, "forward", {
|
|
|
+ /**
|
|
|
+ * The forward direction of that transform in world space.
|
|
|
+ */
|
|
|
+ get: function () {
|
|
|
+ return BABYLON.Vector3.Normalize(BABYLON.Vector3.TransformNormal(this.getScene().useRightHandedSystem ? this._forwardInverted : this._forward, this.getWorldMatrix()));
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(TransformNode.prototype, "up", {
|
|
|
+ /**
|
|
|
+ * The up direction of that transform in world space.
|
|
|
+ */
|
|
|
+ get: function () {
|
|
|
+ return BABYLON.Vector3.Normalize(BABYLON.Vector3.TransformNormal(this._up, this.getWorldMatrix()));
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(TransformNode.prototype, "right", {
|
|
|
+ /**
|
|
|
+ * The right direction of that transform in world space.
|
|
|
+ */
|
|
|
+ get: function () {
|
|
|
+ return BABYLON.Vector3.Normalize(BABYLON.Vector3.TransformNormal(this.getScene().useRightHandedSystem ? this._rightInverted : this._right, this.getWorldMatrix()));
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
/**
|
|
|
* Returns the latest update of the World matrix
|
|
|
* Returns a Matrix.
|