Explorar el Código

Add images and media chunk

Evgeniy Parfenyuk hace 3 meses
padre
commit
189c67721d
Se han modificado 1 ficheros con 43 adiciones y 1 borrados
  1. 43 1
      docs/vnrs_specification.md

+ 43 - 1
docs/vnrs_specification.md

@@ -282,10 +282,52 @@ Good news is we can easily avoid them by using Markdown links:
 2
 3   + [](next_day.vnrs)
 ```
-**Yes, it's just a single choice chunk.**
+**Yes, it's just a single choice chunk.** 
 
 This is how we can go from one file to another. Writing anything *after*
 is kinda useless, since it can't be viewed anyway.
 
 
+### 3.2.6 Images chunk
+Markdown only supports images embedding, so this chunk exists solely for
+character sprites and backgrounds.
+
+```markdown
+1   ![](sprites/alice/normal.png){left}
+2   @ALICE__
+3   Hi there!
+4
+5   ![](sprites/bob/happy.png){right}
+6   @BOB__
+7   Hello, nice to meet you!
+8
+9   ![](bg/office/evening.png)
+```
+
+Images with `sprites` path work like sprites and `bg` works like 
+backgrounds. For both of them we can specify additional attributes
+through `{}`, but if no attributes specified engine should 
+automatically place characters without collision (from left to right).
+
+### 3.2.7 Media chunk
+This is for audio and video. Well, we can't embed them with Markdown,
+so we use link-like syntax:
+
+
+```markdown
+1   [](sound/bell.mp3)
+2   [](music/.mp3)
+3
+4   [](video/intro.mp4)
+```
+
+Any audio placed in `sound` directory would be played once. `Music` in 
+eponymous directory will be played on repeat.
+
+Any audio is playing in background, but `video` is played *instead* of
+text (and no layer can be over it). Video played once, then parser
+reads further.
+
+In HTML, they all will be embedded. User should click to play them, sadly. 
+
 ## 3.3 Inline parser