cervus icon indicating copy to clipboard operation
cervus copied to clipboard

Reimplement some of the gl-matrix methods

Open stasm opened this issue 7 years ago • 3 comments

For instance, mat4.create could be implemented as:

return Float32Array.of(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);

stasm avatar Aug 26 '17 12:08 stasm

There are also quite a few bytes that we could shave off by making our own methods return results instead of writing to the first argument. Once the core code stabilizes I'll make an inventory of the methods we use and I'll try to reimplement them.

stasm avatar Aug 27 '17 16:08 stasm

@stasm is this still a valid issue? We've tried that last week, without any reasonable lean boost.

michalbe avatar Sep 15 '17 20:09 michalbe

Rolling a custom implementation of matrix math is a big task. gl-matrix does the job well and has a better testing coverage. I vote close.

stasm avatar Sep 16 '17 08:09 stasm