How to use the uuid/v1.js function in uuid

To help you get started, we’ve selected a few uuid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NERDDISCO / luminave / src / components / animation-manager / index.js View on Github external
// Add multiple animations
      for (let i = 0; i < amount; i++) {
        const animationIndex = i
        const keyframes = {}

        let newName = ''

        if (amount > 1) {
          newName = `${name}${animationIndex}`
        } else {
          newName = `${name}`
        }

        store.dispatch(addAnimation({
          id: uuidv1(),
          keyframes,
          duration,
          name: newName
        }))
      }
    }

  }
github NERDDISCO / luminave / src / components / venue / slot-grid.js View on Github external
}
      const duration = 2000
      const animationId = uuidv1()

      store.dispatch(addAnimation({
        id: animationId,
        keyframes,
        duration,
        name: `${name}`
      }))

      // Add the animation to the slot
      animations.push(animationId)

      // Create new scene
      sceneId = uuidv1()

      store.dispatch(addScene({
        id: sceneId,
        fixtures,
        animations,
        duration,
        name: `${name}`
      }))

      // Update slot
      store.dispatch(setVenueSlot(this.venueId, {
        id,
        animations,
        sceneId
      }))
github NERDDISCO / luminave / src / components / venue / slot-grid.js View on Github external
store.dispatch(addVenueSlot(this.venueId, {
        x,
        y,
        name,
        id,
        modv
      }))

      // Create new animation
      const keyframes = {
        0: { modvColor: modv },
        1: { modvColor: modv }
      }
      const duration = 2000
      const animationId = uuidv1()

      store.dispatch(addAnimation({
        id: animationId,
        keyframes,
        duration,
        name: `${name}`
      }))

      // Add the animation to the slot
      animations.push(animationId)

      // Create new scene
      sceneId = uuidv1()

      store.dispatch(addScene({
        id: sceneId,
github NERDDISCO / luminave / src / constants / index.js View on Github external
export const SET_LIVE = uuidv1()
export const CONNECT_USB = uuidv1()
export const CONNECT_BLUETOOTH = uuidv1()
export const ADD_UNIVERSE = uuidv1()
export const REMOVE_UNIVERSE = uuidv1()
export const DEMO_UNIVERSE = uuidv1()
export const ADD_SCENE = uuidv1()
export const SET_SCENE = uuidv1()
export const RUN_SCENE = uuidv1()
export const REMOVE_SCENE = uuidv1()
export const SET_SCENE_NAME = uuidv1()
export const ADD_ANIMATION_TO_SCENE = uuidv1()
export const REMOVE_ANIMATION_FROM_SCENE = uuidv1()
export const ADD_FIXTURE_TO_SCENE = uuidv1()
export const REMOVE_FIXTURE_FROM_SCENE = uuidv1()
export const ADD_ANIMATION = uuidv1()
export const RUN_ANIMATION = uuidv1()
export const REMOVE_ANIMATION = uuidv1()
export const SET_ANIMATION = uuidv1()
export const ADD_KEYFRAME = uuidv1()
export const ADD_KEYFRAMES = uuidv1()
export const ADD_FIXTURE = uuidv1()
export const SET_FIXTURE = uuidv1()
export const SET_FIXTURE_ADDRESS = uuidv1()
export const SET_FIXTURE_PROPERTIES = uuidv1()
export const SET_ALL_FIXTURE_PROPERTIES = uuidv1()
export const RESET_FIXTURE_PROPERTIES = uuidv1()
export const REMOVE_FIXTURE = uuidv1()
export const ENABLE_MIDI = uuidv1()
export const ADD_MIDI = uuidv1()
export const REMOVE_MIDI = uuidv1()
export const ADD_MIDI_MAPPING = uuidv1()
github NERDDISCO / luminave / src / constants / index.js View on Github external
export const ADD_SCENE_TO_TIMELINE = uuidv1()
export const REMOVE_SCENE_FROM_TIMELINE = uuidv1()
export const PLAY_TIMELINE = uuidv1()
export const RESET_TIMELINE = uuidv1()
export const SET_TIMELINE_PROGRESS = uuidv1()
export const SET_SCENE_ON_TIMELINE = uuidv1()
export const SEND_UNIVERSE_TO_USB = uuidv1()
export const SET_MODV = uuidv1()
export const SET_FIVETWELVE = uuidv1()
export const CONNECT_DEKK = uuidv1()
export const SET_DEKK_DATA = uuidv1()
export const CONNECT_FIVETWELVE = uuidv1()
export const ADD_VENUE = uuidv1()
export const SET_VENUE = uuidv1()
export const REMOVE_VENUE = uuidv1()
export const ADD_VENUE_SLOT = uuidv1()
export const SET_VENUE_SLOT = uuidv1()
export const REMOVE_VENUE_SLOT = uuidv1()
export const SET_LUMINAVE_SERVER = uuidv1()

/*
 * localStorage
 */
export const STORAGE_STATE = 'LuminaveConfig'

/*
 * Global lists
 */
export const FIXTURE_TYPES = ['EuroliteTMH8', 'FunGenerationSeParQuadLedRgbUv',
  'AdjStarburst', 'CameoFlatPar1RGBW', 'CameoPixBar600PRO', 'CameoWookie200RGY',
  'StairvilleAF150', 'StairvilleBowlBeam604LEDCOBMovingHead', 'JsFestMovingHeadWash',
  'StairvilleOutdoorStageParTri', 'BasicColor', 'BasicFluter', 'EuroliteTMH7',
github NERDDISCO / luminave / src / constants / index.js View on Github external
export const RUN_ANIMATION = uuidv1()
export const REMOVE_ANIMATION = uuidv1()
export const SET_ANIMATION = uuidv1()
export const ADD_KEYFRAME = uuidv1()
export const ADD_KEYFRAMES = uuidv1()
export const ADD_FIXTURE = uuidv1()
export const SET_FIXTURE = uuidv1()
export const SET_FIXTURE_ADDRESS = uuidv1()
export const SET_FIXTURE_PROPERTIES = uuidv1()
export const SET_ALL_FIXTURE_PROPERTIES = uuidv1()
export const RESET_FIXTURE_PROPERTIES = uuidv1()
export const REMOVE_FIXTURE = uuidv1()
export const ENABLE_MIDI = uuidv1()
export const ADD_MIDI = uuidv1()
export const REMOVE_MIDI = uuidv1()
export const ADD_MIDI_MAPPING = uuidv1()
export const SET_MIDI_MAPPING_ACTIVE = uuidv1()
export const LEARN_MIDI = uuidv1()
export const SET_MIDI = uuidv1()
export const ADD_SCENE_TO_MIDI = uuidv1()
export const ADD_SCENES_TO_MIDI = uuidv1()
export const REMOVE_SCENE_FROM_MIDI = uuidv1()
export const ADD_SCENE_TO_TIMELINE = uuidv1()
export const REMOVE_SCENE_FROM_TIMELINE = uuidv1()
export const PLAY_TIMELINE = uuidv1()
export const RESET_TIMELINE = uuidv1()
export const SET_TIMELINE_PROGRESS = uuidv1()
export const SET_SCENE_ON_TIMELINE = uuidv1()
export const SEND_UNIVERSE_TO_USB = uuidv1()
export const SET_MODV = uuidv1()
export const SET_FIVETWELVE = uuidv1()
export const CONNECT_DEKK = uuidv1()
github NERDDISCO / luminave / src / constants / index.js View on Github external
export const SET_FIXTURE_PROPERTIES = uuidv1()
export const SET_ALL_FIXTURE_PROPERTIES = uuidv1()
export const RESET_FIXTURE_PROPERTIES = uuidv1()
export const REMOVE_FIXTURE = uuidv1()
export const ENABLE_MIDI = uuidv1()
export const ADD_MIDI = uuidv1()
export const REMOVE_MIDI = uuidv1()
export const ADD_MIDI_MAPPING = uuidv1()
export const SET_MIDI_MAPPING_ACTIVE = uuidv1()
export const LEARN_MIDI = uuidv1()
export const SET_MIDI = uuidv1()
export const ADD_SCENE_TO_MIDI = uuidv1()
export const ADD_SCENES_TO_MIDI = uuidv1()
export const REMOVE_SCENE_FROM_MIDI = uuidv1()
export const ADD_SCENE_TO_TIMELINE = uuidv1()
export const REMOVE_SCENE_FROM_TIMELINE = uuidv1()
export const PLAY_TIMELINE = uuidv1()
export const RESET_TIMELINE = uuidv1()
export const SET_TIMELINE_PROGRESS = uuidv1()
export const SET_SCENE_ON_TIMELINE = uuidv1()
export const SEND_UNIVERSE_TO_USB = uuidv1()
export const SET_MODV = uuidv1()
export const SET_FIVETWELVE = uuidv1()
export const CONNECT_DEKK = uuidv1()
export const SET_DEKK_DATA = uuidv1()
export const CONNECT_FIVETWELVE = uuidv1()
export const ADD_VENUE = uuidv1()
export const SET_VENUE = uuidv1()
export const REMOVE_VENUE = uuidv1()
export const ADD_VENUE_SLOT = uuidv1()
export const SET_VENUE_SLOT = uuidv1()
export const REMOVE_VENUE_SLOT = uuidv1()
github NERDDISCO / luminave / src / constants / index.js View on Github external
*
 * A collection of constants which are used to:
 * - have a unique reference to every state
 * - access the localStorage
 * - define global lists
 */

/*
 * State
 */
export const SET_CHANNEL = uuidv1()
export const SET_CHANNELS = uuidv1()
export const GET_CHANNEL = uuidv1()
export const SET_BPM = uuidv1()
export const SET_LIVE = uuidv1()
export const CONNECT_USB = uuidv1()
export const CONNECT_BLUETOOTH = uuidv1()
export const ADD_UNIVERSE = uuidv1()
export const REMOVE_UNIVERSE = uuidv1()
export const DEMO_UNIVERSE = uuidv1()
export const ADD_SCENE = uuidv1()
export const SET_SCENE = uuidv1()
export const RUN_SCENE = uuidv1()
export const REMOVE_SCENE = uuidv1()
export const SET_SCENE_NAME = uuidv1()
export const ADD_ANIMATION_TO_SCENE = uuidv1()
export const REMOVE_ANIMATION_FROM_SCENE = uuidv1()
export const ADD_FIXTURE_TO_SCENE = uuidv1()
export const REMOVE_FIXTURE_FROM_SCENE = uuidv1()
export const ADD_ANIMATION = uuidv1()
export const RUN_ANIMATION = uuidv1()
export const REMOVE_ANIMATION = uuidv1()
github NERDDISCO / luminave / src / constants / index.js View on Github external
export const SET_CHANNEL = uuidv1()
export const SET_CHANNELS = uuidv1()
export const GET_CHANNEL = uuidv1()
export const SET_BPM = uuidv1()
export const SET_LIVE = uuidv1()
export const CONNECT_USB = uuidv1()
export const CONNECT_BLUETOOTH = uuidv1()
export const ADD_UNIVERSE = uuidv1()
export const REMOVE_UNIVERSE = uuidv1()
export const DEMO_UNIVERSE = uuidv1()
export const ADD_SCENE = uuidv1()
export const SET_SCENE = uuidv1()
export const RUN_SCENE = uuidv1()
export const REMOVE_SCENE = uuidv1()
export const SET_SCENE_NAME = uuidv1()
export const ADD_ANIMATION_TO_SCENE = uuidv1()
export const REMOVE_ANIMATION_FROM_SCENE = uuidv1()
export const ADD_FIXTURE_TO_SCENE = uuidv1()
export const REMOVE_FIXTURE_FROM_SCENE = uuidv1()
export const ADD_ANIMATION = uuidv1()
export const RUN_ANIMATION = uuidv1()
export const REMOVE_ANIMATION = uuidv1()
export const SET_ANIMATION = uuidv1()
export const ADD_KEYFRAME = uuidv1()
export const ADD_KEYFRAMES = uuidv1()
export const ADD_FIXTURE = uuidv1()
export const SET_FIXTURE = uuidv1()
export const SET_FIXTURE_ADDRESS = uuidv1()
export const SET_FIXTURE_PROPERTIES = uuidv1()
export const SET_ALL_FIXTURE_PROPERTIES = uuidv1()
export const RESET_FIXTURE_PROPERTIES = uuidv1()
export const REMOVE_FIXTURE = uuidv1()
github NERDDISCO / luminave / src / constants / index.js View on Github external
export const SET_MIDI_MAPPING_ACTIVE = uuidv1()
export const LEARN_MIDI = uuidv1()
export const SET_MIDI = uuidv1()
export const ADD_SCENE_TO_MIDI = uuidv1()
export const ADD_SCENES_TO_MIDI = uuidv1()
export const REMOVE_SCENE_FROM_MIDI = uuidv1()
export const ADD_SCENE_TO_TIMELINE = uuidv1()
export const REMOVE_SCENE_FROM_TIMELINE = uuidv1()
export const PLAY_TIMELINE = uuidv1()
export const RESET_TIMELINE = uuidv1()
export const SET_TIMELINE_PROGRESS = uuidv1()
export const SET_SCENE_ON_TIMELINE = uuidv1()
export const SEND_UNIVERSE_TO_USB = uuidv1()
export const SET_MODV = uuidv1()
export const SET_FIVETWELVE = uuidv1()
export const CONNECT_DEKK = uuidv1()
export const SET_DEKK_DATA = uuidv1()
export const CONNECT_FIVETWELVE = uuidv1()
export const ADD_VENUE = uuidv1()
export const SET_VENUE = uuidv1()
export const REMOVE_VENUE = uuidv1()
export const ADD_VENUE_SLOT = uuidv1()
export const SET_VENUE_SLOT = uuidv1()
export const REMOVE_VENUE_SLOT = uuidv1()
export const SET_LUMINAVE_SERVER = uuidv1()

/*
 * localStorage
 */
export const STORAGE_STATE = 'LuminaveConfig'

/*