Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
g200kg committed Jul 23, 2020
1 parent b16edbe commit 2382f62
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 36 deletions.
31 changes: 0 additions & 31 deletions docs/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,35 +229,4 @@ You can specify the `width`, `height` and number of `keys`. In addition, the not
</webaudio-keyboard>
```

There is no way to use an external image, but you can customize the colors by `colors` attribute.
You can specify 9 colors of border, start and end of each gradation of white key and black key, for each of normal state and pressed state.

<webaudio-keyboard colors="#888;#000;#000;#888;#777;#eee;#ddd;#333;#222">
</webaudio-keyboard>

```html
<webaudio-keyboard colors="#888;#000;#000;#888;#777;#eee;#ddd;#333;#222">
</webaudio-keyboard>
```

<br/>

<webaudio-keyboard colors="#000;#ec0;#db0;#222;#000;#0e3;#0c2;#0e3;#0c2">
</webaudio-keyboard>

```html
<webaudio-keyboard colors="#000;#ec0;#db0;#222;#000;#0e3;#0c2;#0e3;#0c2">
</webaudio-keyboard>
```

<br/>

<webaudio-keyboard colors="#222;#9dc;#8ca;#4ca;#3a9;#f8a;#f8a;#f8a;#f8a">
</webaudio-keyboard>

```html
<webaudio-keyboard colors="#222;#9dc;#8ca;#4ca;#3a9;#f8a;#f8a;#f8a;#f8a">
</webaudio-keyboard>
```

---
38 changes: 33 additions & 5 deletions docs/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Advanced Usage and Application Notes :

# Examples of Various Attributes

You can customize the appearance and behavior of webaudio-controls by adding attributes to the tags. Here are some examples.
You can customize the appearance and behavior of `webaudio-controls` by adding attributes to the tags. Here are some examples.



## WebAudio-Knobs
## webAudio-knob

By default, the webaudio-knob tag looks like this.

Expand Down Expand Up @@ -123,7 +123,7 @@ Non-square image can be used with specifying `width`/`height` instead of diamete

---

## WebAudio-Sliders
## webAudio-slider

If no slider image is provided by the `src` attribute, a simple built-in image will be used.

Expand Down Expand Up @@ -181,7 +181,7 @@ Value step is specified, resized, tooltip-text and webaudio-param are added.

---

## WebAudio-Switches
## webAudio-switch

These are default `webaudio-switch`. If no switch image is specified, simple built-in image resource is used.
Default switch type is "toggle".
Expand Down Expand Up @@ -256,7 +256,7 @@ These are 'radio' type switches. In this mode, only one switch is activated in t

---

## Keyboards
## webaudio-keyboard

This is a default keyboard. 25 keys, 480px X 128px is default.

Expand All @@ -276,6 +276,34 @@ Number of keys, width and height settings. Also the lowest key is set to note "A
</webaudio-keyboard>
```

Color customization by `colors` attribute.

<webaudio-keyboard colors="#888;#000;#000;#888;#777;#eee;#ddd;#333;#222">
</webaudio-keyboard>

```html
<webaudio-keyboard colors="#888;#000;#000;#888;#777;#eee;#ddd;#333;#222">
</webaudio-keyboard>
```


<webaudio-keyboard colors="#000;#ec0;#db0;#222;#000;#0e3;#0c2;#0e3;#0c2">
</webaudio-keyboard>

```html
<webaudio-keyboard colors="#000;#ec0;#db0;#222;#000;#0e3;#0c2;#0e3;#0c2">
</webaudio-keyboard>
```


<webaudio-keyboard colors="#222;#9dc;#8ca;#4ca;#3a9;#f8a;#f8a;#f8a;#f8a">
</webaudio-keyboard>

```html
<webaudio-keyboard colors="#222;#9dc;#8ca;#4ca;#3a9;#f8a;#f8a;#f8a;#f8a">
</webaudio-keyboard>
```

---

<script type="text/javascript">
Expand Down

0 comments on commit 2382f62

Please sign in to comment.