@ginden/blinkstick-v2 - v3.4.1
    Preparing search index...

      @ginden/blinkstick-v2 - v3.4.1

      Discovery

      findBlinkstick
      nodeHid

      node-hid based discovery module for BlinkStick devices.

      usb

      libusb based discovery module for BlinkStick devices.

      DiscoverFilterFunction

      A function used to filter devices during discovery.

      DiscoveryFilter

      A filter used during device discovery to select specific devices.

      createBlinkstickAsync

      This function creates a BlinkstickAsync instance from a USB device.

      createBlinkstickSync

      Creates a BlinkStickSync instance from a USB device.

      createDiscoverFilterFn

      Creates a discovery filter function from a given filter.

      findBlinkSticksAsync

      Find BlinkSticks using a filter, using asynchronous USB device enumeration.

      findBlinkSticksSync

      Find BlinkSticks using a filter, using synchronous USB device enumeration.

      findByIdAsync

      Finds a blinkstick by its ID.

      findFirstAsync

      Find first attached BlinkStick asynchronously and create a BlinkStickAsync instance.

      findFirstSync

      Find first attached BlinkStick and create a BlinkStickSync object.

      findRawDevicesAsync

      Find raw USB devices using asynchronous USB device enumeration.

      findRawDevicesSync

      Find raw USB devices using synchronous USB device enumeration.

      Core

      BlinkStick

      Main class responsible for controlling BlinkStick devices.

      DeviceIdManager

      Class to manage IDs on BlinkStick devices.

      Animation

      Animation

      Bag of static methods for creating animations.

      AnimationBuilder

      Class to build complex animations.

      AnimationRunner

      Class to run animations on a Blinkstick device.

      ComplexFrame

      ComplexFrame instance represents a single frame of animation with multiple colors and a specific duration.

      SimpleFrame

      SimpleFrame represents a single frame of animation with a specific color and duration.

      WaitFrame

      Null frame doesn't change the state of the LEDs. It just waits.

      Frame

      Any frame type.

      FrameIterable
      PulseOptions
      TransformEachFrameCb

      Callback function to transform each frame.

      WaveOptions
      assertFpsBelow100
      combine

      Combines multiple asynchronous animations into a single async iterable.

      combineSync

      Combines multiple synchronous animations into a single iterable.

      convertSimpleFramesToComplexFrame

      Converts multiple simple frame iterables (one per LED) into a single complex frame iterable.

      limitDuration

      Sets maximum duration for an animation. The last frame can be shortened to fit the maximum duration. Frames beyond the maximum duration are dropped

      morph

      Generates intermediate frames between two RGB colors. These don't include the start and end frames.

      morphBetweenComplexFrames

      Morphs between two complex frames.

      morphComplex

      Smooth transition between two animations.

      morphMany

      Smooth transition between multiple RGB colors.

      pulse

      Pulses a color and backs off to black.

      repeat

      Repeats an animation a specified number of times.

      smoothFps

      Streaming FPS smoother.

      transformEachFrame

      Applies a transformation to each frame in the animation.

      wave

      Build wave effect

      Utils

      asyncCollect

      Collects all items from an iterable or async iterable into an array.

      getRandomColor

      Gets a random RGB color object.

      getRandomColorTuple

      Gets a random RGB color tuple.

      wrapGeneratorForAnimation

      Wrap a generator function into an object implementing Iterable or AsyncIterable. A common mistake is to pass a generator object to a function that expects an iterable. While generators are iterable, they behave very differently from other iterables. In particular, they are not reusable - you can iterate over them only once, unlike arrays or sets.

      Adapters

      LibUsbTransport

      UsbTransport implementation using the 'usb' (libusb) library.

      NodeHidAsyncTransport

      UsbTransport implementation using the 'node-hid' library with asynchronous methods.

      NodeHidSyncTransport

      UsbTransport implementation using the 'node-hid' library with synchronous methods.

      UsbTransport

      Abstract class representing a USB transport layer.

      MinimalDeviceInfo

      Constants

      BlinkStickProMode

      BlinkStick modes (applicable to BlinkStick Pro).

      Channel

      Channel for BlinkStick Pro devices.

      COLOR_KEYWORDS

      Color keywords, taken as-is from original library.

      FeatureReportId
      BlinkstickDeviceDefinition

      Type used to describe a Blinkstick device.

      deviceDescriptions

      Known Blinkstick devices and their LED counts.

      FeatureReportDescription

      Descriptions of HID feature reports for BlinkStick devices.

      PRODUCT_ID

      Product ID for BlinkStick devices.

      VENDOR_ID

      Vendor ID for BlinkStick devices.

      Implementation details

      BlinkstickAsync

      Async and recommended version of BlinkStick class using node-hid for communication.

      BlinkStickLibUsb

      Version of BlinkStick that uses libusb for communication.

      BlinkstickSync

      Synchronous version of BlinkStick class using node-hid for smoother migration from old API.

      Led
      LedGroup

      Inputs

      AllPossibleColorOptions
      ColorInput

      Type representing a color input that can be a tuple of RGB values, an object with RGB properties, or a color keyword.

      ColorObject

      Represents a color using its red, green, and blue components.

      PulseOptions
      RgbTuple

      Legacy

      NormalizedColorOptions
      AllPossibleColorOptions
      ColorOptions

      Legacy list of all possible ways to specify a color along with additional options.

      MorphOptions
      SetColorOptions

      Legacy options for setting color on LEDs.

      Other

      BlinkstickAny
      Constraint
      KnownColor
      KnownDeviceInfo
      KnownDeviceName
      LimitedBlinkStick

      Limited version of BlinkStick that only includes schedulable operations and properties.

      MinimalDevice
      NodeHidFilterFunction

      A filter function for Node-HID devices.

      Properties
      SchedulableOperations
      COLOR_KEYWORD_RGB_TUPLES
      attemptToGetDeviceDescription
      colorInputToRgbTuple
      findBlinkSticks → findBlinkSticksSync
      findFirst → findFirstSync