Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

about

No frills L-system calculator.

setup

Fetch the latest version from GitHub directly:

# Contains ES and CJS modules
npm i thewhodidthis/lsys

usage

Initialize with a Map of rules, seed with an axiom and call repeatedly to monitor growth. For example,

import lsys from '@thewhodidthis/lsys'

// Algae
const data = new Map([
  ['A', 'AB'],
  ['B', 'A']
])

const seed = ((rules, axiom) => {
  const step = lsys(rules, axiom)

  const tick = function *() {
    while (1) {
      yield step()
    }
  }

  return tick()
})(data, 'A')

seed.next()

About

Helps setup L-systems

Resources

License

Releases

No releases published

Packages

No packages published