chore(core): Refactor v3 code
This commit is contained in:
parent
f882a26408
commit
200cebf582
27 changed files with 3961 additions and 2633 deletions
|
@ -1,13 +1,20 @@
|
|||
import { Pattern } from './pattern.mjs'
|
||||
import { loadDesignDefaults } from './config.mjs'
|
||||
import { __loadDesignDefaults } from './config.mjs'
|
||||
|
||||
/*
|
||||
* The Design constructor. Returns a Pattern constructor
|
||||
* So it's sort of a super-constructor
|
||||
//////////////////////////////////////////////
|
||||
// CONSTRUCTOR //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Return a Pattern constructor (it's a super-constructor)
|
||||
*
|
||||
* @constructor
|
||||
* @param {object} config - The design configuration
|
||||
* @return {function} pattern - The pattern constructor
|
||||
*/
|
||||
export function Design(config) {
|
||||
// Initialize config with defaults
|
||||
config = { ...loadDesignDefaults(), ...config }
|
||||
config = { ...__loadDesignDefaults(), ...config }
|
||||
|
||||
// Create the pattern constructor
|
||||
const pattern = function (...sets) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue