-
Notifications
You must be signed in to change notification settings - Fork 0
Add Layouts and renderFacade task
#200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
|
|
||
| # Layouts | ||
|
|
||
| Layouts are a kind of structure that can adapt itself to fit a requested space. | ||
|
|
||
| ## Table of contents | ||
|
|
||
| * [Stretchable Layout](#stretchable-layout) | ||
| * [Repeat Layout](#repeat-layout) | ||
| * [Concatenate Layout](#concatenate-layout) | ||
|
|
||
| ## Stretchable Layout | ||
|
|
||
| Makes a structure stretchable by having one band per axis (row, column or layer) that gets repeated or omitted to fit the requested size. | ||
|
|
||
| ```yaml | ||
| structure: | ||
| axes: x | ||
| blueprint: "rgb" | ||
| with: | ||
| "r": wool:red | ||
| "g": wool:green | ||
| "b": wool:blue | ||
| stretchableAlongX: | ||
| at: 2 | ||
| atLeast: 2 | ||
| atMost: 5 | ||
| stretchableAlongY: | ||
| at: 1 | ||
| ``` | ||
|
|
||
| Fields: | ||
| - `structure` (required): The structure to make stretchable | ||
| - `stretchableAlongX`/`Y`/`Z` (each optional): Strech parameters along x/y/z-axis. Omit to keep that fixed (non-stretchable). | ||
| - `at` (required): coordinate of the band to stretch | ||
| - `atLeast` (optional, default `1`): Minimum repetition of the band. `0` allows squeezing. | ||
| - `atMost` (optional, default `infinite`): Maximum repetition of the band. | ||
|
|
||
| ## Repeat Layout | ||
|
|
||
| Repeats a layout along a given axis. If the repeated layout is resizable on that axis, | ||
| it may be stretched to fill the requested size. | ||
|
|
||
| ```yaml | ||
| repeat: otherLayout | ||
| along: x | ||
| atLeast: 1 | ||
| atMost: 2 | ||
| ``` | ||
|
|
||
| Fields: | ||
| - `repeat` (required): The layout to repeat. | ||
| - `along` (required): Axis along which the layout is repeated (`x`, `y` or `z`) | ||
| - `atLeast` (optional, default `1`): Minimum repetitions of the layout. `0` allows the layout to be empty. | ||
| - `atMost` (optional, default `infinite`): Maximum repetitions of the layout. | ||
|
|
||
| ## Concatenate Layout | ||
|
|
||
| Places several layouts side by side on a given axis, with priorities. | ||
|
|
||
| It proceeds that way: | ||
| 1. All layouts gets their minimal required space (minimum size). | ||
| 1. Higher priority layouts (higher number) start first and get as much remaining space as possible. | ||
| 1. If space still remains, continue with lower priorities until no space left. | ||
|
|
||
| If serveral layouts have the same priority, the available space is distributed between them as evenly as possible. | ||
|
|
||
| ```yaml | ||
| concatenate: | ||
| - priority: 1 | ||
| otherLayout | ||
| - priority: 2 | ||
| anotherLayout | ||
| along: y | ||
| zPolicy: keep | ||
| ``` | ||
|
|
||
| Fields: | ||
| - `concatenate` (required): List of layouts to place side by side. Each layout definition may have an extra `priority` field (default `0`) to set its order of priority (higher values get space first). | ||
| - `along` (required): Axis along which the layouts are placed (`x`, `y` or `z`) | ||
| - `x`/`y`/`zPolicy` (optional, default `inherit`): Policy for the x/y/z-axis (only for axes other than `along` axis). | ||
|
|
||
| Policies control how other axes are sized: | ||
| | Policy | Constraint on concerned axis | | ||
| |:----------|:--------------------------------------------------------| | ||
| | `inherit` | Use parent policy (layout or task). | | ||
| | `adjust` | Force same size for all child layouts. | | ||
| | `keep` | Keep child layouts sizes (different sizes are allowed). | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.