## DEPRECIATED This library has been superceeded by btcube-web which has support for moyu cubes as well as qiyi. No further development will be done on this library, and all contributions should be directed towards btcube-web
A TypeScript library for interacting with QYSC (QiYi Smart Cube) devices via Web Bluetooth API.
This library is availible on the NPM registry at https://www.npmjs.com/package/qysc-web A sample app can be seen at https://simonkellly.github.io/qysc-web
- Web Bluetooth integration for QYSC devices
- Cube state management and manipulation
- RxJS integration for reactive programming
- TypeScript support with full type definitions
This library follows closely to the standard set by gan-web-bluetooth and implements the qiyi smart cube protocol described at qiyi_smartcube_protocol with some help from qy-cube
npm install qysc-web
# or
yarn add qysc-web
# or
bun add qysc-webThere is a very basic sample-app within this repository, but the core usage can be seen below.
import { connectQYSC } from 'qysc-web';
// Connect to a QYSC device
const cube = await connectQYSC();
// Listen for cube state changes
cube.events.moves.subscribe(move => {
console.log('Cube Moved:', move);
});
// Disconnect when done
cube.disconnect();This project uses Bun as the package manager and build tool.
# Install dependencies
bun install
# Build the project
bun run build
# Link the package for the sample app
bun link qysc-web
# Publish the package to NPM
bun publishContributions are welcome! Please feel free to submit a Pull Request.