Skip to content

Commit

Permalink
feat: made runtime module page look nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Jul 5, 2024
1 parent 4925cf1 commit a97d327
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 77 deletions.
1 change: 1 addition & 0 deletions src/app/docs/runtime/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ng_project(
"runtime.component.css",
"runtime.component.html",
"runtime.component.ts",
"runtime-module-block.component.html",
"runtime-routing.module.ts",
],
deps = [
Expand Down
15 changes: 15 additions & 0 deletions src/app/docs/runtime/runtime-module-block.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="px-4 py-2 rounded-2xl shadow-xl h-full border border-opacity-30">
<div class="flex flex-row gap-3 items-center">
<h3 [attr.id]="moduleName + '-module'">{{ moduleName }}</h3>
<p>
<a
[routerLink]="'/reference/ecsact_runtime/' + moduleName + '_8h'"
fragment="functions"
><span class="i24">article</span> ecsact/runtime/{{ moduleName }}.h</a
>
</p>
</div>
<div>
<ng-content />
</div>
</div>
121 changes: 47 additions & 74 deletions src/app/docs/runtime/runtime.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,85 +11,58 @@ <h1>Ecsact Runtime Library</h1>
>.
</p>
<h2 id="modules">Modules</h2>
<div class="grid lg:grid-cols-2 gap-4 pb-8">
<div moduleBlock="core">
<p>
The core module deals with storage and system execution on that storage.
Entities and their components' data are stored inside a
<em>registry</em>. Systems and actions are executed on a registry's
stored entities and their components based on the system or actions
capabilities.
</p>
</div>

<h3 id="core-module">Core</h3>
<p>
The core module deals with storage and system execution on that storage.
Entities and their components' data are stored inside a <em>registry</em>.
Systems and actions are executed on a registry's stored entities and their
components based on the system or actions capabilities.
</p>
<p>
Module methods are available in
<a routerLink="/reference/ecsact_runtime/core_8h" fragment="functions"
><span class="i24">article</span> ecsact/runtime/core.h</a
>
</p>
<div moduleBlock="async">
<p>
The async module handles everything involving using an external async
execution. This includes flushing events, enqueuing execution options,
and receiving async specific errors.
</p>
</div>

<h3 id="async-module">Async</h3>
<p>
The async module handles everything involving using an external async
execution. This includes flushing events, enqueuing execution options, and
receiving async specific errors.
</p>
<p>
Async methods are available in
<a routerLink="/reference/ecsact_runtime/async_8h"
><span class="i24">article</span> ecsact/runtime/async.h</a
>
</p>
<div moduleBlock="dynamic">
<p>
The dynamic module is responsible for creating new <em>types</em> and
even packages at runtime. A type includes enums, components, systems and
actions. Everything you can create when writing an Ecsact file you can
do programmatically with the dynamic module.
</p>
</div>

<h3 id="dynamic-module">Dynamic</h3>
<p>
The dynamic module is responsible for creating new <em>types</em> and even
packages at runtime. A type includes enums, components, systems and actions.
Everything you can create when writing an Ecsact file you can do
programmatically with the dynamic module.
</p>
<p>
Module methods are available in
<a routerLink="/reference/ecsact_runtime/dynamic_8h" fragment="functions"
><span class="i24">article</span> ecsact/runtime/dynamic.h</a
>
</p>
<div moduleBlock="meta">
<p>
The meta module reveals extra information about the runtime. This
includes debug information, type names, composite fields, system
capabilities and much more. This module isn't needed for simulation and
is mostly used for debugging and tooling.
</p>
</div>

<h3 id="meta-module">Meta</h3>
<p>
The meta module reveals extra information about the runtime. This includes
debug information, type names, composite fields, system capabilities and
much more. This module isn't needed for simulation and is mostly used for
debugging and tooling.
</p>
<p>
Module methods are available in
<a routerLink="/reference/ecsact_runtime/meta_8h" fragment="functions"
><span class="i24">article</span> ecsact/runtime/meta.h</a
>
</p>

<h3 id="serialize-module">Serialize</h3>
<p>
The serialize module gives a simple API for serializing composites. Useful
for saving simulation state or sending information over a network.
</p>
<p>
Module methods are available in
<a routerLink="/reference/ecsact_runtime/serialize_8h" fragment="functions"
><span class="i24">article</span> ecsact/runtime/serialize.h</a
>
</p>
<div moduleBlock="serialize">
<p>
The serialize module gives a simple API for serializing composites.
Useful for saving simulation state or sending information over a
network.
</p>
</div>

<h3 id="static-module">Static</h3>
<p>
The static module reveals a set of components, systems, and actions that
were available at compile-time when the runtime was built.
</p>
<p>
Module methods are available in
<a routerLink="/reference/ecsact_runtime/static_8h" fragment="functions"
><span class="i24">article</span> ecsact/runtime/static.h</a
>
</p>
<div moduleBlock="static">
<p>
The static module reveals a set of components, systems, and actions that
were available at compile-time when the runtime was built.
</p>
</div>
</div>

<h2 id="runtime-configurations">Runtime Configurations</h2>
<p>
Expand Down
18 changes: 15 additions & 3 deletions src/app/docs/runtime/runtime.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {RouterLink} from '@angular/router';
import {CommonModule, NgTemplateOutlet} from '@angular/common';
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
import {RouterLink, RouterModule} from '@angular/router';

@Component({
selector: '[moduleBlock]',
templateUrl: 'runtime-module-block.component.html',
standalone: true,
imports: [RouterModule, CommonModule],
})
export class RuntimeModuleBlock {
@Input('moduleBlock')
moduleName: string = '';
}

@Component({
templateUrl: 'runtime.component.html',
styleUrls: ['runtime.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [RouterLink],
imports: [RouterLink, NgTemplateOutlet, RuntimeModuleBlock],
})
export class RuntimeComponent {}

0 comments on commit a97d327

Please sign in to comment.