This is a fork of the original repository of the WaveDrom. The idea is to modify skins to generate different styles.
There are several examples in work_folder:
- Put the following line into your HTML page
<header>:
<script src=".../skins/default.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/3.1.0/wavedrom.min.js" type="text/javascript"></script>- Set the
onloadevent for the HTML body.
<body onload="WaveDrom.ProcessAll()">- Insert WaveJSON source inside HTML
<body>wrapped with the<script>tag:
<script type="WaveDrom">
{ signal : [
{ name: "clk", wave: "p......" },
{ name: "bus", wave: "x.34.5x", data: "head body tail" },
{ name: "wire", wave: "0.1..0." },
]}
</script>-
To modify your skin, first generate a new one. There is an example of it in
unpacked/skins/default_noX.svgwhere the X values have been translated into black spaces. -
For the next step you need to install node:
sudo apt install nodejsIf you don't have some package. First you have to type:
sudo apt install npmand then:
sudo npm install <package_name>- Run:
sudo nodejs bin/svg2js.js -i unpacked/skins/default_noX.svg > skins/default_noX.js- Then change your HTML to:
<script src=".../skins/default_noX.js" type="text/javascript"></script>
<script src=".../wavedrom.min.js" type="text/javascript"></script>See LICENSE.