refactor: move world concepts into engine
This commit is contained in:
parent
eeedcb8e48
commit
2d15c7ab8d
52 changed files with 3298 additions and 1558 deletions
|
|
@ -22,7 +22,7 @@ export namespace Mat4 {
|
|||
|
||||
/** Model transform T * Ry * S: uniform `scale`, then a yaw rotation about Y,
|
||||
* then a translation. Built directly in column-major storage (no intermediate
|
||||
* matmuls) since it runs per mob per frame. A vertex at local +Z ends up
|
||||
* matmuls) since it runs per instance per frame. A vertex at local +Z ends up
|
||||
* pointing along world (sin yaw, 0, cos yaw), i.e. the object faces `yaw`. */
|
||||
export function compose(tx: number, ty: number, tz: number, yaw: number, scale: number): Mat4 {
|
||||
const c = Math.cos(yaw)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue