Skip to content

Commit add14cd

Browse files
committed
initial commit
0 parents  commit add14cd

34 files changed

+2654
-0
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: bundler
4+
directory: /
5+
schedule:
6+
interval: daily
7+
allow:
8+
- dependency-type: direct

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
jobs:
9+
# Build job
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: Setup Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: '3.3' # Not needed with a .ruby-version file
19+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
20+
cache-version: 0 # Increment this number if you need to re-download cached gems
21+
- name: Build with Jekyll
22+
run: bundle exec jekyll build

.github/workflows/pages.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
push:
11+
branches: ["main"]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow one concurrent deployment
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
- name: Setup Ruby
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: '3.3' # Not needed with a .ruby-version file
38+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
39+
cache-version: 0 # Increment this number if you need to re-download cached gems
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v3
43+
- name: Build with Jekyll
44+
# Outputs to the './_site' directory by default
45+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
46+
env:
47+
JEKYLL_ENV: production
48+
- name: Upload artifact
49+
# Automatically uploads an artifact from the './_site' directory by default
50+
uses: actions/upload-pages-artifact@v1
51+
52+
# Deployment job
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Not sure what a .gitignore is?
2+
# See: https://git-scm.com/docs/gitignore
3+
4+
# These are directly copied from Jekyll's first-party docs on `.gitignore` files:
5+
# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control
6+
7+
# Ignore the default location of the built site, and caches and metadata generated by Jekyll
8+
_site/
9+
.sass-cache/
10+
.jekyll-cache/
11+
.jekyll-metadata
12+
13+
# Ignore folders generated by Bundler
14+
.bundle/
15+
vendor/

Gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source 'https://rubygems.org'
2+
3+
gem "jekyll", "~> 4.3.3" # installed by `gem jekyll`
4+
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2
5+
6+
gem "just-the-docs", "0.9.0" # pinned to the current release
7+
# gem "just-the-docs" # always download the latest release

Gemfile.lock

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.7)
5+
public_suffix (>= 2.0.2, < 7.0)
6+
bigdecimal (3.1.8)
7+
colorator (1.1.0)
8+
concurrent-ruby (1.3.4)
9+
em-websocket (0.5.3)
10+
eventmachine (>= 0.12.9)
11+
http_parser.rb (~> 0)
12+
eventmachine (1.2.7)
13+
ffi (1.17.0-arm64-darwin)
14+
ffi (1.17.0-x86_64-linux-gnu)
15+
forwardable-extended (2.6.0)
16+
google-protobuf (4.27.3-arm64-darwin)
17+
bigdecimal
18+
rake (>= 13)
19+
google-protobuf (4.27.3-x86_64-linux)
20+
bigdecimal
21+
rake (>= 13)
22+
http_parser.rb (0.8.0)
23+
i18n (1.14.5)
24+
concurrent-ruby (~> 1.0)
25+
jekyll (4.3.3)
26+
addressable (~> 2.4)
27+
colorator (~> 1.0)
28+
em-websocket (~> 0.5)
29+
i18n (~> 1.0)
30+
jekyll-sass-converter (>= 2.0, < 4.0)
31+
jekyll-watch (~> 2.0)
32+
kramdown (~> 2.3, >= 2.3.1)
33+
kramdown-parser-gfm (~> 1.0)
34+
liquid (~> 4.0)
35+
mercenary (>= 0.3.6, < 0.5)
36+
pathutil (~> 0.9)
37+
rouge (>= 3.0, < 5.0)
38+
safe_yaml (~> 1.0)
39+
terminal-table (>= 1.8, < 4.0)
40+
webrick (~> 1.7)
41+
jekyll-include-cache (0.2.1)
42+
jekyll (>= 3.7, < 5.0)
43+
jekyll-sass-converter (3.0.0)
44+
sass-embedded (~> 1.54)
45+
jekyll-seo-tag (2.8.0)
46+
jekyll (>= 3.8, < 5.0)
47+
jekyll-watch (2.2.1)
48+
listen (~> 3.0)
49+
just-the-docs (0.9.0)
50+
jekyll (>= 3.8.5)
51+
jekyll-include-cache
52+
jekyll-seo-tag (>= 2.0)
53+
rake (>= 12.3.1)
54+
kramdown (2.4.0)
55+
rexml
56+
kramdown-parser-gfm (1.1.0)
57+
kramdown (~> 2.0)
58+
liquid (4.0.4)
59+
listen (3.9.0)
60+
rb-fsevent (~> 0.10, >= 0.10.3)
61+
rb-inotify (~> 0.9, >= 0.9.10)
62+
mercenary (0.4.0)
63+
pathutil (0.16.2)
64+
forwardable-extended (~> 2.6)
65+
public_suffix (6.0.1)
66+
rake (13.2.1)
67+
rb-fsevent (0.11.2)
68+
rb-inotify (0.11.1)
69+
ffi (~> 1.0)
70+
rexml (3.3.5)
71+
strscan
72+
rouge (4.3.0)
73+
safe_yaml (1.0.5)
74+
sass-embedded (1.77.8-arm64-darwin)
75+
google-protobuf (~> 4.26)
76+
sass-embedded (1.77.8-x86_64-linux-gnu)
77+
google-protobuf (~> 4.26)
78+
strscan (3.1.0)
79+
terminal-table (3.0.2)
80+
unicode-display_width (>= 1.1.1, < 3)
81+
unicode-display_width (2.5.0)
82+
webrick (1.8.1)
83+
84+
PLATFORMS
85+
arm64-darwin-23
86+
x86_64-linux
87+
88+
DEPENDENCIES
89+
jekyll (~> 4.3.3)
90+
just-the-docs (= 0.9.0)
91+
92+
BUNDLED WITH
93+
2.3.26

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# [kool-engine.github.io](https://kool-engine.github.io)
2+
Not much else to say here, you should go there.

_config.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
title: kool Docs
2+
description: An OpenGL / WebGPU engine for Desktop JVM, Android and Javascript written in Kotlin.
3+
theme: just-the-docs
4+
5+
url: https://fabmax.github.io
6+
7+
aux_links:
8+
kool Templates: https://github.com/fabmax/kool-templates
9+
10+
# External navigation links
11+
nav_external_links:
12+
- title: kool on GitHub
13+
url: https://github.com/fabmax/kool
14+
15+
callouts_level: quiet # or loud
16+
callouts:
17+
highlight:
18+
color: yellow
19+
important:
20+
title: Important
21+
color: blue
22+
new:
23+
title: New
24+
color: green
25+
note:
26+
title: Note
27+
color: purple
28+
warning:
29+
title: Warning
30+
color: red
31+
32+
mermaid:
33+
# Version of mermaid library
34+
# Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/
35+
version: "9.1.6"
36+
37+
# Footer content
38+
# appears at the bottom of every page's main content
39+
40+
# Back to top link
41+
back_to_top: true
42+
back_to_top_text: "Back to top"
43+
44+
footer_content: "Copyright &copy; 2017-2024 Max Thiele. Distributed by an <a href=\"https://github.com/fabmax/kool/blob/main/LICENSE\">Apache-2.0 License.</a>"

demos.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
layout: default
3+
title: Demos
4+
nav_order: 100
5+
---
6+
7+
# kool Demos
8+
{: .fs-9 }
9+
10+
The following demos demonstrate various features of the engine. All demos run in the browser as well as on Desktop JVM.
11+
{: .fs-6 .fw-300 }
12+
13+
---
14+
15+
## Demos
16+
17+
Following the links launch each demo directly in the browser. (Desktop-) Chrome is recommended but other browsers might work as well.
18+
All demos are implemented in code-only fashion (i.e. without using the editor). The code for all demos is available in
19+
the [kool repo].
20+
21+
- [Island] - Height-map based island incl. some wind-affected vegetation + a basic controllable character.
22+
- [Physics - Ragdoll] - Ragdoll physics demo.
23+
- [Physics - Vehicle] - A drivable vehicle (W, A, S, D / cursor keys, R to reset) based on the Nvidia PhysX vehicles SDK.
24+
- [Physics - Joints] - Physics demo consisting of a chain running over two gears. Uses a lot of multi shapes and revolute joints.
25+
- [Physics - Collision] - The obligatory collision physics demo with various different shapes.
26+
- [Embedded UI] - Integrated UI framework implemented completely within the engine. Fast, highly customizable and easy-to-use.
27+
- [Particles] - Two teams of bees fighting against each other. Simulation can be toggled between CPU and compute-shader
28+
(if available, i.e. on WebGPU).
29+
- [Fluffy Bunny] - Shell-shading based rendering of animated fur (based on this [video](https://www.youtube.com/watch?v=9dr-tRQzij4)).
30+
- [Creative Coding] - A few relatively simple demos showcasing different techniques of generating procedural geometry.
31+
- [Procedural Geometry] - Small test-case for
32+
procedural geometry; all geometry is generated in code (even the roses! Textures are regular images though). Also,
33+
some glass shading (shaft of the wine glass, the wine itself looks quite odd when shaded with refractions and is
34+
therefore opaque).
35+
- [glTF Models] - Various demo models loaded from glTF / glb format
36+
- Flight Helmet from [glTF sample models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/FlightHelmet)
37+
- Polly from [Blender](https://github.com/KhronosGroup/glTF-Blender-Exporter/tree/master/polly)
38+
- Coffee Cart from [Poly Haven](https://polyhaven.com/a/CoffeeCart_01)
39+
- Camera Model also from [Poly Haven](https://polyhaven.com/a/CoffeeCart_01)
40+
- A few feature test models also from the [glTF sample model repository](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0)
41+
- [Deferred Shading] - Thousands of dynamic light sources, bloom and ambient occlusion.
42+
- [Screen-space Ambient Occlusion] - Roughly based on [this](http://john-chapman-graphics.blogspot.com/2013/01/ssao-tutorial.html) article by
43+
John Chapman with slightly optimized sampling (also shamelessly recreated his demo scene).
44+
- [Screen-space Reflections] - A simple PBR shaded model with screen-space reflections and up to four spot-lights with dynamic shadows.
45+
- [Physical Based Rendering] - Interactive PBR demo with image based lighting for various materials and environments (underlying PBR theory
46+
from [this](https://learnopengl.com/PBR/Theory) awesome article series).
47+
- [Instanced / LOD Drawing] - Instanced rendering demo of the Stanford Bunny. Uses six levels of detail to render up to 8000 instances.
48+
- [Mesh Simplification] Interactive mesh simplification demo (based on traditional [error-quadrics](https://www.cs.cmu.edu/~./garland/Papers/quadrics.pdf))
49+
50+
[kool repo]: https://github.com/kool-engine/kool
51+
[Island]: https://kool-engine.github.io/kool/demos/?demo=phys-terrain
52+
[Physics - Ragdoll]: https://kool-engine.github.io/kool/demos/?demo=phys-ragdoll
53+
[Physics - Vehicle]: https://kool-engine.github.io/kool/demos/?demo=phys-vehicle
54+
[Physics - Joints]: https://kool-engine.github.io/kool/demos/?demo=phys-joints
55+
[Physics - Collision]: https://kool-engine.github.io/kool/demos/?demo=physics
56+
[Embedded UI]: https://kool-engine.github.io/kool/demos/?demo=ui
57+
[Particles]: https://kool-engine.github.io/kool/demos/?demo=bees
58+
[Fluffy Bunny]: https://kool-engine.github.io/kool/demos/?demo=shell
59+
[Creative Coding]: https://kool-engine.github.io/kool/demos/?demo=creative-coding
60+
[Procedural Geometry]: https://kool-engine.github.io/kool/demos/?demo=procedural
61+
[glTF Models]: https://kool-engine.github.io/kool/demos/?demo=gltf
62+
[Deferred Shading]: https://kool-engine.github.io/kool/demos/?demo=deferred
63+
[Screen-space Ambient Occlusion]: https://kool-engine.github.io/kool/demos/?demo=ao
64+
[Screen-space Reflections]: https://kool-engine.github.io/kool/demos/?demo=ssr
65+
[Physical Based Rendering]: https://kool-engine.github.io/kool/demos/?demo=pbr
66+
[Instanced / LOD Drawing]: https://kool-engine.github.io/kool/demos/?demo=instance
67+
[Mesh Simplification]: https://kool-engine.github.io/kool/demos/?demo=simplification

docs/editor/basics.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
layout: default
3+
title: Editor Basics
4+
parent: Editor
5+
nav_order: 2
6+
---
7+
8+
# Editor Basics
9+
{: .fs-9 .no_toc }
10+
11+
---
12+
13+
## Table of contents
14+
{: .no_toc .text-delta }
15+
16+
1. TOC
17+
{:toc}
18+
19+
---
20+
21+
The basic scene editing features work similar to most 3D editing software and should be mostly self-explanatory.
22+
Most editing features are also accessible via key-bindings and you can open a context-aware popup window, showing
23+
you the currently available keys by pressing `F1`.
24+
25+
## Adding and removing objects
26+
You can add objects by right-clicking into the scene view and select an object type from the `Add object` sub-menu
27+
of the appearing popup-menu (e.g. `Add object` -> `Mesh` -> `Box` to add a box mesh). The object appears at the
28+
click position and will have the same parent object as the object you selected with the initial right click.
29+
Alternatively, you can right click any object in the `Scene Browser` on the left side and use the popup-menu there.
30+
31+
Objects can be removed via the right-click menu or by pressing `Delete`.
32+
33+
## Undo / redo, copy & paste and duplicate
34+
Of course undo and redo work as expected by pressing `Ctrl + Z` / `Ctrl + Y` and you can use `Ctrl + C` and
35+
`Ctrl + V` to copy and paste selected objects. Moreover, you can use `Ctrl + D` to duplicate the current selection
36+
which is more or less identical to copy and immediately pasting it.
37+
38+
## Manipulating objects
39+
You can move, rotate and scale selected objects either via the corresponding toolbar buttons on the left side of
40+
the scene view or by using the hotkeys `G` (grab / move), `R` (rotate) and `S` (scale). The toolbar buttons enable
41+
a transform gizmo for the selected objects which can then be used to transform the objects as you like.
42+
43+
When using the hotkeys however, you enter the immediate transform mode, which works very similar to how Blender
44+
works but might be a bit unintuitive in case you never used Blender: In immediate transform mode, the objects are
45+
transformed by simply moving the mouse, without the need to drag any fiddly gizmo handles. Moreover, you can constrain
46+
the manipulation to a certain axis by pressing `X`, `Y` or `Z` or to a plane by pressing `Shift + X`, `Shift + Y`
47+
or `Shift + Z`. Finally, in axis mode you can also type a number to manipulate the selected objects by that amount.
48+
Press `Enter` or the left mouse button to apply the transform or `Esc` or the right mouse button to cancel the transform.
49+
50+
Immediate transform mode is very useful to do quick and precise manipulations. For example, if you want to move an
51+
object 3.5 units to the right, you can simply select it and type `G` (to enter grab / move mode), `X` to constrain
52+
movement to the x-axis then type `3.5` to move the object 3.5 units along the x-axis and finally press enter to apply
53+
the movement.
54+
55+
During object manipulation you can also press `Ctrl` to get a ticked behavior with fixed increments and `Shift`
56+
to get more precise manipulation.
57+
58+
## Transform mode
59+
By default object transforms are relative to the global frame, but it often makes sense to use the local or parent
60+
frame instead. You can do so by selecting the corresponding mode from the `Transform mode` chooser at the top of the
61+
window.

0 commit comments

Comments
 (0)