Compare commits

..

2 commits

Author SHA1 Message Date
themancalledjakob
f2ed11c206 comment unnecessary conditional
dependencies hashes:
openFrameworks d78075f4bca6be2a2533c6e51a75cc1f18404501
ofxMsdfgen e14da13d02c4dff04fb69d7923469f606924e6c3
ofxGPUFont d482bb7cbdf6b296fa4ab5abcf73fb5ff8c8b239
ofxVariableLab 8df98846248a93aa068989a3ebd0d2f0f16e5e69
ofxProfiler a868e34fa1a79189dd4fbdede2938e308535e5e8
theatre 86d3e07f6f2c75fd6e08fca8c97e3617c9e23b18
2024-03-19 15:11:52 +01:00
themancalledjakob
a1570e7fc3 ignore letterDelay from savedMapping, if prop is sequenced
dependencies hashes:
openFrameworks d78075f4bca6be2a2533c6e51a75cc1f18404501
ofxMsdfgen e14da13d02c4dff04fb69d7923469f606924e6c3
ofxGPUFont d482bb7cbdf6b296fa4ab5abcf73fb5ff8c8b239
ofxVariableLab 8df98846248a93aa068989a3ebd0d2f0f16e5e69
ofxProfiler a868e34fa1a79189dd4fbdede2938e308535e5e8
theatre 86d3e07f6f2c75fd6e08fca8c97e3617c9e23b18
2024-03-19 15:11:39 +01:00
2 changed files with 22 additions and 17 deletions

View file

@ -126,6 +126,11 @@ const Audio = function(tp, record) {
const getAudioMappingOptions = (layer, propTitle) => {
if (savedMapping.hasOwnProperty(layer.id()) && savedMapping[layer.id()].hasOwnProperty(propTitle)) {
if (tp.isSequenced(propTitle, layer)) {
const m = clone(savedMapping[layer.id()][propTitle]);
delete m.letterDelay;
return m;
}
return savedMapping[layer.id()][propTitle];
} else if (propTitle === 'color') {
const mm = getDefaultRange(layer, 'color');

View file

@ -110,23 +110,23 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) {
variationAxes[axes[a].name] = tp.core.types.number(axes[a].defaultValue, {
range: [axes[a].minValue, axes[a].maxValue],
});
if (typeof audio === 'object' &&
typeof audio.getSavedMapping() === 'object' &&
typeof audio.getSavedMapping()[this.id()] === 'object' &&
typeof audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' &&
typeof audio.getMapping() === 'object' &&
typeof audio.getMapping()[this.id()] === 'object' &&
typeof audio.getMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' &&
tp.getPanel() !== null) {
//doThese.push(() => {
//audio.removeAudioOptions(this, `fontVariationAxes.${axes[a].name}`);
//audio.removeAudioMapping(this, `fontVariationAxes.${axes[a].name}`);
//audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].min_out = axes[a].minValue;
//audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].max_out = axes[a].maxValue;
//audio.addAudioMapping(this, `fontVariationAxes.${axes[a].name}`);
//audio.addAudioOptions(this, `fontVariationAxes.${axes[a].name}`);
//});
}
//if (typeof audio === 'object' &&
//typeof audio.getSavedMapping() === 'object' &&
//typeof audio.getSavedMapping()[this.id()] === 'object' &&
//typeof audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' &&
//typeof audio.getMapping() === 'object' &&
//typeof audio.getMapping()[this.id()] === 'object' &&
//typeof audio.getMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' &&
//tp.getPanel() !== null) {
////doThese.push(() => {
////audio.removeAudioOptions(this, `fontVariationAxes.${axes[a].name}`);
////audio.removeAudioMapping(this, `fontVariationAxes.${axes[a].name}`);
////audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].min_out = axes[a].minValue;
////audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].max_out = axes[a].maxValue;
////audio.addAudioMapping(this, `fontVariationAxes.${axes[a].name}`);
////audio.addAudioOptions(this, `fontVariationAxes.${axes[a].name}`);
////});
//}
} else {
console.log('js::layer::selectFont', 'this axis is insane, abort', axes[a]);
}