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:
Dawid Masiukiewicz 2020-05-01 19:26:21 +00:00
parent f67eb452cc
commit 54a6d5dec2
29 changed files with 1167 additions and 322 deletions

View file

@ -30,6 +30,11 @@ struct vec2
else static assert(0, "Operator "~op~" not implemented");
}
ivec2 opCast()
{
return ivec2(cast(int)x,cast(int)y);
}
void opOpAssign(string op)(vec2 v)
{
static if (op == "+")
@ -69,6 +74,15 @@ struct vec4
}
float[4] data;
}
vec4 opBinary(string op)(float v)
{
static if (op == "+") return vec4(x + v, y + v, z + v, w + v);
else static if (op == "-") return vec4(x - v, y - v, z - v, w - v);
else static if (op == "*") return vec4(x * v, y * v, z * v, w * v);
else static if (op == "/") return vec4(x / v, y / v, z / v, w / v);
else static assert(0, "Operator "~op~" not implemented");
}
}
struct ivec2
@ -82,6 +96,11 @@ struct ivec2
}
int[2] data;
}
vec2 opCast()
{
return vec2(x,y);
}
}
struct ivec4