fix letterdelay not recorded for nested properties

fixes #3

dependencies hashes:
openFrameworks d78075f4bca6be2a2533c6e51a75cc1f18404501
ofxMsdfgen e14da13d02c4dff04fb69d7923469f606924e6c3
ofxGPUFont d482bb7cbdf6b296fa4ab5abcf73fb5ff8c8b239
ofxVariableLab 0b5f9bdebc1e5550621957e73c040c258ec6317b
ofxProfiler a868e34fa1a79189dd4fbdede2938e308535e5e8
theatre 86d3e07f6f2c75fd6e08fca8c97e3617c9e23b18
This commit is contained in:
themancalledjakob 2024-03-29 13:31:20 +01:00
parent 9bd2f08c8f
commit 086e93e786

View file

@ -442,10 +442,10 @@ const Record = function(tp) {
const syncLetterDelays = (layer, propPaths) => { const syncLetterDelays = (layer, propPaths) => {
propPaths.forEach((path) => { propPaths.forEach((path) => {
const oldLetterDelay = getNestedProperty(layer.theatreObject.value.letterDelays, path, true); const oldLetterDelay = getNestedProperty(layer.theatreObject.value.letterDelays, path, true);
const isOriginalSequenced = tp.isSequenced(path, layer); //const isOriginalSequenced = tp.isSequenced(path, layer);
const isLetterDelaySequenced = tp.isSequenced(["letterDelays", path], layer); const isLetterDelaySequenced = tp.isSequenced(["letterDelays", ...path], layer);
// we use audio.getSavedMapping(), because mapping may be removed directly after recording // we use audio.getSavedMapping(), because mapping may be removed directly after recording
const mapping = getNestedProperty(audio.getSavedMapping(), [layer.id()].concat(path), true); const mapping = getNestedProperty(audio.getSavedMapping(), [layer.id(),...[path.join('.')]], true);
const newLetterDelay = (() => { const newLetterDelay = (() => {
if (typeof mapping['letterDelay'] === 'undefined') { if (typeof mapping['letterDelay'] === 'undefined') {
return false; return false;