|
@@ -86100,8 +86100,9 @@ var BABYLON;
|
|
*/
|
|
*/
|
|
function MorphTarget(
|
|
function MorphTarget(
|
|
/** defines the name of the target */
|
|
/** defines the name of the target */
|
|
- name, influence) {
|
|
|
|
|
|
+ name, influence, scene) {
|
|
if (influence === void 0) { influence = 0; }
|
|
if (influence === void 0) { influence = 0; }
|
|
|
|
+ if (scene === void 0) { scene = null; }
|
|
this.name = name;
|
|
this.name = name;
|
|
/**
|
|
/**
|
|
* Gets or sets the list of animations
|
|
* Gets or sets the list of animations
|
|
@@ -86114,6 +86115,8 @@ var BABYLON;
|
|
* Observable raised when the influence changes
|
|
* Observable raised when the influence changes
|
|
*/
|
|
*/
|
|
this.onInfluenceChanged = new BABYLON.Observable();
|
|
this.onInfluenceChanged = new BABYLON.Observable();
|
|
|
|
+ this._animationPropertiesOverride = null;
|
|
|
|
+ this._scene = scene || BABYLON.Engine.LastCreatedScene;
|
|
this.influence = influence;
|
|
this.influence = influence;
|
|
}
|
|
}
|
|
Object.defineProperty(MorphTarget.prototype, "influence", {
|
|
Object.defineProperty(MorphTarget.prototype, "influence", {
|
|
@@ -86136,6 +86139,22 @@ var BABYLON;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(MorphTarget.prototype, "animationPropertiesOverride", {
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the animation properties override
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ if (!this._animationPropertiesOverride && this._scene) {
|
|
|
|
+ return this._scene.animationPropertiesOverride;
|
|
|
|
+ }
|
|
|
|
+ return this._animationPropertiesOverride;
|
|
|
|
+ },
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._animationPropertiesOverride = value;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
Object.defineProperty(MorphTarget.prototype, "hasPositions", {
|
|
Object.defineProperty(MorphTarget.prototype, "hasPositions", {
|
|
/**
|
|
/**
|
|
* Gets a boolean defining if the target contains position data
|
|
* Gets a boolean defining if the target contains position data
|
|
@@ -86262,7 +86281,7 @@ var BABYLON;
|
|
if (!name) {
|
|
if (!name) {
|
|
name = mesh.name;
|
|
name = mesh.name;
|
|
}
|
|
}
|
|
- var result = new MorphTarget(name, influence);
|
|
|
|
|
|
+ var result = new MorphTarget(name, influence, mesh.getScene());
|
|
result.setPositions(mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind));
|
|
result.setPositions(mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind));
|
|
if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
|
|
if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
|
|
result.setNormals(mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind));
|
|
result.setNormals(mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind));
|