trianglify
Advanced tools
Comparing version 4.1.0-beta to 4.1.0
{ | ||
"name": "trianglify", | ||
"version": "4.1.0-beta", | ||
"version": "4.1.0", | ||
"description": "Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.", | ||
@@ -5,0 +5,0 @@ "main": "dist/trianglify.js", |
@@ -15,3 +15,3 @@ # Trianglify ![Build Status](https://github.com/qrohlf/trianglify/workflows/build/badge.svg) | ||
# Getting Trianglify | ||
# 📦 Getting Trianglify | ||
@@ -33,3 +33,3 @@ You can grab Trianglify with npm/yarn (recommended): | ||
# Quickstart | ||
# 🏎 Quickstart | ||
@@ -66,3 +66,3 @@ **Browsers** | ||
# Licensing | ||
# ⚖️ Licensing | ||
@@ -74,3 +74,3 @@ The source code of Trianglify is licensed under version 3 of the GNU General Public License ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.html)). This means that any websites, apps, or other projects that include the Trianglify javascript library need to be released under a compatible open-source license. If you are interested in using Trianglify in a closed-source project, please email qr@qrohlf.com to purchase a commercial license. | ||
# API | ||
# 📖 API | ||
@@ -186,3 +186,3 @@ Trianglify is primarily used by calling the `trianglify` function, which returns a `trianglify.Pattern` object. | ||
# Configuration | ||
# 🎨 Configuration | ||
@@ -189,0 +189,0 @@ Trianglify is configured by an options object passed in as the only argument. The following option keys are supported, see below for a complete description of what each option does. |
@@ -152,2 +152,12 @@ /** | ||
}) | ||
test('supports rendering to the destSVG target', () => { | ||
const destSVG = document.createElementNS('http://www.w3.org/2000/svg', 'svg') | ||
expect(destSVG.children).toHaveLength(0) | ||
const pattern = trianglify({ seed: 'destSVG works' }) | ||
// side-effect-ful render to destSVG | ||
pattern.toSVG(destSVG) | ||
expect(destSVG.children).toHaveLength(pattern.polys.length) | ||
expect(destSVG).toMatchSnapshot() | ||
}) | ||
}) | ||
@@ -154,0 +164,0 @@ |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
393724
5119
0