(function() { "use strict"; // Consts // ///////////////////////////////////////////////////////////////////////// var BUTTON_NAME = "DANCE", EVENT_BRIDGE_OPEN_MESSAGE = "eventBridgeOpen", UPDATE_UI = BUTTON_NAME + "_update_ui", TRY_DANCE = "try_dance", STOP_DANCE = "stop_dance", START_DANCING = "start_dancing", REMOVE_DANCE = "remove_dance", REMOVE_DANCE_FROM_MENU = "remove_dance_from_menu", ADD_DANCE = "add_dance", PREVIEW_DANCE = "preview_dance", PREVIEW_DANCE_STOP = "preview_dance_stop", UPDATE_DANCE_ARRAY = "update_dance_array", CURRENT_DANCE = "current_dance", TOGGLE_HMD = "toggle_hmd", EVENTBRIDGE_SETUP_DELAY = 10 ; // Components // ///////////////////////////////////////////////////////////////////////// Vue.component('current-dance', { props: { add_this_dance: { type: Boolean }, current_dance: { type: Boolean }, should_be_running: { type: Boolean }, dance_array: { type: Boolean }, add_dance_name: { type: String }, current_dance_name: { type: String }, toggle_hmd: {type: Boolean} }, methods: { startDancing(){ EventBridge.emitWebEvent(JSON.stringify({ type: START_DANCING })); }, stopDance(){ EventBridge.emitWebEvent(JSON.stringify({ type: STOP_DANCE })); }, toggleHMD(){ EventBridge.emitWebEvent(JSON.stringify({ type: TOGGLE_HMD })); } }, template: /*html*/`