Skip to content

Instantly share code, notes, and snippets.

View MatthewBlanchard's full-sized avatar

Matthew Blanchard MatthewBlanchard

  • Atlantic City, New Jersey
View GitHub Profile
local x, y = math.abs(normalVel.x), math.abs(normalVel.y)
love.graphics.translate(self.AABB.position.x, self.AABB.position.y)
love.graphics.scale(5, 1)
love.graphics.rotate(math.atan2(x, y))
love.graphics.draw(self.mesh)
Object = {}
-- Metamethods
function Object:__call(...)
return self:new(...)
end
-- Constructor
function Object:__new()
end
local defaultVert = [[
vec4 position(mat4 transform_projection, vec4 vertex_position)
{
// The order of operations matters when doing matrix multiplication.
return transform_projection * vertex_position;
}
]]
local gbufferPixel = [[
uniform Image MainTex;
local CATEGORY_EX_ICES = {
"codex", "murex", "silex", "vertex", "index"
}
local CATEGORY_IX_ICES = {
"matrix", "radix", "helix"
}
local CATEGORY_UM_A = {
"baterium", "agendum", "desideratum", "erratum", "stratum", "datum", "ovum",
local CATEGORY_EX_ICES = {
"codex", "murex", "silex", "vertex", "index"
}
local CATEGORY_IX_ICES = {
"matrix", "radix", "helix"
}
local CATEGORY_UM_A = {
"baterium", "agendum", "desideratum", "erratum", "stratum", "datum", "ovum",
local CATEGORY_EX_ICES = {
"codex", "murex", "silex", "vertex", "index"
}
local CATEGORY_IX_ICES = {
"matrix", "radix", "helix"
}
local CATEGORY_UM_A = {
"baterium", "agendum", "desideratum", "erratum", "stratum", "datum", "ovum",
local ffi = require "ffi"
local sqrt = math.sqrt
ffi.cdef [[
typedef struct {
double x, y, z;
} mlml_vec3;
]]
local vec3 = {}
local ffi = require "ffi"
local sqrt = math.sqrt
ffi.cdef [[
typedef struct {
double x, y, z;
} mlml_vec3;
]]
local vec3 = {}