vladdeSV / me-generator

Generate an image with random pieces of clothing / cosmetics. Not for NFTs.
https://generator.vladde.me/?seed=
MIT License
3 stars 1 forks source link

Rearrange parts in ruleset #7

Closed vladdeSV closed 3 years ago

vladdeSV commented 3 years ago

Change order of parts relative to other parts. This also includes moving elements of a part. Further explained in https://github.com/vladdeSV/me-generator/issues/4.

Syntax in the rulebook:

// rulebook.json
{
  // …
  "indexes": [
    ["A", "over", "B"]
    ["C#foo", "under", "D#bar"]
    ["E", "under", "F#baz"]
  ]
}

The identifiers follow the syntax

<part name> ( # <layer id> )
            |-- optional --|

example:
 'my part#second-layer'
 'my part'

invalid examples:
 'my part#second layer'
 'my part#'
vladdeSV commented 3 years ago

There is still error handling to be implemented.

vladdeSV commented 3 years ago

Invalid identifiers or identifiers for missing parts are ignored, but log a message. It should only log an warning/error for invalid identifiers, and silently ignore for missing parts.

Because of the nature of the generator, some parts might not appear at generation. However, if they do certain rules should be applied to them.

vladdeSV commented 3 years ago

Features are implemented. Only code cleanup and error handling remaining.

Merging now, so these features become available for me-generator-images.

vladdeSV commented 3 years ago

Closes #4