JSPM

js-svg-piano

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q26086F
  • License MIT

A simple piano keyboard built with js and svg

Package Exports

  • js-svg-piano

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-svg-piano) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

js-svg-piano

Very small module for drawing a piano using js and svg

The point in using svg is that it is easy to scale multiple octaves to fit exact in a single div container

Install

npm install --save js-svg-piano

Usage

var p = require('js-svg-piano');
var elemID = 'piano-container';

var p = new piano(elemID, {
        octaves: 2,
        octaveBegin: 3
});

p.createPiano();

You can see index.html which includes the bundle built from test.js

You can see the example here:

https://diversen.github.io/js-svg-piano/

Build and watch example

./watch

License

MIT © Dennis Iversen