mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
only set animationIsPlaying if it changed
This commit is contained in:
parent
09a06c9d82
commit
55c177594b
1 changed files with 11 additions and 3 deletions
|
@ -22,6 +22,7 @@ EntityPropertyDialogBox = (function () {
|
|||
var dimensionZ;
|
||||
var rescalePercentage;
|
||||
var editModelID = -1;
|
||||
var previousAnimationIsPlaying;
|
||||
var previousAnimationFrameIndex;
|
||||
var previousAnimationSettings;
|
||||
|
||||
|
@ -49,6 +50,7 @@ EntityPropertyDialogBox = (function () {
|
|||
array.push({ label: "Animation URL:", value: properties.animationURL });
|
||||
index++;
|
||||
array.push({ label: "Animation is playing:", value: properties.animationIsPlaying });
|
||||
previousAnimationIsPlaying = properties.animationIsPlaying;
|
||||
index++;
|
||||
array.push({ label: "Animation FPS:", value: properties.animationFPS });
|
||||
index++;
|
||||
|
@ -243,18 +245,24 @@ EntityPropertyDialogBox = (function () {
|
|||
if (properties.type == "Model") {
|
||||
properties.modelURL = array[index++].value;
|
||||
properties.animationURL = array[index++].value;
|
||||
properties.animationIsPlaying = array[index++].value;
|
||||
|
||||
var newAnimationIsPlaying = array[index++].value;
|
||||
if (previousAnimationIsPlaying != newAnimationIsPlaying) {
|
||||
properties.animationIsPlaying = newAnimationIsPlaying;
|
||||
} else {
|
||||
delete properties.animationIsPlaying;
|
||||
}
|
||||
|
||||
properties.animationFPS = array[index++].value;
|
||||
|
||||
var newAnimationFrameIndex = array[index++].value;
|
||||
var newAnimationSettings = array[index++].value;
|
||||
|
||||
if (previousAnimationFrameIndex != newAnimationFrameIndex) {
|
||||
properties.animationFrameIndex = newAnimationFrameIndex;
|
||||
} else {
|
||||
delete properties.animationFrameIndex;
|
||||
}
|
||||
|
||||
var newAnimationSettings = array[index++].value;
|
||||
if (previousAnimationSettings != newAnimationSettings) {
|
||||
properties.animationSettings = newAnimationSettings;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue