4 ms·
A better approach is to re-use arrays instead of creating intermediate ones, which is what gl-matrix[1] advocates. Each tween might still need its own matrix in
by mattdesl 12y ago
A better approach is to re-use arrays instead of creating intermediate ones, which is what gl-matrix[1] advocates. Each tween might still need its own matrix instance for start and end points, but at least these are not created per tick.
A similar approach is to use a "pool" of arrays[2] which allows you to re-use them without having to manually keep track of the temporary arrays.
[1] - https://github.com/toji/gl-matrix https://github.com/toji/gl-matrix
[2] - https://github.com/mikolalysenko/typedarray-pool https://github.com/mikolalysenko/typedarray-pool
- deleted 12y ago[deleted]