Download the PHP package atelier/field without Composer
On this page you can find all versions of the php package atelier/field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download atelier/field
More information about atelier/field
Files in atelier/field
Package field
Short Description Procedural SVG drawings for PHP within a specified area: waves, dunes, mountains, contours, flow, halftone
License MIT
Homepage https://ateliersvg.com/field/
Informations about the package field
Atelier Field
Procedural SVG drawings for a specified width and height, in PHP.
Generate landscapes, contours, partitions, flows, and density fields for a given canvas. Each drawing uses the requested width and height; some fill the viewport, while others leave transparent space between their shapes.
Examples from the catalogue: waves and low poly.
A field is an immutable drawing generated for one viewport. It produces standalone SVG,
exports a CSS background, or supplies a group for an Atelier SVG document. For a surface that
repeats, use the companion atelier/pattern package.
Documentation
Installation
Requires PHP 8.3+ and atelier/svg. Seeded generators use ext-random, bundled with PHP.
Composer installs the package dependencies.
Quick start
Save a drawing as waves.svg:
Open waves.svg in a browser. The following snippets reuse $field, the imports, and the
autoloader above. To append the drawing to an existing Atelier SVG document:
Get CSS that uses the drawing as a background:
A background image is a document of its own, so currentColor resolves to black there. Set a
real colour before calling toDataUri() or toCss().
Colour
Style methods return a new field, leaving the original unchanged:
The default foreground is currentColor and the background is transparent. Inline SVG
inherits its colour from the surrounding page.
For a coordinated foreground, background, and palette, use a theme:
When a theme defines a palette, layers use those colours instead of the foreground colour.
withColor() does not replace palette entries. Without a palette, layers use one colour at
different opacities. See Colour.
Catalogue
|
Waves |
Dunes |
Strata |
|
Mountains |
Skyline |
Cloud |
|
Blob |
Contours |
Archipelago |
|
Low poly |
Voronoi |
Foam |
|
Flow field |
Terrain |
Halftone |
|
Moire |
Wave interference |
Rays |
Error handling
Width and height must be finite and greater than zero. Invalid dimensions or generator options
throw Atelier\Field\Exception\InvalidArgumentException. All package exceptions implement
Atelier\Field\Exception\ExceptionInterface.
See Input limits for validation examples and the viewport and precision limits before using extreme dimensions or sampling settings.
Gallery
From a repository checkout with dependencies installed:
Writes examples/output/index.html.
Documentation
- Getting started: install the package and produce a first SVG.
- Illustrated catalogue: choose a field and explore its parameters.
- Package overview: understand the API and its boundaries.
Read the complete guides and generated illustrations in docs/.
Contributing
Contributions are welcome. Visit the project on GitHub to report a bug, suggest a feature, or open a pull request.
Before submitting code, run:
Changes to public behaviour need tests and a documentation update. Keep line coverage at 100%. Coverage reporting requires PCOV or Xdebug.
Support
Bug reports, security disclosures, and contribution guidelines are collected at ateliersvg.com/support.
License
Atelier Field is released under the MIT License.