inbetween stuff
dependencies hashes: openFrameworks d78075f4bca6be2a2533c6e51a75cc1f18404501 ofxMsdfgen e14da13d02c4dff04fb69d7923469f606924e6c3 ofxGPUFont d482bb7cbdf6b296fa4ab5abcf73fb5ff8c8b239 ofxVariableLab 0b5f9bdebc1e5550621957e73c040c258ec6317b ofxProfiler a868e34fa1a79189dd4fbdede2938e308535e5e8 theatre 86d3e07f6f2c75fd6e08fca8c97e3617c9e23b18
This commit is contained in:
parent
c832982d46
commit
09897d7178
3 changed files with 27 additions and 13 deletions
|
@ -1630,5 +1630,6 @@ const Audio = function(tp, record) {
|
|||
};
|
||||
|
||||
export {
|
||||
Audio
|
||||
Audio,
|
||||
AudioLayer
|
||||
}
|
||||
|
|
|
@ -52,31 +52,34 @@ import {
|
|||
Config
|
||||
} from './config.js';
|
||||
|
||||
window.uploadFile = uploadFile;
|
||||
window.downloadFile = downloadFile;
|
||||
window.isInitialized = false;
|
||||
window.hashFromString = hashFromString;
|
||||
|
||||
const config = new Config();
|
||||
window.config = config;
|
||||
const tp = new TheatrePlay();
|
||||
window.tp = tp;
|
||||
const layers = [];
|
||||
const layersById = {};
|
||||
const layerOrder = new LayerOrder();
|
||||
window.layerOrder = layerOrder;
|
||||
const fontsAndAxes = [];
|
||||
let artboard;
|
||||
const exporter = new Exporter();
|
||||
const interactor = new Interactor();
|
||||
const moduleFS = new ModuleFS();
|
||||
window.moduleFS = moduleFS;
|
||||
const record = new Record(tp);
|
||||
window.record = record;
|
||||
const audio = new Audio(tp, record);
|
||||
window.audio = audio;
|
||||
|
||||
// globally reachables
|
||||
// classes
|
||||
window.config = config;
|
||||
window.tp = tp;
|
||||
window.layerOrder = layerOrder;
|
||||
window.moduleFS = moduleFS;
|
||||
window.record = record;
|
||||
window.audio = audio;
|
||||
// utilities
|
||||
window.uploadFile = uploadFile;
|
||||
window.downloadFile = downloadFile;
|
||||
window.isInitialized = false;
|
||||
window.panelFinderTimeout = false;
|
||||
|
||||
const sequenceEventBuffer = {};
|
||||
|
||||
//const midiController = new MidiController();
|
||||
|
@ -247,7 +250,7 @@ window.onload = () => {
|
|||
}
|
||||
tp.studio.onSelectionChange((newSelection) => {
|
||||
if (newSelection.length > 0) {
|
||||
[getArtboard(), getLayers()].flat().forEach((e) => {
|
||||
[getArtboard(), getLayers(), getAudioLayer()].flat().forEach((e) => {
|
||||
if (e.id() === newSelection[0].address.objectKey) {
|
||||
if (e.id().indexOf('layer-') === 0) {
|
||||
e.findInjectPanel();
|
||||
|
@ -257,6 +260,8 @@ window.onload = () => {
|
|||
}, 60);
|
||||
} else if (e.id() === 'artboard') {
|
||||
e.findInjectPanel();
|
||||
} else if (e.id().indexOf('audio') === 0) {
|
||||
e.findInjectPanel();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -454,7 +459,8 @@ window.getLayer = (layerID = tp.studio.selection[0].address.objectKey) => {
|
|||
if (layerID === 'artboard') {
|
||||
return artboard;
|
||||
} else {
|
||||
return layers.find((layer) => layer.id() === layerID);
|
||||
//return layers.find((layer) => layer.id() === layerID);
|
||||
return layersById[layerID];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -724,6 +724,13 @@ const TheatrePlay = function(autoInit = false) {
|
|||
window.project_fontsHashMap = project.fontsHashMap;
|
||||
layerPromises.push(window.addExistingLayer(layerId, objects[layerId]));
|
||||
});
|
||||
Object.keys(objects)
|
||||
.filter((e) => e.indexOf('audio-') === 0)
|
||||
.forEach((layerId) => {
|
||||
window.setLoadingTask(`setting up the sounds of ${layerId} to come`, 90);
|
||||
window.project_fontsHashMap = project.fontsHashMap;
|
||||
layerPromises.push(window.addExistingLayer(layerId, objects[layerId]));
|
||||
});
|
||||
Promise.all(layerPromises).then(() => {
|
||||
window.layerOrder.set(project.layerOrder);
|
||||
this.duration = this.core.val(this.sheet.sequence.pointer.length);
|
||||
|
|
Loading…
Reference in a new issue