Skip to content

roseupram/learn-love

Repository files navigation

style: element class id > merge to a table so element do not need style, just need class No, still need style, for animation, rotation

learn-love

How to run

  • install love2d if you have no love2d
  • download game.love and click to run
  • view control: mouse to move, alt+mouse to rotate

note

  • Don't use love.graphics.setColor() for 3d render, it conflicts with vertex color
  • by default, alpha=0 also contribute to depth
  • offset -> rotation -> scaling
  • use Array:push, DO NOT use Array.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 false and nil as false and anything else as true. Beware that, unlike some other scripting languages, Lua considers both zero and the empty string as true in conditional tests.

ref

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages