Fix particle property value reverting to old value when switch tabs

This commit is contained in:
David Rowe 2018-06-07 12:22:56 +12:00
parent 3e100fb141
commit 32c21a1397

View file

@ -52,6 +52,13 @@ ParticleExplorerTool = function() {
data.updatedSettings.emitOrientation = Quat.fromVec3Degrees(data.updatedSettings.emitOrientation);
}
Entities.editEntity(that.activeParticleEntity, data.updatedSettings);
for (var key in data.updatedSettings) {
if (that.activeParticleProperties.hasOwnProperty(key)) {
that.activeParticleProperties[key] = data.updatedSettings[key];
}
}
} else if (data.messageType === "page_loaded") {
sendActiveParticleProperties();
}