Documentation for JS plugins for BDEngine
This section is currently being written and will be updated frequently.
Important: only the API from window.editorAPI is considered stable and officially supported.
The window.editor object is available for exploration and experimentation, but its structure may change without notice and compatibility between versions is not guaranteed.
Events
Desc
Launching the editor
Triggers after the editor has fully loaded and is about to remove the splash screen.
window.addEventListener('bde:started', (e) => {
console.log('Started');
});
Editor mode change
Triggers when the editor mode changes (Editor/Animator/Sound) and returns the current mode via the variable e.detail.
window.addEventListener('bde:change-mode', (e) => {
let mode = e.detail;
console.log(mode); // editor animator sound
});
Share Party connection established
Triggers when the editor successfully connects to Share Party.
window.addEventListener('bde:server-connected', () => {
console.log('Connected to Share Party');
});
Share Party disconnected
Triggers when the connection to Share Party is closed.
window.addEventListener('bde:server-disconnected', () => {
console.log('Disconnected from Share Party');
});
Share Party connection error
Triggers when Share Party connection reports an error.
window.addEventListener('bde:server-error', () => {
console.warn('Share Party connection error');
});