|
@@ -15492,6 +15492,7 @@ var BABYLON;
|
|
/** @ignore */
|
|
/** @ignore */
|
|
this._currentRenderId = -1;
|
|
this._currentRenderId = -1;
|
|
this._parentRenderId = -1;
|
|
this._parentRenderId = -1;
|
|
|
|
+ this._animationPropertiesOverride = null;
|
|
/**
|
|
/**
|
|
* An event triggered when the mesh is disposed
|
|
* An event triggered when the mesh is disposed
|
|
* @type {BABYLON.Observable}
|
|
* @type {BABYLON.Observable}
|
|
@@ -15543,6 +15544,19 @@ var BABYLON;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(Node.prototype, "animationPropertiesOverride", {
|
|
|
|
+ /**
|
|
|
|
+ * Gets or sets the animation properties override
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._animationPropertiesOverride;
|
|
|
|
+ },
|
|
|
|
+ set: function (value) {
|
|
|
|
+ this._animationPropertiesOverride = value;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
/**
|
|
/**
|
|
* Gets a string idenfifying the name of the class
|
|
* Gets a string idenfifying the name of the class
|
|
* @returns "Node" string
|
|
* @returns "Node" string
|
|
@@ -59542,41 +59556,66 @@ var BABYLON;
|
|
exact: constraints.deviceId,
|
|
exact: constraints.deviceId,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- navigator.getUserMedia =
|
|
|
|
- navigator.getUserMedia ||
|
|
|
|
- navigator.webkitGetUserMedia ||
|
|
|
|
- navigator.mozGetUserMedia ||
|
|
|
|
- navigator.msGetUserMedia;
|
|
|
|
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
|
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
|
- if (navigator.getUserMedia) {
|
|
|
|
- navigator.getUserMedia({
|
|
|
|
- video: {
|
|
|
|
- deviceId: constraintsDeviceId,
|
|
|
|
- width: {
|
|
|
|
- min: (constraints && constraints.minWidth) || 256,
|
|
|
|
- max: (constraints && constraints.maxWidth) || 640,
|
|
|
|
- },
|
|
|
|
- height: {
|
|
|
|
- min: (constraints && constraints.minHeight) || 256,
|
|
|
|
- max: (constraints && constraints.maxHeight) || 480,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- }, function (stream) {
|
|
|
|
|
|
+ if (navigator.mediaDevices) {
|
|
|
|
+ navigator.mediaDevices.getUserMedia({ video: constraints })
|
|
|
|
+ .then(function (stream) {
|
|
if (video.mozSrcObject !== undefined) {
|
|
if (video.mozSrcObject !== undefined) {
|
|
// hack for Firefox < 19
|
|
// hack for Firefox < 19
|
|
video.mozSrcObject = stream;
|
|
video.mozSrcObject = stream;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- video.src = (window.URL && window.URL.createObjectURL(stream)) || stream;
|
|
|
|
|
|
+ video.srcObject = stream;
|
|
}
|
|
}
|
|
|
|
+ var onPlaying = function () {
|
|
|
|
+ if (onReady) {
|
|
|
|
+ onReady(new VideoTexture("video", video, scene, true, true));
|
|
|
|
+ }
|
|
|
|
+ video.removeEventListener("playing", onPlaying);
|
|
|
|
+ };
|
|
|
|
+ video.addEventListener("playing", onPlaying);
|
|
video.play();
|
|
video.play();
|
|
- if (onReady) {
|
|
|
|
- onReady(new VideoTexture("video", video, scene, true, true));
|
|
|
|
- }
|
|
|
|
- }, function (e) {
|
|
|
|
- BABYLON.Tools.Error(e.name);
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch(function (err) {
|
|
|
|
+ BABYLON.Tools.Error(err.name);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ navigator.getUserMedia =
|
|
|
|
+ navigator.getUserMedia ||
|
|
|
|
+ navigator.webkitGetUserMedia ||
|
|
|
|
+ navigator.mozGetUserMedia ||
|
|
|
|
+ navigator.msGetUserMedia;
|
|
|
|
+ if (navigator.getUserMedia) {
|
|
|
|
+ navigator.getUserMedia({
|
|
|
|
+ video: {
|
|
|
|
+ deviceId: constraintsDeviceId,
|
|
|
|
+ width: {
|
|
|
|
+ min: (constraints && constraints.minWidth) || 256,
|
|
|
|
+ max: (constraints && constraints.maxWidth) || 640,
|
|
|
|
+ },
|
|
|
|
+ height: {
|
|
|
|
+ min: (constraints && constraints.minHeight) || 256,
|
|
|
|
+ max: (constraints && constraints.maxHeight) || 480,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ }, function (stream) {
|
|
|
|
+ if (video.mozSrcObject !== undefined) {
|
|
|
|
+ // hack for Firefox < 19
|
|
|
|
+ video.mozSrcObject = stream;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ video.src = (window.URL && window.URL.createObjectURL(stream)) || stream;
|
|
|
|
+ }
|
|
|
|
+ video.play();
|
|
|
|
+ if (onReady) {
|
|
|
|
+ onReady(new VideoTexture("video", video, scene, true, true));
|
|
|
|
+ }
|
|
|
|
+ }, function (e) {
|
|
|
|
+ BABYLON.Tools.Error(e.name);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
return VideoTexture;
|
|
return VideoTexture;
|
|
}(BABYLON.Texture));
|
|
}(BABYLON.Texture));
|
|
@@ -71268,6 +71307,16 @@ var BABYLON;
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
});
|
|
});
|
|
|
|
+ Object.defineProperty(Bone.prototype, "animationPropertiesOverride", {
|
|
|
|
+ /**
|
|
|
|
+ * Gets the animation properties override
|
|
|
|
+ */
|
|
|
|
+ get: function () {
|
|
|
|
+ return this._skeleton.animationPropertiesOverride;
|
|
|
|
+ },
|
|
|
|
+ enumerable: true,
|
|
|
|
+ configurable: true
|
|
|
|
+ });
|
|
// Methods
|
|
// Methods
|
|
Bone.prototype.updateMatrix = function (matrix, updateDifferenceMatrix) {
|
|
Bone.prototype.updateMatrix = function (matrix, updateDifferenceMatrix) {
|
|
if (updateDifferenceMatrix === void 0) { updateDifferenceMatrix = true; }
|
|
if (updateDifferenceMatrix === void 0) { updateDifferenceMatrix = true; }
|
|
@@ -111095,7 +111144,9 @@ var BABYLON;
|
|
var nodeLOD = nodeLODs[indexLOD];
|
|
var nodeLOD = nodeLODs[indexLOD];
|
|
if (indexLOD !== 0) {
|
|
if (indexLOD !== 0) {
|
|
_this._loadingNodeLOD = nodeLOD;
|
|
_this._loadingNodeLOD = nodeLOD;
|
|
- _this._loadNodeSignals[nodeLOD._index] = new BABYLON.Deferred();
|
|
|
|
|
|
+ if (!_this._loadNodeSignals[nodeLOD._index]) {
|
|
|
|
+ _this._loadNodeSignals[nodeLOD._index] = new BABYLON.Deferred();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
var promise = _this._loader._loadNodeAsync("#/nodes/" + nodeLOD._index, nodeLOD).then(function () {
|
|
var promise = _this._loader._loadNodeAsync("#/nodes/" + nodeLOD._index, nodeLOD).then(function () {
|
|
if (indexLOD !== 0) {
|
|
if (indexLOD !== 0) {
|
|
@@ -111104,8 +111155,10 @@ var BABYLON;
|
|
}
|
|
}
|
|
if (indexLOD !== nodeLODs.length - 1) {
|
|
if (indexLOD !== nodeLODs.length - 1) {
|
|
var nodeIndex = nodeLODs[indexLOD + 1]._index;
|
|
var nodeIndex = nodeLODs[indexLOD + 1]._index;
|
|
- _this._loadNodeSignals[nodeIndex].resolve();
|
|
|
|
- delete _this._loadNodeSignals[nodeIndex];
|
|
|
|
|
|
+ if (_this._loadNodeSignals[nodeIndex]) {
|
|
|
|
+ _this._loadNodeSignals[nodeIndex].resolve();
|
|
|
|
+ delete _this._loadNodeSignals[nodeIndex];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
if (indexLOD === 0) {
|
|
if (indexLOD === 0) {
|
|
@@ -111135,13 +111188,17 @@ var BABYLON;
|
|
var materialLOD = materialLODs[indexLOD];
|
|
var materialLOD = materialLODs[indexLOD];
|
|
if (indexLOD !== 0) {
|
|
if (indexLOD !== 0) {
|
|
_this._loadingMaterialLOD = materialLOD;
|
|
_this._loadingMaterialLOD = materialLOD;
|
|
- _this._loadMaterialSignals[materialLOD._index] = new BABYLON.Deferred();
|
|
|
|
|
|
+ if (!_this._loadMaterialSignals[materialLOD._index]) {
|
|
|
|
+ _this._loadMaterialSignals[materialLOD._index] = new BABYLON.Deferred();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
var promise = _this._loader._loadMaterialAsync("#/materials/" + materialLOD._index, materialLOD, babylonMesh).then(function () {
|
|
var promise = _this._loader._loadMaterialAsync("#/materials/" + materialLOD._index, materialLOD, babylonMesh).then(function () {
|
|
if (indexLOD !== materialLODs.length - 1) {
|
|
if (indexLOD !== materialLODs.length - 1) {
|
|
var materialIndex = materialLODs[indexLOD + 1]._index;
|
|
var materialIndex = materialLODs[indexLOD + 1]._index;
|
|
- _this._loadMaterialSignals[materialIndex].resolve();
|
|
|
|
- delete _this._loadMaterialSignals[materialIndex];
|
|
|
|
|
|
+ if (_this._loadMaterialSignals[materialIndex]) {
|
|
|
|
+ _this._loadMaterialSignals[materialIndex].resolve();
|
|
|
|
+ delete _this._loadMaterialSignals[materialIndex];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
if (indexLOD === 0) {
|
|
if (indexLOD === 0) {
|