variabletime/bin/em/variabletime/web/js/config.js
themancalledjakob 5ff6ee3905 change defaults
dependencies hashes:
openFrameworks d78075f4bca6be2a2533c6e51a75cc1f18404501
ofxMsdfgen e14da13d02c4dff04fb69d7923469f606924e6c3
ofxGPUFont d482bb7cbdf6b296fa4ab5abcf73fb5ff8c8b239
ofxVariableLab 0b5f9bdebc1e5550621957e73c040c258ec6317b
ofxProfiler a868e34fa1a79189dd4fbdede2938e308535e5e8
theatre 86d3e07f6f2c75fd6e08fca8c97e3617c9e23b18
2024-04-02 13:52:38 +02:00

174 lines
5.6 KiB
JavaScript

const config = {
artboard: {
minimumZoom: 0.01,
maximumZoom: 200,
incrementZoom: 0.01,
maximumPixelDensity: 3.0,
incrementPixelDensity: 0.01,
friendlyNames: {
'color': 'Background<br>Color',
'x': 'Position X',
'y': 'Position Y',
'width': 'Artboard Width',
'height': 'Artboard Height',
'zoom': 'Zoom',
'pixelDensity': 'Preview<br>Resolution',
},
},
layer: {
defaultFonts: ['Version-2', 'TonkaVF'],
letterDelayProps: ['fontSize_px', 'letterSpacing', 'color', 'fontVariationAxes'],
autoCreateFirstLayer: true,
defaultTexts: ['text', 'variable time', 'hello world'],
panelOrder: [
'fontFamily',
'textAlignButtonsHorizontal',
'textAlignment',
'width',
'height',
'fontSize_px',
'letterSpacing',
'lineHeight',
'text',
'fontVariationAxes',
'x',
'y',
'alignButtonsHorizontal',
'alignButtonsVertical',
'rotation',
'transformOrigin',
'mirror_x',
'mirror_x_distance',
'mirror_y',
'mirror_y_distance',
'mirror_xy',
'color',
'letterDelays',
],
orderSpacing: 2,
friendlyNames: {
'fontFamily': 'Font Family',
'textAlignButtonsHorizontal': '',
'textAlignment': 'Text Alignment',
'width': 'Wrapper Width',
'height': '',
'fontSize_px': 'Font Size',
'letterSpacing': 'Letter Spacing',
'lineHeight': 'Line Height',
'text': 'Text',
'fontVariationAxes': 'Variable Axes',
'x': 'Position X',
'y': 'Position Y',
'alignButtonsHorizontal': '',
'alignButtonsVertical': '',
'rotation': 'Rotation',
'transformOrigin': 'Rotation Origin',
'mirror_x': 'Mirror X',
'mirror_x_distance': 'X Distance',
'mirror_y': 'Mirror Y',
'mirror_y_distance': 'Y Distance',
'mirror_xy': 'Mirrox XY',
'color': 'Color',
'letterDelays': 'Letter Delays',
},
},
tp: {
addKeyframesTimeout_s: 0.01,
},
projects: {
savePrefix: 'vte_project_'
},
interactor: {
zoomBaseFactor: 0.001,
zoomDynamicMax: 42,
},
audio: {
defaultRange: { // check audio.getDefaultRange for dynamic defaults
'textAlignment': [0, 1],
'fontSize_px': [42, 100],
'letterSpacing': [0, 1],
'lineHeight': [0, 1],
'rotation': [0, 180],
'mirror_x_distance': [0, 200],
'mirror_y_distance': [0, 70],
'color': [{'r': 0, 'g': 0, 'b': 0, 'a': 1}, {'r': 1, 'g': 1, 'b': 1, 'a': 1}],
'letterDelays': [0, 1000],
},
ignoreProps: {
artboard: ['x', 'y', 'zoom', 'pixelDensity', 'width', 'height'],
layer: ['transformOrigin', 'fontFamily', 'text', 'mirror_x', 'mirror_y', 'mirror_xy', 'height'],
},
maxFilenameLength: 24,
defaultSmoothing: 0.5,
analyser: {
fftSize: 256 * 8,
minDecibels: -90,
maxDecibels: -10,
smoothingTimeConstant: 0.85,
},
fftBandsAnalysed: 256 * 8,
fftBandsUsed: 256 / 2,
fftHeight: 256 / 4,
ignoreOutboundFrequencies: true,
pitchCombineFrequencies: false,
rolloverResetLoop: true,
colors: {
background_fill: 'hsla(166, 74%, 20%, 1.0)',
select_fill: 'hsla(166, 52%, 42%, 1.0)',
select_stroke: 'hsla(166, 74%, 92%, 1.0)',
select_stroke_width: 1,
highlight_stroke: 'hsla(64, 100%, 64%, 1.0)',
highlight_stroke_width: 1,
highlight_2_stroke: 'hsla(166, 74%, 64%, 1.0)',
frequency_fill: 'hsla(166, 74%, 84%, 1.0)',
options_r_background: 'hsla(360, 100%, 50%, 0.2)',
options_g_background: 'hsla(120, 100%, 50%, 0.2)',
options_b_background: 'hsla(240, 100%, 50%, 0.2)',
options_a_background: 'hsla(0, 0%, 100%, 0.2)',
options_background: 'hsla(0, 0%, 64%, 0.2)',
// overlay is the div used for mouse interactions
// it spans over the whole canvas.
// it can be used to adjust the color underneath.
overlay: 'rgba(28, 186, 148, 0.0)',
// gradient needs backgroundImage not backgroundColor in audio.js
//overlay: 'linear-gradient(red, yellow)',
overlay_stroke: 'none',
overlay_blendmode: 'color',
},
},
record: {
active: true,
ignoreProps: {
artboard: ['x', 'y', 'zoom', 'pixelDensity', 'width', 'height'],
layer: ['transformOrigin', 'fontFamily', 'text', 'mirror_x', 'mirror_y', 'mirror_xy'],
},
recordMapped: true,
},
midi: {
touchTimeThreshold_s: 0.5,
smoothingMix: 0.1,
},
fs: {
idbfsDir: '/idbfs',
idbfsFontDir: '/idbfs/fonts',
idbfsAudioDir: '/idbfs/audio',
idbfsTmpDir: '/idbfs/tmp',
},
timeline: {
rolloverReset: true,
rolloverThreshold_s: 0.02,
},
autoSave: true,
};
const Config = function() {
const configKeys = Object.keys(config);
for (let c = 0; c < configKeys.length; c++) {
const key = configKeys[c];
this[key] = config[key];
}
};
export {
Config
}