CI and common update:
-added webpage deploymnet stage -added separate build stage which build all binaries and generate documentation -added Emscripten build stage for merge to master only -added VBO batch rendering (current default, no render mode switch yet) -fixed camera positioning calculation -fixed buffer issue with WebGL -added viewport scalling (at least 300 pixels height). Pixels are scalled if screen is bigger. -center demos gameplay area -added fullpage html template for Emscripten build
This commit is contained in:
parent
f67eb452cc
commit
54a6d5dec2
29 changed files with 1167 additions and 322 deletions
|
|
@ -1,34 +1,53 @@
|
|||
/************************************************************************************************************************
|
||||
*This module contain main templates for user.
|
||||
*There are three structure templates (mixins) which should be added on top of structure:
|
||||
* - System: make system structure
|
||||
* - Component: make component structure
|
||||
* - Event: make event structure
|
||||
*
|
||||
*ex.
|
||||
*Struct System1
|
||||
*{
|
||||
* mixin!ECS.System;
|
||||
*}
|
||||
*
|
||||
*Struct System2
|
||||
*{
|
||||
* mixin!ECS.System(16);//set number of jobs generated for system by multithreaded update
|
||||
*}
|
||||
*
|
||||
*Struct Component1
|
||||
*{
|
||||
* mixin!ECS.Component;
|
||||
*}
|
||||
*
|
||||
*Struct Event1
|
||||
*{
|
||||
* mixin!ECS.Event;
|
||||
*}
|
||||
*
|
||||
*There is also template for generating list of excluded components "ExcludedComponets(T...)".
|
||||
*This template takes component structure types and making list of excluded components used in "registerSystem" function.
|
||||
*
|
||||
This module contain main templates for user.
|
||||
There are three structure templates (mixins) which should be added on top of structure:
|
||||
$(LIST
|
||||
* System: make system structure
|
||||
* Component: make component structure
|
||||
* Event: make event structure
|
||||
)
|
||||
|
||||
---
|
||||
Struct System1
|
||||
{
|
||||
mixin!ECS.System;
|
||||
}
|
||||
|
||||
Struct System2
|
||||
{
|
||||
mixin!ECS.System(16);//set number of jobs generated for system by multithreaded update
|
||||
}
|
||||
|
||||
Struct Component1
|
||||
{
|
||||
mixin!ECS.Component;
|
||||
}
|
||||
|
||||
Struct Event1
|
||||
{
|
||||
mixin!ECS.Event;
|
||||
}
|
||||
---
|
||||
|
||||
There is also template for generating list of excluded components "ExcludedComponets(T...)".
|
||||
This template takes component structure types and making list of excluded components used in "registerSystem" function.
|
||||
|
||||
---
|
||||
Struct System1
|
||||
{
|
||||
mixin!ECS.System;
|
||||
|
||||
struct EntitiesData
|
||||
{
|
||||
... //used components
|
||||
}
|
||||
|
||||
ExcludedComponets!(Comp1, Comp2);
|
||||
}
|
||||
---
|
||||
|
||||
Copyright: Copyright © 2018-2019, Dawid Masiukiewicz, Michał Masiukiewicz
|
||||
License: BSD 3-clause, see LICENSE file in project root folder.
|
||||
*/
|
||||
module ecs.core;
|
||||
|
||||
|
|
@ -36,12 +55,12 @@ public import ecs.manager;
|
|||
public import ecs.entity;
|
||||
|
||||
/************************************************************************************************************************
|
||||
*Main struct used as namespace for templates.
|
||||
Main struct used as namespace for templates.
|
||||
*/
|
||||
static struct ECS
|
||||
{
|
||||
/************************************************************************************************************************
|
||||
*Mark structure as System. Should be added on top of structure (before any data).
|
||||
Mark structure as System. Should be added on top of structure (before any data).
|
||||
*/
|
||||
mixin template System(uint jobs_count = 32)
|
||||
{
|
||||
|
|
@ -50,7 +69,7 @@ static struct ECS
|
|||
}
|
||||
|
||||
/************************************************************************************************************************
|
||||
*Mark structure as Component. Should be added on top of structure (before any data).
|
||||
Mark structure as Component. Should be added on top of structure (before any data).
|
||||
*/
|
||||
mixin template Component()
|
||||
{
|
||||
|
|
@ -58,7 +77,7 @@ static struct ECS
|
|||
}
|
||||
|
||||
/************************************************************************************************************************
|
||||
*Mark structure as Event. Should be added on top of structure (before any data).
|
||||
Mark structure as Event. Should be added on top of structure (before any data).
|
||||
*/
|
||||
mixin template Event()
|
||||
{
|
||||
|
|
@ -67,7 +86,7 @@ static struct ECS
|
|||
}
|
||||
|
||||
/************************************************************************************************************************
|
||||
*Make list of excluded components. This template get structure types as argument. Should be added inside System structure.
|
||||
Make list of excluded components. This template get structure types as argument. Should be added inside System structure.
|
||||
*/
|
||||
mixin template ExcludedComponents(T...)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue