style: element class id > merge to a table so element do not need style, just need class No, still need style, for animation, rotation
- install love2d if you have no love2d
- download game.love and click to run
- view control:
mouseto move,alt+mouseto rotate
- Don't use
love.graphics.setColor()for 3d render, it conflicts with vertex color - by default,
alpha=0also contribute to depth - offset -> rotation -> scaling
- use
Array:push, DO NOT useArray.push __index: when the key not found in table, search the key in __index- to debug in vscode, use
tomblind.local-lua-debugger-vscode - to format glsl shader, use
clang-format - vertex_position: love shader only render vertex in [-1,1], -1 is near, 1 is far
left is x+, up is y+, inward is z+, so that's a left-hand coordinate,
but in glTF, models are placed in right-hand coordinate, - int and float:
1/100=0; 1.0/100=0.01 - RxRy ~= RyRx, inverse(RxRy)=Ry' Rx', change some view
- mat in glsl is column-major, mat[0] is 1st column, m[3] is 4th column
- LuaJIT(5.1)
- lÖve 11.5
Conditionals (such as the ones in control structures) consider
falseandnilas false andanything elseas true. Beware that, unlike some other scripting languages, Lua considers both zero and the empty string as true in conditional tests.
- love2d
- hexgrid: hex coordinate
- gjk: polygon point intersection
- grid: css
- glTF: format specification
- scratchapixel: teach computer graphcis
- computational geometry: convex polygon problem