npm install
npm start
http://localhost:8080/api-docs/
Setup your own bookmarks! Build inlay frieze with different wood species.
You are free to adjust:
- The number of pairs of triangles.
- The number of columns of triangles.
- The dimensions of the bookmark.
- The wood specie used for the background.
- Even and odd background wood species for triangles.
- Mind the cutting lines with show strokes option.
- Set if downloadable or not.
Param title | Possible value |
---|---|
uniqueId |
an unique HTML id |
height |
from 100 to 1000 |
width |
from 100 to 300 |
background |
see List of pattern species |
numberOfpairs |
from 1 to 15 |
evenPattern |
see List of pattern species |
oddPattern |
see List of pattern species |
showStrokes |
true/false |
columns_per_width |
from 1 to 15 |
can_download |
true/false |
patterns |
a javascript array of "string" values |
In a div in a html file:
<div id="zone-demo"></div>
In a javascript file:
window.onload = function () {
// Let's construct a non editable canvas without link.
let canvasOfDemo = new BookMark('demo',
300,
300,
"images/dataset/2/FreneJapon.jpg",
3,
"images/dataset/2/Citronnier.jpg",
"images/dataset/2/Cypres.jpg",
false,
1,
true,
{
'background': [
"images/dataset/2/FreneJapon.jpg",
"images/dataset/2/ErableUS.jpg",
"images/dataset/2/Sycomore.jpg",
"images/dataset/2/cheneLargeVanille.jpg",
],
'triangles': [
"images/dataset/2/Poirier.jpg",
"images/dataset/2/Citronnier.jpg",
"images/dataset/2/Cypres.jpg",
"images/dataset/2/EtreBlanc.jpg",
"images/dataset/2/MerisierDeFrance.jpg"
]
}
);
};
It gives the following result: