Compare commits

...

23 Commits
v1.0.1 ... main

Author SHA1 Message Date
3d925fd4ce fix: CI/CD 2025-01-15 13:00:57 +02:00
f170000db1 fix: gif path 2025-01-13 23:38:09 +02:00
9262f98e19 finish presentation 2025-01-13 23:33:38 +02:00
7f7314de81 fix: font path 2025-01-13 19:12:57 +02:00
4ec2ebecf0 fix: font path 2025-01-13 19:11:20 +02:00
e1e9346adf CI: add presentation 2025-01-13 19:07:58 +02:00
09b3e38b52 Init presentation 2025-01-09 20:30:47 +02:00
01f37de1df feat: add clippy images 2025-01-06 13:48:50 +02:00
a3ac544af6 chore: minor changes 2025-01-06 13:22:53 +02:00
e6a51832ab chore: update images 2025-01-05 23:25:53 +02:00
c9d987f5b6 fix: typo 2025-01-04 20:10:01 +02:00
bda058ff59 fix: typos 2025-01-03 18:15:35 +02:00
7217cd110d fix: typos 2025-01-03 18:01:35 +02:00
e71ddd761a fix: CI 2025-01-03 16:54:51 +02:00
a2dece79d6 fix: fonts 2025-01-03 16:06:02 +02:00
4efbf66eb3 fix: install mscorefonts 2025-01-03 15:10:21 +02:00
5b7d2d0e35 fix: fonts 2025-01-03 15:05:38 +02:00
4a095f9631 fix: mono fonts 2025-01-03 14:58:36 +02:00
331854ccac chore: update workflow 2025-01-03 14:45:15 +02:00
fb90f28a0d refactor: update documentary page 2025-01-03 14:14:52 +02:00
69fae7946d reafctor: update file structure 2025-01-03 14:08:51 +02:00
47cdcca4cd fix: typos 2025-01-03 00:39:31 +02:00
e16cab9182 fix: fork 2025-01-03 00:34:55 +02:00
53 changed files with 781 additions and 317 deletions

31
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Clone fonts repository
run: git clone https://github.com/touying-typ/fonts.git fonts --depth=1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Touying Exporter
run: pip install touying
- name: Build HTML File
run: |
mkdir build
touying compile presentation.typ --output build/index.html --format html --font-paths fonts --font-paths assets/fonts
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build

View File

@ -11,17 +11,22 @@ on:
type: string
permissions:
contents: write
packages: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Typst
uses: lvignoli/typst-action@main
uses: actions/checkout@v4
- name: Install Typst
uses: typst-community/setup-typst@v3
with:
source_file: |
main.typ
typst-version: 0.12
cache-dependency-path: requirements.typ
- name: Compile Typst files
run: |
typst compile --font-path=assets/fonts main.typ Cagulis_Kristians.Francis_kc22015.pdf
typst compile --font-path=assets/fonts documentary_page.typ reg_lapa_Cagulis_Kristians.Francis_kc22015.pdf
- name: Upload PDF file
uses: actions/upload-artifact@v4
with:
@ -35,4 +40,6 @@ jobs:
if: github.ref_type == 'tag'
with:
name: "${{ github.ref_name }} — ${{ env.DATE }}"
files: main.pdf
files: |
Cagulis_Kristians.Francis_kc22015.pdf
reg_lapa_Cagulis_Kristians.Francis_kc22015.pdf

View File

@ -1,3 +0,0 @@
#[derive(Component, Debug, Clone, Copy, PartialEq, Eq, Default, Reflect)]
#[reflect(Component)]
pub struct Player;

View File

@ -39,7 +39,6 @@ pub(super) fn spawn_maze(
Visibility::Visible,
))
.insert_if(CurrentFloor, || *floor == 1) // Only floor 1 gets CurrentFloor
.insert_if(NextFloor, || *floor != 1) // All other floors get NextFloor
.id();
let assets = MazeAssets::new(&mut meshes, &mut materials, &global_config);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -1,3 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" style="background: transparent; background-color: transparent; color-scheme: light;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="26px" height="29px" viewBox="-0.5 -0.5 26 29"><defs/><g><g/><g><path d="M 0 13 L 22.67 13" fill="none" stroke="#000000" style="stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g><g><path d="M 11.33 25.5 L 11.33 0.5" fill="none" stroke="#000000" style="stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g><g><path d="M 0 25.5 L 0 13" fill="none" stroke="#000000" style="stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g><g><path d="M 22.67 25.5 L 22.67 13" fill="none" stroke="#000000" style="stroke: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/></g></g></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="32"
height="32"
viewBox="-0.5 -0.5 32 32"
id="svg6"
sodipodi:docname="fork.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview6"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="4"
inkscape:cx="-9.25"
inkscape:cy="33.875"
inkscape:window-width="1916"
inkscape:window-height="1055"
inkscape:window-x="1920"
inkscape:window-y="21"
inkscape:window-maximized="1"
inkscape:current-layer="g6" />
<defs
id="defs1" />
<g
id="g6"
transform="translate(0.5,-1)">
<g
id="g1" />
<g
id="g5"
transform="matrix(1,0,0,1.28,-7.67,-18.7)">
<path
d="M 22.67,27.5 V 15"
fill="none"
stroke="#000000"
stroke-width="2"
stroke-miterlimit="10"
pointer-events="stroke"
id="path4" />
</g>
<g
id="g7"
transform="matrix(1,0,0,1.28,-22.67,-2.7)">
<path
d="M 22.67,27.5 V 15"
fill="none"
stroke="#000000"
stroke-width="2"
stroke-miterlimit="10"
pointer-events="stroke"
id="path6" />
</g>
<g
id="g8"
transform="matrix(1,0,0,1.28,-7.67,-2.7)">
<path
d="M 22.67,27.5 V 15"
fill="none"
stroke="#000000"
stroke-width="2"
stroke-miterlimit="10"
pointer-events="stroke"
id="path7" />
</g>
<g
id="g9"
transform="matrix(0,1,-1.28,0,34.2,-6.17)">
<path
d="M 22.67,27.5 V 15"
fill="none"
stroke="#000000"
stroke-width="2"
stroke-miterlimit="10"
pointer-events="stroke"
id="path8" />
</g>
<g
id="g10"
transform="matrix(0,1,-1.28,0,50.2,-6.17)">
<path
d="M 22.67,27.5 V 15"
fill="none"
stroke="#000000"
stroke-width="2"
stroke-miterlimit="10"
pointer-events="stroke"
id="path9" />
</g>
<g
id="g11"
transform="matrix(1,0,0,1.28,7.33,-2.7)">
<path
d="M 22.67,27.5 V 15"
fill="none"
stroke="#000000"
stroke-width="2"
stroke-miterlimit="10"
pointer-events="stroke"
id="path10" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
assets/images/game/grid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
assets/images/game/tile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

View File

@ -1,12 +1,55 @@
#import "@preview/tablex:0.0.9": tablex
#import "@preview/dashy-todo:0.0.1": todo
#import "src/layout.typ": project, indent-par
#import "src/layout.typ": indent
#set page(
margin: (
left: 30mm,
right: 20mm,
top: 20mm,
bottom: 20mm,
),
number-align: center,
paper: "a4",
)
#set text(
font: "Times New Roman",
size: 12pt,
hyphenate: auto,
lang: "lv",
region: "lv",
)
#set par(
justify: true,
leading: 1.5em,
first-line-indent: indent,
spacing: 1.5em,
)
#show heading: set block(spacing: 1.5em)
#show heading: it => {
if it.level == 1 {
pagebreak(weak: true)
text(
14pt,
align(
center,
upper(it),
),
)
} else {
text(12pt, it)
}
""
v(-1cm)
}
#let vspace = 1fr
#let fill = box(width: 1fr, repeat(sym.space))
#let long-underline = underline(box(width: 1fr, repeat(sym.space)))
#set page(numbering: none)
#heading(numbering: none, outlined: false, "Dokumentārā lapa")
#heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
Kvalifikācijas darbs "*Spēles izstrāde, izmantojot Bevy spēļu dzinēju*" ir
izstrādāts Latvijas Universitātes Eksakto zinātņu un tehnoloģiju fakultātē,
@ -19,25 +62,24 @@ izdrukai un/vai recenzentam uzrādītajai darba versijai.
#context {
set par(
first-line-indent: 1cm,
hanging-indent: 1cm,
)
v(vspace / 2)
[Autors: *Kristiāns Francis Cagulis, kc22015 ~~\_\_.01.2025.*]
[Autors: *Kristiāns Francis Cagulis, kc22015 ~~06.01.2025.*]
v(vspace)
[Rekomendēju darbu aizstāvēšanai\
Darba vadītājs: *prof. Mg. dat. Jānis Iljins ~~\_\_.01.2025.*]
Darba vadītājs: *Mg. dat. Jānis Iljins ~~06.01.2025.*]
v(vspace)
[Recenzents: *Artūrs Driķis*]
v(vspace)
[Darbs iesniegs *\_\_.01.2025.*\
[Darbs iesniegs *06.01.2025.*\
Kvalifikācijas darbu pārbaudījumu komisijas sekretārs (elektronisks paraksts)
]

497
main.typ

File diff suppressed because it is too large Load Diff

283
presentation.typ Normal file
View File

@ -0,0 +1,283 @@
#import "@preview/touying:0.5.5": *
#import themes.university: *
#import "@preview/cetz:0.3.1"
#import "@preview/fletcher:0.5.3" as fletcher: node, edge
#import "@preview/ctheorems:1.1.3": *
#import "@preview/numbly:0.1.0": numbly
#import "src/diagrams.typ": *
#set text(
font: (
"Times New Roman",
"New Computer Modern",
),
size: 12pt,
hyphenate: auto,
lang: "lv",
region: "lv",
)
#show raw: set text(
font: (
"JetBrainsMono NF",
"JetBrains Mono",
"Fira Code",
),
features: (calt: 0),
)
// cetz and fletcher bindings for touying
#let cetz-canvas = touying-reducer.with(
reduce: cetz.canvas,
cover: cetz.draw.hide.with(bounds: true),
)
#let fletcher-diagram = touying-reducer.with(
reduce: fletcher.diagram,
cover: fletcher.hide,
)
#set figure(supplement: none)
// Theorems configuration by ctheorems
#show: thmrules.with(qed-symbol: $square$)
#let theorem = thmbox("theorem", "Theorem", fill: rgb("#eeffee"))
#let corollary = thmplain(
"corollary",
"Corollary",
base: "theorem",
titlefmt: strong,
)
#let definition = thmbox(
"definition",
"Definition",
inset: (x: 1.2em, top: 1em),
)
#let example = thmplain("example", "Example").with(numbering: none)
#let proof = thmproof("proof", "Proof")
#show: university-theme.with(
aspect-ratio: "16-9",
config-info(
title: [Spēles izstrāde, izmantojot Bevy spēļu dzinēju],
subtitle: [Kvalifikācijas darbs],
author: [Kristiāns Francis Cagulis kc22015],
date: [2025],
institution: [Latvijas Universitāte],
),
config-colors(
primary: rgb("#575279"),
secondary: rgb("#797593"),
tertiary: rgb("#286983"),
neutral-lightest: rgb("#faf4ed"),
neutral-darkest: rgb("#575279"),
),
)
#title-slide()
#slide[
= Pārskats
- Entitāšu komponenšu sistēma (ECS)
- Maze Ascension
- Hexlab bibliotēka
- Sešstūru implementācija
- Saskarne
- Rezultāti un secinājumi
]
= Entitāšu komponenšu sistēma (ECS)
== Kas ir ECS?
- Koncentrējas uz kompozīciju, nevis mantošanu.
- Datu orientēta arhitektūra.
- Nodalīti dati (komponentes) un uzvedība (sistēmas).
== Datu izkārtojums
// Here is an illustration to help you visualize the logical structure. The
// checkmarks show what component types are present on each entity. Empty cells
// mean that the component is not present. In this example, we have a player, a
// camera, and several enemies.
#context {
show raw: set text(size: 16pt)
table(
columns: 7,
[*Entity (ID)*],
[*Transform*],
[*Player*],
[*Enemy*],
[*Camera*],
[*Health*],
[*...*],
`...`, "", "", "", "", "", "",
"107",
[#emoji.checkmark.heavy `<translation>`\ `<rotation>`\ `<scale>`],
emoji.checkmark.heavy,
"",
"",
[#emoji.checkmark.heavy `<50.0>`],
"",
"108",
[#emoji.checkmark.heavy `<translation>`\ `<rotation>`\ `<scale>`],
"",
emoji.checkmark.heavy,
"",
[#emoji.checkmark.heavy `<25.0>`],
"",
"109",
[#emoji.checkmark.heavy `<translation>`\ `<rotation>`\ `<scale>`],
"",
"",
[#emoji.checkmark.heavy `<camera data>`],
"",
"",
`...`,
)
}
== Piemērs
#context {
show raw: set text(size: 16pt)
```rust
#[derive(Component)]
struct Player;
#[derive(Component)]
struct Health {
current: u32,
max: u32
}
fn heal_player(
mut query: Query<&mut Health, With<Player>>,
time: Res<Time>,
) {
for mut health in query.iter_mut() {
let new_health = health.current + 2. * time.delta_secs();
health.current = new_health.min(health.max);
}
}
```
}
= Maze Ascension
== 1. Līmeņa DPD
#figure(image("assets/images/diagrams/dpd1.png"))
== Stāva modulis
#figure(image("assets/images/diagrams/floor.png", width: 50%))
= Hexlab bibliotēka
#pagebreak()
#figure(
caption: link("https://crates.io/crates/hexlab"),
image("assets/images/crates/hexlab.png", height: 92%),
)
== Labirinta ģenerēšanas funkcijas projektējums
#grid(
columns: (1fr, 1fr),
figure(image("assets/images/diagrams/maze-gen.png")),
figure(image("assets/images/diagrams/recursive.png")),
)
== Ģenerēšanas algoritms
// recursive backtracking
#figure(
caption: link("https://en.wikipedia.org/wiki/Maze_generation_algorithm"),
image("assets/videos/hexmaze/hexmaze.gif", height: 92%),
)
= Sešstūru implementācija
== Attēlošana
#grid(
columns: 2,
figure(image("assets/images/game/tile-spreadout.png", height: 100%)),
figure(image("assets/images/game/tile.png", height: 100%)),
)
#figure(image("assets/images/game/grid.png", height: 100%))
= Saskarne
#pagebreak()
#grid(
columns: 2,
figure(image("assets/images/game/main-menu.png")),
)
#figure(image("assets/videos/game/maze-game.gif"))
#grid(
columns: (1fr, 1fr),
figure(image("assets/images/game/debug.png")),
figure(image("assets/images/game/dev-tools.png")),
)
#figure(image("assets/videos/game/big-maze.gif"))
= Secinājumi
== Rezultāti
- 3D spēle izmantojot Bevy un Rust:
- Procedurāla sešstūraina labirints ģenerēšana, izmantojot DFS.
- Izveidota atkārtoti lietojama atvērtā pirmkoda bibliotēka "hexlab".
- Efektīva līmeņa pārvaldība:
- Vienmērīga pāreja starp labirinta līmeņiem.
== Turpmākie darbi
- Īstenot vairāk labirintu ģenerēšanas paņēmienus/algoritmus.
- Ieviest jaunas mehānikas un papildspējas.
- Uzlabot vizuālo kvalitāti un spēlētāja izskatu.
- Izstrādāt daudzspēlētāju režīmu.
= Paldies par uzmanību!
Jautājumi?
#show: appendix
= Galavārds
== ECS vs OOP
#grid(
columns: (1fr, 1fr),
gutter: 1em,
[
*ECS*
- Plakana hierarhija
- Datu orientēta
- Kešatmiņai piemērots
- Paralēla apstrāde
],
[
*OOP*
- Dziļa mantojamība (inheritance)
- Objektorientēta
- Kešatmiņa izkliedēts
- Secīga apstrāde
],
)
== Iedvesma
#figure(
caption: link("https://www.redblobgames.com/grids/hexagons/"),
grid(
columns: 2,
figure(image("assets/images/redblogmages/axial-coords.png", height: 92%)),
figure(image("assets/videos/coords/coords.gif", height: 92%)),
),
)

7
requirements.typ Normal file
View File

@ -0,0 +1,7 @@
#import "@preview/dashy-todo:0.0.1"
#import "@preview/fletcher:0.5.3"
#import "@preview/headcount:0.1.0"
#import "@preview/i-figured:0.2.4"
#import "@preview/tablex:0.0.9"
#import "@preview/touying:0.5.5"
#import "@preview/wordometer:0.1.3"

View File

@ -8,7 +8,7 @@
"Anotācija",
)
Kvalifikācijas darbā ir izstrādāta spēle "Maze Ascension", kas piedāvā
spēlētājiem izaicinājumu iziet cauri proceduāli ģenerētiem sešstūrainam
spēlētājiem izaicinājumu iziet cauri procedurāli ģenerētiem sešstūrainam
labirintiem. Spēle ir veidota, izmantojot Rust programmēšanas valodu un Bevy
spēļu dzinēju.
@ -26,13 +26,13 @@ tīmekļa versija, izmantojot WebAssembly tehnoloģiju.
first-line-indent: 0cm,
[*Atslēgvārdi:*],
)
Labirints
Labirints,
datorspēle,
sistēmas prasības,
programmatūras prasību specifikācija,
Bevy,
ECS,
papilspējas.
papildspējas.
#text(
@ -46,16 +46,7 @@ papilspējas.
numbering: none,
"Abstract",
)
#align(
center,
heading(
level: 2,
outlined: false,
numbering: none,
text(13pt, "Game development using Bevy game engine"),
),
)
The qualification work includes the game "Maze Ascension", which offers
The qualification work "Game development using Bevy game engine" includes the game "Maze Ascension", which offers
players the challenge to pass through procedurally generated hexagons
mazes. The game is built using the Rust programming language and Bevy
game engine.
@ -74,7 +65,7 @@ papilspējas.
[*Keywords:*],
)
Maze,
comtuper game,
computer game,
system requirements,
software requirements specification,
Bevy,

View File

@ -5,23 +5,32 @@
#set figure(kind: "attachment", supplement: "pielikums")
#figure(
caption: [Pilns "hexlab" bibliotēkas testu rezultāts],
image("assets/images/tests/hexlab-full.png", height: 90%),
) <tests-hexlab-full>
caption: [Clippy rīka rezultāts "hexlab" bibliotēkai],
image("../assets/images/clippy/hexlab.png"),
) <clippy-hexlab>
#figure(
caption: [Clippy rīka rezultāts "Maze Ascension" spēlei],
image("../assets/images/clippy/maze-ascension.png"),
) <clippy-maze-ascension>
#figure(
caption: [Tarpaulin rīka rezultāts "hexlab" bibliotēkai],
image("assets/images/tests/tarpaulin/hexlab.png"),
image("../assets/images/tests/tarpaulin/hexlab.png"),
) <tarpaulin-hexlab>
#figure(
caption: [Tokei rīka rezultāts "Maze Ascension" spēlei],
image("assets/images/tokei/maze-ascension.png"),
image("../assets/images/tokei/maze-ascension.png"),
) <tokei-maze-ascension>
#figure(
caption: [Tokei rīka rezultāts "hexlab" bibliotēkai],
image("assets/images/tokei/hexlab.png"),
image("../assets/images/tokei/hexlab.png"),
) <tokei-hexlab>
#figure(
caption: [Pilns "hexlab" bibliotēkas testu rezultāts],
image("../assets/images/tests/hexlab-full.png", height: 90%),
) <tests-hexlab-full>

View File

@ -2,19 +2,19 @@
#codeblock(
[Labirinta būvētāja implementācijas piemērs],
"assets/code/hexlab/builder.rs",
"../assets/code/hexlab/builder.rs",
)
#codeblock(
[Labirinta sienu reprezentācijas piemērs],
"assets/code/hexlab/walls.rs",
"../assets/code/hexlab/walls.rs",
)
#codeblock(
[Labirinta stāvu implementācijas piemērs],
"assets/code/maze-ascension/floor.rs",
"../assets/code/maze-ascension/floor.rs",
)
#codeblock(
[Labirinta ģenerācijas implementācijas piemērs],
"assets/code/maze-ascension/maze_generation.rs",
"../assets/code/maze-ascension/maze_generation.rs",
)

View File

@ -19,7 +19,6 @@
date: "",
body,
) = {
set document(author: authors)
set page(
@ -33,13 +32,23 @@
paper: "a4",
)
set text(
font: "Times New Roman",
font: (
"Times New Roman",
"New Computer Modern",
),
size: 12pt,
hyphenate: auto,
lang: "lv",
region: "lv",
)
show raw: set text(features: (calt: 0))
show raw: set text(
font: (
"JetBrainsMono NF",
"JetBrains Mono",
"Fira Code",
),
features: (calt: 0),
)
show math.equation: set text(weight: 400)
@ -157,9 +166,7 @@
align(
center,
upper(
text(date),
),
upper(text(date)),
)
/* Title page config end */
@ -207,9 +214,11 @@
),
)
}
if it.kind in (
if (
it.kind in (
"i-figured-raw",
"i-figured-\"attachment\"",
)
) {
return align(
end,
@ -247,7 +256,7 @@
let supplement_map = (
i-figured-table: "tab.",
i-figured-image: "att.",
attachment: "pielikums",
attachment: "pielikumu",
)
@ -263,10 +272,12 @@
}
let number = if kind == "attachment" {
(
numbering(
el.numbering,
..counter(figure.where(kind: kind)).at(el.location()),
) + "." // Only add dot for attachments
) + "."
) // Only add dot for attachments
} else {
numbering(
el.numbering,
@ -319,7 +330,6 @@
/* ToC config end */
// show link: set text(fill: blue.darken(20%))
// Main body