Migrate scene modified properties

This commit is contained in:
Manuel Martin 2021-10-19 15:01:53 +02:00
Родитель 705b8e4c48
Коммит 4598c49439
3 изменённых файлов: 2611 добавлений и 13 удалений

Просмотреть файл

@ -270,19 +270,47 @@ function migrateV6ToV7(json) {
// Prior to V6 we didn't have dirty params so we need to enable all properties
// to make sure that the old settings are applied config is enabled.
const editorSettingsComponent = entity.components.find(c => c.name === "editor-settings");
editorSettingsComponent.props["modifiedProperties"] = {
"audio-params": {
audioType: true,
gain: true,
distanceModel: true,
rolloffFactor: true,
refDistance: true,
maxDistance: true,
coneInnerAngle: true,
coneOuterAngle: true,
coneOuterGain: true
}
};
if (editorSettingsComponent) {
editorSettingsComponent.props["modifiedProperties"] = {
"audio-params": {
audioType: true,
gain: true,
distanceModel: true,
rolloffFactor: true,
refDistance: true,
maxDistance: true,
coneInnerAngle: true,
coneOuterAngle: true,
coneOuterGain: true
}
};
}
}
const audioSettingsComponent = entity.components.find(c => c.name === "audio-settings");
if (audioSettingsComponent) {
const overriden = audioSettingsComponent.props && audioSettingsComponent.props.overrideAudioSettings;
// Prior to V6 we didn't have dirty params so we need to enable all properties
// to make sure that the old settings are applied config is enabled.
const editorSettingsComponent = entity.components.find(c => c.name === "editor-settings");
if (editorSettingsComponent && overriden) {
editorSettingsComponent.props["modifiedProperties"] = {
scene: {
avatarDistanceModel: true,
avatarRolloffFactor: true,
avatarRefDistance: true,
avatarMaxDistance: true,
mediaVolume: true,
mediaDistanceModel: true,
mediaRolloffFactor: true,
mediaRefDistance: true,
mediaMaxDistance: true,
mediaConeInnerAngle: true,
mediaConeOuterAngle: true,
mediaConeOuterGain: true
}
};
}
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Двоичные данные
test/integration/snapshots/Editor.test.js.snap

Двоичный файл не отображается.