This is a web component to build patterns from IIIF manififests - like from wall papers. It's also possible to pass a collection like the default one to load a sample from it. For more background see this blog article-
A demo is available at https://cmahnke.github.io/lucienne/.
The software is named after Lucienne_Day, a famous British textile and wallpaper designer.
npm i @projektemacher/lucienne
Make sure you have a HTMLElement to attach the generator to:
<div id="generator"></div>
Then (either in a script element or a JavaScript module) pass the
const urls = [
{ url: "https://vorsatzpapier.projektemacher.org/patterns/collection.json", label: "Sammlung Vorsatzpapier" }
];
const generatorElement = document.querySelector<HTMLDivElement>("#generator")!;
const cuttingTable = new CuttingTable(generatorElement, true, true, true, true, urls, false);See next sections for options.
| Parameter | Type | Default | Description |
|---|---|---|---|
element |
HTMLDivElement |
— | The container element where the CuttingTable interface will be rendered. |
urlInput |
boolean |
true |
Whether to display a URL input field for specifying image sources. |
gridSelector |
boolean |
true |
Whether to enable grid selection controls for layout configuration. |
download |
boolean |
true |
Whether to enable download functionality for exported JSON data. |
autoLoad |
boolean |
true |
Whether to automatically load the first configured URL upon initialization. |
urls |
URL | Array<{url: string, label: string}> | string | undefined |
undefined |
Optional initial URLs to load. Can be a single URL, an array of URL objects with labels, or a string URL. |
shifts |
boolean |
false |
Whether to enable shift controls for offset adjustments. |
Errorif no valid element is provided or if no initial URL is set whenurlInputisfalse.
This package uses Vite for development.
npm run dev
npm run jsdoc
One can view the JSDoc using serve
npm install -g serve
serve public/jsdoc
Vite is sadly not very flexible in regard of creating distributable artifacts, thus we use Rollup for that.
npm run build
It's also possible to use vite to build the test and debug site:
npm run vite-build
Since version 0.1.1 (and thus OpenSeadragon 6) the types aren't provides by @tyoes/openseadragon anymore, they are now provided by src/@types/openseadragon/index.d.ts which is used to override the provided types. Those are currently hand crafted.
- Preview icon in collections, implemented but parser doesn't support it
- Pass cuts via URL
- Use a options object in constructor
- Select download area from result viewer
- Shifts / offsets
- Dynamic margins not clipped correctly at edges
- insets nor working with clippings
- check margins wit offsets in two dimensions
- Rotation not working with offsets
- Dynamic margins not clipped correctly at edges
- Make sure everything is reset when changing the size - NTH
- Check how the augmented types could be generated