All Projects → mooyoul → geo-pattern

mooyoul / geo-pattern

Licence: MIT License
Create beautiful generative geometric background images from a string ✨ TypeScript port of jasonlong/geo_pattern. Supports both Node.js and Browser.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to geo-pattern

Designpatternslibrary
A comprehensive design patterns library implemented in C#, which covers various design patterns from the most commonly used ones to the lesser-known ones. Get familiar with and learn design patterns through moderately realistic examples.
Stars: ✭ 485 (+1369.7%)
Mutual labels:  design, patterns
Text adventure
Practice Design Patterns through implementing a text based adventure game
Stars: ✭ 10 (-69.7%)
Mutual labels:  design, patterns
Designpatternsincsharp
Samples associated with Pluralsight design patterns in c# courses.
Stars: ✭ 149 (+351.52%)
Mutual labels:  patterns, pattern
Guardclauses
A simple package with guard clause extensions.
Stars: ✭ 767 (+2224.24%)
Mutual labels:  patterns, pattern
Design Patterns In Dart
Gang of Four (GOF) design patterns implemented in Dart. Contributions welcome!
Stars: ✭ 135 (+309.09%)
Mutual labels:  design, patterns
100 Words Design Patterns Java
GoF Design Patterns, each pattern described with story from real life.
Stars: ✭ 117 (+254.55%)
Mutual labels:  design, patterns
Pytest Patterns
A couple of examples showing how pytest and its plugins can be combined to solve real-world needs.
Stars: ✭ 24 (-27.27%)
Mutual labels:  design, pattern
Semana Js Expert30
Aulas da Semana JS Expert 3.0 - Construindo um chat multiplataforma usando linha de comando e JavaScript Avançado
Stars: ✭ 238 (+621.21%)
Mutual labels:  design, patterns
Fooddelivery
Design OO food delivery app with C# & Design Patterns
Stars: ✭ 126 (+281.82%)
Mutual labels:  design, patterns
Ios Design Patterns
Learning ground for iOS Design Pattern included with sample projects for MVC, MVP, MVVM, and VIPER
Stars: ✭ 120 (+263.64%)
Mutual labels:  design, patterns
Webgradients
A curated collection of splendid gradients made in CSS3, .sketch and .PSD formats.
Stars: ✭ 2,197 (+6557.58%)
Mutual labels:  design, background
Sig
The most powerful and customizable binary pattern scanner
Stars: ✭ 131 (+296.97%)
Mutual labels:  patterns, pattern
Bootstrap-Basics-v4
A introductory tutorial on how to use Bootstrap for our front-end design via docs on getbootstrap.com
Stars: ✭ 21 (-36.36%)
Mutual labels:  design
celery.node
Celery task queue client/worker for nodejs
Stars: ✭ 164 (+396.97%)
Mutual labels:  background
petter
Petter – a vector-graphic-based pattern generator.
Stars: ✭ 23 (-30.3%)
Mutual labels:  pattern
design-patterns-for-humans-cn
Design patterns for humans 中文版 - 对设计模式超简单的解释
Stars: ✭ 2,432 (+7269.7%)
Mutual labels:  design
storybook-addons-abstract
Storybook addon for linking Abstract layer and collection shares to stories. Example:
Stars: ✭ 63 (+90.91%)
Mutual labels:  design
aseprite-to-godot-variables
A Lua script to create arrays of colors and indexes of those colors from an Aseprite sprite to be used in Godot.
Stars: ✭ 19 (-42.42%)
Mutual labels:  patterns
events
📅 Upcoming events, conferences, meetups related to Open Source Design
Stars: ✭ 53 (+60.61%)
Mutual labels:  design
front-end-resources
📚Resources for front-end developer
Stars: ✭ 32 (-3.03%)
Mutual labels:  patterns

@prescott/geo-pattern

Build Status Github Pages Status Semantic Release enabled npm bundle size (minified, gzipped) Renovate enabled MIT license

Cover Image

Create beautiful generative geometric background images from a string

@prescott/geo-pattern has visual regression tests and perfectly matches to the original geo-pattern gem outputs!

Live Demo

https://mooyoul.github.io/geo-pattern/

E2E Test Status

Browser Status Build
IE 11 BrowserStack Status ES5 Build
Edge Latest BrowserStack Status ES6 Build
Firefox Latest BrowserStack Status ES6 Build
Edge 15 BrowserStack Status ES6 Build
Chrome Latest BrowserStack Status ES6 Build, Native Build
macOS Safari Latest BrowserStack Status ES6 Build
iOS Safari Latest BrowserStack Status ES6 Build
iPadOS Safari Latest BrowserStack Status ES6 Build
Android Tab Chrome Latest BrowserStack Status ES6 Build
Android Chrome Latest BrowserStack Status ES6 Build

Getting Started

$ npm install @prescott/geo-pattern --save

API

generate(params: GeneratePatternParams) => Promise<Pattern>

interface GeneratePatternParams {
  input: string;
  patterns?: string[];
  color?: string;
  baseColor?: string;
}

interface Pattern {
  background?: Background;
  structure?: Structure;
  width: number;
  height: number;
  toSVG(): string;
  toDataURL(): string;
}
import { generate } from "@prescott/geo-pattern";
const pattern = await generate({ input: "lorem ipsum" });
const svg = pattern.toSVG();
const dataUri = pattern.toDataURL();

Browser Builds

@prescott/geo-pattern provides browser builds.

All browser builds require Promise, Map, Set, and TextEncoder. You should polyfill missing features if you need to support legacy browsers.

Currently, There are four types of Browser Build.

Type Path Notes
Default (CommonJS) dist/browser Use this build if you're using bundler like Webpack.
ES5 (UMD) browser/es5 Use this build if you want to support legacy browsers (e.g. IE 11)
ES6 (UMD) browser/es6 Use this build if you want to support modern browers only
Native (UMD) browser/native Use this build if you want to support cutting-edge browsers only

About "Native" Build

Native build uses browser built-in hash function (Crypto Subtle API)

Use @prescott/geo-pattern using unpkg

<!-- ES6 Target Build -->
<script type="text/javascript" src="https://unpkg.com/@prescott/geo-pattern/browser/es6"></script>

<!-- Native Build -->
<script type="text/javascript" src="https://unpkg.com/@prescott/geo-pattern/browser/native"></script>

<!-- ES5 Target Build (for Compat, requires Promise, Map, Set, and TextEncoder polyfill -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.5/core.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/@prescott/geo-pattern/browser/es5"></script>

Wishlists

  • Smaller library size

Changelog

See CHANGELOG.

Testing

$ npm run test:spec # for unit test
$ npm run test:e2e:node # for Node.js integration test
$ npm run test:e2e:browser # for Browser integration test using locally installed chrome
$ npm run test:e2e:browserstack # for Browser compability test using BrowserStack

BrowserStack Logo

@prescott/geo-pattern uses BrowserStack for compatibility testing.

Build

$ npm run build

Related

TBD

Diagram

Dependency Graph

Dependency Graph

Credits

geo-pattern was originally wrote by Jason Long. It can't be done without his efforts.

Kudos for his amazing work! <3

License

MIT

See full license on mooyoul.mit-license.org

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].