Axolemma
A tool for procedurally generating Ranvier areas.
--
How to Install
npm install --save axolemma
How to Use
const Axolemma = require('axolemma')
Axolemma.generate({
type: 'Digger'
writeToFile: true
}).then(function(data) {
const {graphic, rooms, yaml} = data
console.log(graphic)
console.log(yaml)
return rooms.map(
roomDef => new Room(roomDef)
)
})
Configuration
When using Axolemma programmatically (or eventually through the CLI), you can customize the default options using either a .axolemmaconfig
file or by adding an "axolemma" field in your package.json.
Your .axolemmaconfig
can be either a JavaScript module or a JSON file. Axolemma will crawl up the tree to find the file so it can be in the root of your Ranvier bundle, the root of your fork of Ranvier, or even in your home directory.
Configuration precedence goes as follows:
- Options passed in programmatically
.axolemmaconfig
options- Options from
"axolemma"
field in package.json - Axolemma's built-in defaults.
Axolemma accepts the following options:
Misc.
Axolemma is currently in an early alpha stage. Use at your own risk.
The areas it generates are incredibly generic in this iteration so much hand-editing is still required.
If you're using this in your Ranvier server to dynamically generate content on the fly, consider using a Cluster or similar to avoid blocking the main process with Axolemma.