Skip to content

Tiny and pure javascript functional bindings for the Razer Chroma API

Notifications You must be signed in to change notification settings

cvpcasada/bahaghari

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bahaghari

Functional javascript API wrapper for Razer Chroma REST api.

Full Rest Documentation can be found here: https://assets.razerzone.com/dev_portal/REST/html/index.html

Documentation is work in progress

Usage

import * as B from 'bahaghari';

const options = {
  heartbeat: true,
  url: 'https://chromasdk.io:54236/razer/chromasdk'
};

const app = {
    title: 'App Title',
    description: 'App Desc',
    author: {
        name: 'Cyrus',
        contact: `my.email@email.com`
    },
    device_supported: ['keyboard', 'mousepad', ...]
}

const chromaIntance = B.createChroma(app, options);

// apply effects
await B.setWaveAnimation(chromaInstance, {
    device: `keyboard`,
    cycles: 5,
    colors: ['#fff', `red`, ...]
});

// cleanup / close
await B.stop(chromaInstance);

Functions

Work in progress

  • createBGRColor :: hex_string || {r: num, b: num, g: num} -> bgr: num
  • createChroma :: app -> Promise
  • setEffect :: OPTS {device, method, body} , chroma -> Promise<>
  • deleteEffect
  • stop
  • setCustomEffect
  • setBreathingAnimation
  • setWaveAnimation
  • setOffEffect
  • setStaticEffect

About

Tiny and pure javascript functional bindings for the Razer Chroma API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published