Skip to content

Commit

Permalink
Page cleanup, update to web
Browse files Browse the repository at this point in the history
  • Loading branch information
thygrrr committed Feb 29, 2024
1 parent e195316 commit 2f0301f
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 54 deletions.
11 changes: 8 additions & 3 deletions fennecs.tech/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { hyperlinkPlugin } from './plugin-hyperlink';

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "fennecs — tiny ECS for C#",
title: "fennecs — tiny ECS",
description: "fennecs ...the tiny, tiny, high-energy Entity Component System!",

markdown: {
Expand All @@ -17,13 +17,18 @@ export default defineConfig({
},

themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: 'https://fennecs.tech/img/fennecs-logo-small.svg',
nav: [
{ text: 'Home', link: '/' },
{ text: 'Documentation', link: '/docs/index' },
{ text: 'Examples', link: '/examples/index' },
{ text: 'Examples', link: '/demos/index' },
],

footer: {
message: '<a href="https://github.com/thygrrr/fennecs/?tab=MIT-1-ov-file#readme"><b>fenn</b>ecs</a> is released under the MIT License. <a href="https://volpeon.ink/emojis/neofox/">Neofox</a> is released under the CC BY-NC-SA 4.0 License.',
copyright: '<b>fenn</b>ecs is copyright © 2024 Tiger Blue, 2022 Aaron Winter'
},

sidebar: generateSidebar([
{ sortMenusByName: true,
useFolderLinkFromIndexFile: true,
Expand Down
6 changes: 5 additions & 1 deletion fennecs.tech/.vitepress/plugin-hyperlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ export function hyperlinkPlugin(md: MarkdownIt, options?: Partial<HyperlinkPlugi
const text = state.src.substring(start + marker.length, end);

if (!silent) {
// Normalize the text for the URL
const normalizedText = text.trim().toLowerCase()
.replace(/[\s\W-]+/g, '-') // Replace spaces, punctuation (non-word characters except '-') with a dash

// Create the opening link token
const openToken = state.push('link_open', 'a', 1);
openToken.attrs = [['href', `${opts.baseUrl}${encodeURIComponent(text.trim().replace(/\s+/g, ' '))}`]];
openToken.attrs = [['href', `${opts.baseUrl}${normalizedText}`]];

// Create the text token
const textToken = state.push('text', '', 0);
Expand Down
35 changes: 35 additions & 0 deletions fennecs.tech/demos/DemoCubes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: doc
---

# Demo: Cubes

This demo demonstrates a simple case how to update the state of a large number of Entities, and how to bring this data into a Game Engine.

#### Source Code

| MonoGame🔜 |[Godot](https://github.com/thygrrr/fennecs/tree/main/demos/example-godot) | Flax🔜 | Unigine🔜 | Stride🔜| Raylib-cs🔜 | NeoAxis🔜 |
|:--------------:|:-------------------------------------------------------------------------------------------------------------:|:--------------:|:--------------:|:--------------:|:--------------:|:--------------:|
|![MonoGame](https://fennecs.tech/img/logo-monogame-80.png) | [![Godot](https://fennecs.tech/img/logo-godot-80.png)](https://github.com/thygrrr/fennecs/tree/main/demos/example-godot) | ![Flax Engine](https://fennecs.tech/img/logo-flax-80.png) | ![UNIGINE](https://fennecs.tech/img/logo-unigine-80-darkmode.png#gh-dark-mode-only)![UNIGINE](https://fennecs.tech/img/logo-unigine-80-lightmode.png#gh-light-mode-only) | ![STRIDE](https://fennecs.tech/img/logo-stride-80.png) | ![Raylib-cs](https://fennecs.tech/img/logo-raylib-80.png) | ![NeoAxis Engine](https://fennecs.tech/img/logo-neoaxis-80-darkmode.png#gh-dark-mode-only)![NeoAxis Engine](https://fennecs.tech/img/logo-neoaxis-80-lightmode.png#gh-light-mode-only) |


### Video (Godot Version)
<video controls autoplay muted loop>
<source src="https://fennecs.tech/video/fennecs-godot-democubes.mp4" type="video/mp4"/>
Your browser does not support the video tag.
</video>

::: info
All motion is 100% CPU simulation (no GPU). The point is not that this _could be done faster_ on the GPU, the point is that it _can be done fast_ on the CPU. 🦊
:::

State is stored in Components on the Entities:

- 1x `System.Numerics.Vector3` (as Position)
- 1x `Matrix4x3` (custom struct, as Transform)
- 1x `int` (as a simple identifier)

The state is transferred into the Game Engine in bulk each frame using Query.Raw in order to submit just the `Matrix4x3` structs directly to the Engine's data structures for this task.

This static data is then used by the Engine's Renderer and to display the Entities.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: doc
title: Examples
title: Demos
---

# In-Engine Demos
Expand Down Expand Up @@ -59,3 +59,9 @@ Work in progress, more examples will get added over time! Want to contribute or
</tr>
</table>



## Planned Examples:
| MonoGame🔜 |[Godot](https://github.com/thygrrr/fennecs/tree/main/demos/example-godot) | Flax🔜 | Unigine🔜 | Stride🔜| Raylib-cs🔜 | NeoAxis🔜 |
|:--------------:|:-------------------------------------------------------------------------------------------------------------:|:--------------:|:--------------:|:--------------:|:--------------:|:--------------:|
|![MonoGame](https://fennecs.tech/img/logo-monogame-80.png) | [![Godot](https://fennecs.tech/img/logo-godot-80.png)](https://github.com/thygrrr/fennecs/tree/main/demos/example-godot) | ![Flax Engine](https://fennecs.tech/img/logo-flax-80.png) | ![UNIGINE](https://fennecs.tech/img/logo-unigine-80-darkmode.png#gh-dark-mode-only)![UNIGINE](https://fennecs.tech/img/logo-unigine-80-lightmode.png#gh-light-mode-only) | ![STRIDE](https://fennecs.tech/img/logo-stride-80.png) | ![Raylib-cs](https://fennecs.tech/img/logo-raylib-80.png) | ![NeoAxis Engine](https://fennecs.tech/img/logo-neoaxis-80-darkmode.png#gh-dark-mode-only)![NeoAxis Engine](https://fennecs.tech/img/logo-neoaxis-80-lightmode.png#gh-light-mode-only) |
2 changes: 1 addition & 1 deletion fennecs.tech/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Ready to try **fenn**ecs for yourself? Flip through the [Cookbook](/cookbook/ind
:::

::: info :neofox_vr: THE DEMOS
The [Examples](/examples/index) category has some concrete examples for a growing list of renderers and game engines! Something useful and something pretty to look at at the same time? Oh my!
The [Demos](/demos/index) category has some concrete examples for a growing list of renderers and game engines! Something useful and something pretty to look at at the same time? Oh my!
:::

::: info :neofox_pat_floof: MISCELLANY
Expand Down
35 changes: 0 additions & 35 deletions fennecs.tech/examples/DemoCubes.md

This file was deleted.

19 changes: 7 additions & 12 deletions fennecs.tech/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,20 @@ features:

---

| [![Nuget](https://img.shields.io/nuget/v/fennecs?color=blue)](https://www.nuget.org/packages/fennecs/) | [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/thygrrr/fennecs/xUnit.yml)](https://github.com/thygrrr/fennECS/actions) | [![Open issues](https://img.shields.io/github/issues-raw/thygrrr/fennecs?color=green)](https://github.com/thygrrr/fennECS/issues) | ![GitHub top language](https://img.shields.io/badge/C%23-100%25_-blue) | [![License: MIT](https://img.shields.io/github/license/thygrrr/fennecs?color=blue)](https://github.com/thygrrr/fennECS?tab=MIT-1-ov-file#readme) |
|-----|-----|-----|-----|-----|
| [![Nuget](https://img.shields.io/nuget/v/fennecs?color=blue)](https://www.nuget.org/packages/fennecs/) | ![GitHub top language](https://img.shields.io/badge/C%23-100%25_-blue) | [![License: MIT](https://img.shields.io/github/license/thygrrr/fennecs?color=blue)](https://github.com/thygrrr/fennECS?tab=MIT-1-ov-file#readme) |
|-----|-----|-----|

<br/>
<br/>

# Ok, what the fox? Another ECS?!

We know... oh, _we know._ 😩

But in a nutshell, [**fenn**ecs](https://fennecs.tech) is...
# Ok, what the fox? Another ECS?!
### :neofox_pensive: We know... oh, _we know._
But in a nutshell, **fenn**ecs is...

🐾 zero codegen
🐾 minimal boilerplate
🐾 archetype-based
🐾 intuitively relational
🐾 lithe and fast 🐾


## Code Samples
| MonoGame🔜 |[Godot](https://github.com/thygrrr/fennecs/tree/main/examples/example-godot) | Flax🔜 | Unigine🔜 | Stride🔜| Raylib-cs🔜 | NeoAxis🔜 |
|:--------------:|:-------------------------------------------------------------------------------------------------------------:|:--------------:|:--------------:|:--------------:|:--------------:|:--------------:|
|![MonoGame](https://fennecs.tech/img/logo-monogame-80.png) | [![Godot](https://fennecs.tech/img/logo-godot-80.png)](https://github.com/thygrrr/fennecs/tree/main/examples/example-godot) | ![Flax Engine](https://fennecs.tech/img/logo-flax-80.png) | ![UNIGINE](https://fennecs.tech/img/logo-unigine-80-darkmode.png#gh-dark-mode-only)![UNIGINE](https://fennecs.tech/img/logo-unigine-80-lightmode.png#gh-light-mode-only) | ![STRIDE](https://fennecs.tech/img/logo-stride-80.png) | ![Raylib-cs](https://fennecs.tech/img/logo-raylib-80.png) | ![NeoAxis Engine](https://fennecs.tech/img/logo-neoaxis-80-darkmode.png#gh-dark-mode-only)![NeoAxis Engine](https://fennecs.tech/img/logo-neoaxis-80-lightmode.png#gh-light-mode-only) |
And that's all there is to say before you go and see for yourself, getting all wide-eyed and bushy-tailed!
2 changes: 1 addition & 1 deletion fennecs.tech/misc/Acknowledgements.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Many thanks to [Byteron (Aaron Winter)](https://github.com/Byteron) for creating


## n00t
Thanks to n00t on the [Godot Discord](https://discord.com/invite/4JBkykG) for suggesting to make the cubes in the [DemoCubes](../examples/DemoCubes.md) example occasionally arrangeinto a sphere. That, and for the much, much less impactful deed of suggesting [VitePress](https://vitepress.dev/), the amazing SSG this site was made with.
Thanks to n00t on the [Godot Discord](https://discord.com/invite/4JBkykG) for suggesting to make the cubes in the [DemoCubes](../demos/DemoCubes.md) example occasionally arrangeinto a sphere. That, and for the much, much less impactful deed of suggesting [VitePress](https://vitepress.dev/), the amazing SSG this site was made with.


## Volpeon
Expand Down

0 comments on commit 2f0301f

Please sign in to comment.