Add more docs about slides
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Isaac Mills 2024-10-18 00:05:09 -06:00
parent 6b68df59db
commit 37c3b85809
Signed by: fnmain
GPG key ID: B67D7410F33A0F61

View file

@ -11,3 +11,113 @@ A slide looks like this
Subtitle: ViewBox[1]__.., Subtitle: ViewBox[1]__..,
}[] }[]
``` ```
This is what the syntax looks like
```
{
{Object name}: {Viewbox name}[index into viewbox][direction from][diretion to],
}[{see Functions}]
```
## Directions
The directional modifiers in a slide denote where an object is coming from, and where it's going. The symbols used to denote them are as follows
- `^`: Up
- `_`: Down
- `>`: Right
- `<`: Left
- `.`: Center
Two of these make a full direction, for example:
- `^>`: Upper right
- `_<`: Lower left
- `..`: Center center
- `^^`: Upper center
- `^.`: Upper center
Any combination of these symbols will make a valid direction.
## Implicit information
Once an object is present on a slide, the following slides can ommit data for that object to avoid repetition. For instance: these will both make the same slide
```
{
TitleImage: ViewBox[0]....,
Title: ViewBox[0]__..,
Subtitle: ViewBox[1]__..,
}[]
{
TitleImage,
Title,
Subtitle,
}[]
```
There are three components that can be added to slide objects, or omitted if the object is already on screen
- `TitleImage`: Just putting the object name keeps it where it is, in it's previous viewbox, in it's previous position
- `TitleImage^^`: Adding just a directional target will move the object within it's previous viewbox (You may need to add `~` to the object if you intend to start the direction with an `_` to avoid it being confused with the identifier, like `TitleImage~__`)
- `TitleImage: ViewBox[1]`: If just a new ViewBox is specified, The object will move to the new viewbox, keeping it's original directional target
- `TitleImage: ViewBox[1]^^`: Adding a viewbox and a single directional modifier will move the object to it's new full location, from it's previous position and viewbox.
## Exiting
Objects will simply disappear instantly if an exit direction isn't specified for them. Here's an example of how exit directions would be done
```
{
TitleImage: ViewBox[0]....,
Title: ViewBox[0]__..,
Subtitle: ViewBox[1]__..,
}[]
{
TitleImage>>|,
Title: Viewbox[1]^^|,
Subtitle~__|,
}[]
```
In a slide, an object with a target directinal modifer of `|` will exit the slide in the direction of it's preceding "from" directional modifier. (All the implicit data rules apply to the `|` directional modifier).
## Specifiying a viewbox to come from
By default, when entering a slide, the object will start from inside the target viewbox, but you can also specify a "from" viewbox like so
```
{
TitleImage: ViewBox[0]{ViewBox[1]}....,
Title: ViewBox[0]__..,
Subtitle: ViewBox[1]__..,
}[]
```
Specifying a viewbox and index in brackets, after a target viewbox in a slide object, will make it so that the object starts from that viewbox, and moves to the target viewbox.
## Inline viewboxes
If you only plan to use a viewbox once, you can specify it inline like so
```
{
TitleImage| ViewBox[0] ^
1:3,
1:3,
1:3,
][0]....,
Title: ()[1]__..,
Subtitle: ()[2]__..,
}[]
{
TitleImage,
Title,
Subtitle,
}[]
```